Assertion failure under FEImage::determineAbsolutePaintRect()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         Assertion failure under FEImage::determineAbsolutePaintRect()
4
5         <https://bugs.webkit.org/show_bug.cgi?id=131660>
6         <rdar://problem/15669294>
7
8         This patch merges Chromium r149536 (see
9         <https://chromiumcodereview.appspot.com/14701012>), which moves
10         m_absoluteTransform out of SVGFilter and into the base Filter class, so
11         that it isn't necessary to cast a Filter to SVGFilter to get the
12         absolute transform.
13
14         Reviewed by Geoffrey Garen.
15
16         Test: svg/filters/feImage-filter-assertion.html
17
18         * platform/graphics/filters/Filter.h:
19         (WebCore::Filter::Filter):
20         Changed to take the absolute transform.
21         (WebCore::Filter::absoluteTransform):
22         Moved from SVGFilter.
23         (WebCore::Filter::mapAbsolutePointToLocalPoint):
24         Ditto.
25
26         * rendering/FilterEffectRenderer.cpp:
27         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
28         Pass a default AffineTransform() to the Filter base class.
29
30         * svg/graphics/filters/SVGFEImage.cpp:
31         (WebCore::FEImage::determineAbsolutePaintRect):
32         Use the Filter without casting it to SVGFilter.
33         (WebCore::FEImage::platformApplySoftware):
34         Ditto.
35
36         * svg/graphics/filters/SVGFilter.cpp:
37         (WebCore::SVGFilter::SVGFilter):
38         Pass the transform to the base class, and remove initialization of a
39         removed member var.
40
41         * svg/graphics/filters/SVGFilter.h:
42         Member var moved to Filter.h.
43
44 2014-04-14  Darin Adler  <darin@apple.com>
45
46         REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
47         https://bugs.webkit.org/show_bug.cgi?id=126322
48
49         Reviewed by Ryosuke Niwa.
50
51         One additional tweak to the fix for the bug above.
52         Fixes crash in editing/editability/ignored-content.html test.
53
54         * html/HTMLObjectElement.cpp:
55         (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to
56         HTMLElement::canContainRangeEndPoint, bypassing HTMLPlugInElement override
57         that always returns false. Without this change, this function was always
58         returning false.
59
60 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
61
62         Crash in TileController::tileRevalidationTimerFired
63         https://bugs.webkit.org/show_bug.cgi?id=131656
64         <rdar://problem/16583166>
65
66         Reviewed by Sam Weinig.
67
68         It's possible for the TileController revalidation timer to fire after
69         the GraphicsLayer has been destroyed, so the PlatformCALayer no longer
70         has an owningGraphicsLayer.
71         
72         Bail from the timer callback if owningGraphicsLayer() is null.
73         
74         Also some drive-by 0 -> nullptr changes.
75
76         * platform/graphics/ca/GraphicsLayerCA.cpp:
77         (WebCore::GraphicsLayerCA::willBeDestroyed):
78         * platform/graphics/ca/PlatformCALayer.cpp:
79         (WebCore::PlatformCALayer::~PlatformCALayer):
80         * platform/graphics/ca/mac/TileController.mm:
81         (WebCore::TileController::tileRevalidationTimerFired):
82
83 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
84
85         [CSS Shapes] Remove some leftover shape-inside code
86         https://bugs.webkit.org/show_bug.cgi?id=131641
87
88         Reviewed by Dean Jackson.
89
90         I discovered that some code had been leftover from the shape-inside
91         removal. This removes that leftover code.
92
93         No new tests, no behavior change.
94
95         * platform/text/BidiResolver.h:
96         * rendering/BidiRun.cpp:
97         (WebCore::BidiRun::BidiRun):
98         * rendering/RenderBlockFlow.h:
99         * rendering/RenderBlockLineLayout.cpp:
100         (WebCore::RenderBlockFlow::createLineBoxes):
101         (WebCore::RenderBlockFlow::constructLine):
102         (WebCore::computeExpansionForJustifiedText):
103         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
104
105 2014-04-14  Jer Noble  <jer.noble@apple.com>
106
107         [MSE][Mac] video.currentTime is sometimes negative.
108         https://bugs.webkit.org/show_bug.cgi?id=131644
109
110         Reviewed by Eric Carlson.
111
112         AVSampleBufferRenderSynchronizer will occasionally return slightly negative values
113         when beginning playback. Clamp the return value to 0.
114
115         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
116         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
117
118 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
119
120         [CSSExclusions] Remove FIXME referencing closed bug
121         https://bugs.webkit.org/show_bug.cgi?id=131645
122
123         Reviewed by Dean Jackson.
124
125         This is silly, but the comment is really confusing as it's entirely
126         wrong now.
127
128         No new tests, no behavior change.
129
130         * rendering/style/RenderStyle.cpp:
131         (WebCore::RenderStyle::changeRequiresRepaint):
132
133 2014-04-14  Andreas Kling  <akling@apple.com>
134
135         Build fixage.
136
137         * page/FrameView.cpp:
138
139 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
140
141         Assertion failure !node || node->isElementNode() in
142         WebCore::RenderBlock::inlineElementContinuation
143   
144         https://bugs.webkit.org/show_bug.cgi?id=108829
145         <rdar://problem/13666405>
146   
147         I can't reproduce this assertion failure, but there seems to be an
148         invalid assumption in RenderBlock::inlineElementContinuation() that
149         anything with the "isInline()" bit set is a RenderInline.
150         
151         No new test because the test case in the bug does not repro for me.
152
153         Reviewed by Brent Fulgham.
154
155         * rendering/RenderBlock.cpp:
156         (WebCore::RenderBlock::inlineElementContinuation):
157         Dave Hyatt says that this function should only return RenderInline
158         objects (not non-RenderInline inline objects), so update the checks
159         from isInline() to isRenderInline() before casting with
160         toRenderInline().
161
162         * rendering/RenderInline.cpp:
163         (WebCore::RenderInline::inlineElementContinuation):
164         Ditto.
165
166 2014-04-14  Andreas Kling  <akling@apple.com>
167
168         Do more things under memory pressure on non-iOS platforms.
169         <https://webkit.org/b/131625>
170
171         Reviewed by Antti Koivisto.
172
173         Rename hasReceivedMemoryPressure() to isUnderMemoryPressure() and
174         make it use std::atomic<bool> instead of OSAtomic primitives.
175
176         Unmask most of the PLATFORM(IOS) blocks so all platforms can take
177         advantage of optimizations done while under pressure. Note that
178         isUnderMemoryPressure() will still always return false on platforms
179         other than iOS/WK1, but this will change soon.
180
181         * history/PageCache.cpp:
182         (WebCore::PageCache::canCache):
183         * loader/FrameLoader.cpp:
184         (WebCore::FrameLoader::commitProvisionalLoad):
185         * page/FrameView.cpp:
186         (WebCore::FrameView::willPaintContents):
187         (WebCore::FrameView::didPaintContents):
188         * platform/MemoryPressureHandler.cpp:
189         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
190         * platform/MemoryPressureHandler.h:
191         (WebCore::MemoryPressureHandler::isUnderMemoryPressure):
192         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
193         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
194         (WebCore::MemoryPressureHandler::clearMemoryPressure):
195         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
196         (WebCore::MemoryPressureHandler::hasReceivedMemoryPressure): Deleted.
197         * platform/graphics/FontCache.cpp:
198         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
199         * platform/ios/LegacyTileCache.mm:
200         (WebCore::LegacyTileCache::createTilesInActiveGrid):
201         * platform/ios/LegacyTileGrid.mm:
202         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
203         * platform/ios/LegacyTileLayerPool.mm:
204         (WebCore::LegacyTileLayerPool::addLayer):
205         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
206         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
207
208 2014-04-14  Beth Dakin  <bdakin@apple.com>
209
210         RenderLayerCompositor's m_layerForOverhangAreas should be offset by the 
211         topContentInset
212         https://bugs.webkit.org/show_bug.cgi?id=131632
213         -and corresponding-
214         <rdar://problem/16609602>
215
216         Reviewed by Tim Horton.
217
218         Offset m_layerForOverhangAreas by the topContentInset. 
219         * rendering/RenderLayerCompositor.cpp:
220         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
221
222 2014-04-14  Alexey Proskuryakov  <ap@apple.com>
223
224         Eliminate CachedFrame::m_mousePressNode
225         https://bugs.webkit.org/show_bug.cgi?id=131626
226
227         Reviewed by Brady Eidson.
228
229         I couldn't find any observable effect of this change.
230
231         * history/CachedFrame.cpp:
232         (WebCore::CachedFrameBase::CachedFrameBase):
233         (WebCore::CachedFrameBase::restore):
234         (WebCore::CachedFrame::clear):
235         * history/CachedFrame.h:
236         (WebCore::CachedFrame::documentLoader):
237         (WebCore::CachedFrame::mousePressNode): Deleted.
238         Eliminated m_mousePressNode, accessor, and code that reached out to EventHandler.
239
240         * page/EventHandler.cpp:
241         (WebCore::EventHandler::mousePressNode): Deleted.
242         (WebCore::EventHandler::setMousePressNode): Deleted.
243         * page/EventHandler.h:
244         (WebCore::EventHandler::setMousePressed): Deleted. This function was already unused.
245
246 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
247
248         Run filter animations in the UI process with UI-side compositing
249         https://bugs.webkit.org/show_bug.cgi?id=131199
250         <rdar://problem/16479487>
251
252         Reviewed by Sam Weinig.
253
254         Add FilterOperation::clone() which is used during decoding.
255         Export some things.
256
257         * WebCore.exp.in:
258         * platform/graphics/filters/FilterOperation.h:
259
260 2014-04-14  Jer Noble  <jer.noble@apple.com>
261
262         Use after free in WebCore::CachedResourceHandleBase::~CachedResourceHandleBase / WebCore::removeDetachedChildrenInContainer
263         https://bugs.webkit.org/show_bug.cgi?id=131169
264
265         Reviewed by Eric Carlson.
266
267         Invalidate the WebCoreAVFResourceLoader owned by MediaPlayerPrivateAVFoundationObjC
268         in its destructor, to prevent a private function being called in response to the
269         WebCoreAVFResourceLoader being stopped.
270
271         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
272         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
273         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
274         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
275         (WebCore::WebCoreAVFResourceLoader::invalidate):
276
277 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
278
279         [WK2 iOS] Scrolling to anchor links is broken
280         https://bugs.webkit.org/show_bug.cgi?id=131618
281         <rdar://problem/16599144>
282
283         Reviewed by Tim Horton.
284
285         Have ScrollingTreeScrollingNode pass RequestedScrollPosition updates
286         to the scrolling tree, so that the scrolling tree can have custom behavior
287         for them if necessary.
288
289         * page/scrolling/ScrollingTree.h:
290         (WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
291         * page/scrolling/ScrollingTreeScrollingNode.cpp:
292         (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
293         * page/scrolling/ScrollingTreeScrollingNode.h:
294
295 2014-04-14  Brian J. Burg  <burg@cs.washington.edu>
296
297         Web Replay: memoize fallback time values for document.lastModified
298         https://bugs.webkit.org/show_bug.cgi?id=131318
299
300         Reviewed by Joseph Pecoraro.
301
302         If a document's Last-Modified header can't be found or used, then 
303         document.lastModified is derived from the current system time or
304         from filesystem data, which is obviously nondeterministic.
305
306         It's better to handle this inside Document::lastModified rather than using
307         MemoizedDOMResult, because only the fallback case is nondeterministic.
308
309         Test: http/tests/inspector/replay/document-last-modified-fallback-value.html
310
311         * dom/Document.cpp:
312         (WebCore::Document::lastModified): Save or reuse memoized fallback value.
313         * replay/WebInputs.json: Add input DocumentLastModifiedDate.
314
315 2014-04-12  Antti Koivisto  <antti@apple.com>
316
317         Keep secondary tile grid for zoomed-out scale
318         https://bugs.webkit.org/show_bug.cgi?id=131586
319
320         Reviewed by Darin Adler.
321
322         * platform/graphics/ca/GraphicsLayerCA.cpp:
323         (WebCore::GraphicsLayerCA::updateContentsScale):
324         
325             Don't repaint tiled backing with setNeedsDisplay, it invalidates itself correctly in setContentsScale.
326             Update custom child layers when tiled backing scale changes.
327
328         * platform/graphics/ca/mac/TileController.h:
329         * platform/graphics/ca/mac/TileController.mm:
330         (WebCore::TileController::TileController):
331         (WebCore::TileController::setNeedsDisplay):
332         
333             Drop the whole zoomed-out grid on full repaint.
334
335         (WebCore::TileController::setNeedsDisplayInRect):
336             
337             Drop changed zoomed-out tiles. A more sophisticated strategy is possible.
338
339         (WebCore::TileController::setContentsScale):
340         
341             Swap the zoomed-out grid in and out as needed.
342             Repaint the active grid after scale change so the client does not have to.
343
344         (WebCore::TileController::contentsScale):
345         
346             Get the content scale from the tile grid so it is not kept in two places.
347
348         (WebCore::TileController::zoomedOutContentsScale):
349         (WebCore::TileController::setZoomedOutContentsScale):
350         
351             Drop the zoomed-out grid if it no longer matches the zoomed-out scale.
352
353         (WebCore::TileController::tileRevalidationTimerFired):
354         (WebCore::TileController::retainedTileBackingStoreMemory):
355         (WebCore::TileController::containerLayers):
356         
357             Return both zoomed-out tiles and the active tiles. Active tiles are on top.
358
359         (WebCore::TileController::numberOfUnparentedTiles):
360         (WebCore::TileController::removeUnparentedTilesNow):
361         * platform/graphics/ca/mac/TileGrid.h:
362         * platform/graphics/ca/mac/TileGrid.mm:
363         (WebCore::TileGrid::dropTilesInRect):
364         
365             Add a function for dropping tiles.
366
367         (WebCore::TileGrid::revalidateTiles):
368
369 2014-04-14  Oliver Hunt  <oliver@apple.com>
370
371         Update test result
372
373         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
374         (WebCore::JSTestNondeterministicConstructor::finishCreation):
375
376 2014-04-14  Dirk Schulze  <krit@webkit.org>
377
378         Optimize Canvas fill and drawImage with SourceIn, DestinationIn, SourceOut, and DestinationAtop using transparencyLayer.
379         https://bugs.webkit.org/show_bug.cgi?id=79659
380
381         Reviewed by Darin Adler.
382
383         Optimize fill() and fillRect() operations in Canvas on composited contexts by
384         10 to 20 times on CG.
385
386         Replacing the ImageBuffer code by transparency layers allows the
387         graphics library to optimize the drawing.
388
389         Doing the same for drawImage() would give performance regressions.
390
391         An inline function will create a transparency layer for CG. Cairo graphics
392         does not composite correctly when a transparency layer gets created. 
393         The inline function is just a NOOP for Cairo.
394
395         This fixes bug 131303 as well.
396
397         Added performance tests with r167124 already.
398
399         * html/canvas/CanvasRenderingContext2D.cpp:
400         (WebCore::CanvasRenderingContext2D::fillInternal):
401         (WebCore::CanvasRenderingContext2D::strokeInternal):
402         (WebCore::CanvasRenderingContext2D::beginCompositeLayer):
403         (WebCore::CanvasRenderingContext2D::endCompositeLayer):
404         (WebCore::CanvasRenderingContext2D::fillRect):
405         (WebCore::CanvasRenderingContext2D::strokeRect):
406         (WebCore::CanvasRenderingContext2D::drawTextInternal):
407         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill): Deleted.
408         * html/canvas/CanvasRenderingContext2D.h:
409
410 2014-04-14  Tim Horton  <timothy_horton@apple.com>
411
412         Lots of compositing test failures after r167152
413         https://bugs.webkit.org/show_bug.cgi?id=131574
414
415         Reviewed by Darin Adler.
416
417         * platform/graphics/GraphicsLayer.cpp:
418         (WebCore::dumpChildren):
419         (WebCore::GraphicsLayer::dumpProperties):
420         Make child-dumping recursive so that we can easily skip layers up to any depth.
421
422 2014-04-14  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
423
424         Fix incorrect indentations in CodeGeneratorJS.pm introduced in r165521
425         https://bugs.webkit.org/show_bug.cgi?id=131613
426
427         Reviewed by Csaba Osztrogonác.
428
429         * bindings/scripts/CodeGeneratorJS.pm:
430         (GenerateImplementation):
431         Fixed 5-space indentation.
432         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
433         Updated the tests accordingly.
434
435 2014-04-14  Manuel Rego Casasnovas  <rego@igalia.com>
436
437         [JSC] CSSStyleDeclaration report incorrect descriptor
438         https://bugs.webkit.org/show_bug.cgi?id=89697
439
440         Reviewed by Benjamin Poulain.
441
442         Change descriptor of CSSStyleDeclaration properties in order to have
443         writable and enumerable attributes set to true. Configurable is kept to
444         false since the property is not deleteable.
445
446         Test: fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html
447
448         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
449         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate): Only set
450         DontDelete attribute when creating the descriptor for
451         CSSStyleDeclaration properties.
452
453 2014-04-14  Benjamin Poulain  <benjamin@webkit.org>
454
455         [JSC] Improve the call site of string comparison in some hot path
456         https://bugs.webkit.org/show_bug.cgi?id=131605
457
458         Reviewed by Darin Adler.
459
460         * dom/NodeRareData.h:
461         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
462         We should use the right comparison operation depending on the Hash Traits.
463
464 2014-04-14  Andreas Kling  <akling@apple.com>
465
466         Merge MemoryPressureHandler{Mac,IOS}.mm
467         <https://webkit.org/b/131603>
468
469         Join the iOS and Mac platform implementations of MemoryPressureHandler
470         under the shared Cocoa banner. Each platform still has its own quirky
471         behavior, but this puts them in the same file so we can start sharing.
472
473         Reviewed by Darin Adler.
474
475         * WebCore.xcodeproj/project.pbxproj:
476         * platform/cocoa/MemoryPressureHandlerCocoa.mm: Renamed from Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm.
477         (WebCore::MemoryPressureHandler::platformReleaseMemory):
478         (WebCore::MemoryPressureHandler::install):
479         (WebCore::MemoryPressureHandler::uninstall):
480         (WebCore::MemoryPressureHandler::holdOff):
481         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
482         (WebCore::respondToMemoryPressureCallback):
483         (WebCore::MemoryPressureHandler::installMemoryReleaseBlock):
484         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
485         (WebCore::MemoryPressureHandler::hasReceivedMemoryPressure):
486         (WebCore::MemoryPressureHandler::clearMemoryPressure):
487         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
488         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
489         * platform/ios/MemoryPressureHandlerIOS.mm: Removed.
490
491 2014-04-14  Benjamin Poulain  <benjamin@webkit.org>
492
493         CSS JIT: compile the :nth-child() pseudo class
494         https://bugs.webkit.org/show_bug.cgi?id=131602
495
496         Reviewed by Andreas Kling.
497
498         Tests: fast/selectors/nth-child-bounds.html
499                fast/selectors/nth-child-with-backtracking.html
500
501         Compile the :nth-child() pseudo class function + some related clean up.
502
503         * css/CSSSelector.cpp:
504         (WebCore::CSSSelector::nthA):
505         (WebCore::CSSSelector::nthB):
506         Expose the parsed value of an+b filters. Those values are used to compile
507         the selector.
508
509         (WebCore::CSSSelector::RareData::parseNth):
510         While working on the patch, I discovered some severe issues with the parsing of large
511         values of a and/or b. The problem comes from the way the CSS parser handle the values:
512         the values are parsed as a double then converted to an AtomicString for CSSSelector.
513
514         There are many problems related to large values but we never got bug reports because
515         they are very uncommon. Fixing those problem would require changing the parser.
516
517         Here, CSSSelector::RareData::parseNth() is hardened a little bit to avoid absurd values
518         of a and b.
519
520         * css/CSSSelector.h:
521         * cssjit/RegisterAllocator.h:
522         It looks like I forgot RDX in the list of register. Add it now since it is required
523         for SelectorCodeGenerator::modulo().
524
525         * cssjit/SelectorCompiler.cpp:
526         (WebCore::SelectorCompiler::addPseudoType):
527         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
528         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
529         (WebCore::SelectorCompiler::SelectorCodeGenerator::moduloIsZero):
530         There is no modulo() operation exposed on the macro assemblers. This is a basic
531         implementation on top of idiv for x86_64.
532
533         Since idiv works exclusively with RAX and RDX, most of the code is about getting
534         those registers efficiently.
535
536         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
537         (WebCore::SelectorCompiler::setElementChildIndex):
538         (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle):
539         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
540         This is pretty much a straightforward implementation of :nth-child().
541         The first part counts the number of previous elements.
542         The second part updates the tree if this is style resolution.
543         The last part compares the number of previous siblings to an+b to find if the filter matches.
544
545         The only part that diverges from SelectorChecker is how childIndex is used. Instead of testing it
546         at every iteration, only the first iteration handle the cache.
547
548         * dom/ElementRareData.h:
549         (WebCore::ElementRareData::childIndexMemoryOffset):
550         * dom/Node.h:
551         (WebCore::Node::rareDataMemoryOffset):
552         (WebCore::Node::flagHasRareData):
553         * rendering/style/RenderStyle.h:
554
555 2014-04-14  Tim Horton  <timothy_horton@apple.com>
556
557         Support setting a background color on page overlays
558         https://bugs.webkit.org/show_bug.cgi?id=131600
559
560         Reviewed by Darin Adler.
561
562         * rendering/RenderLayerCompositor.cpp:
563         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer):
564         Mark the compositing tree as needing a rebuild when we get a new document-relative
565         overlay layer; otherwise we were depending on something else coming along and
566         requiring a rebuild, which didn't always happen.
567
568 2014-04-14  Mihnea Ovidenie  <mihnea@adobe.com>
569
570         [CSS Regions] Hit testing doesn't work in video
571         https://bugs.webkit.org/show_bug.cgi?id=131485
572
573         Reviewed by Andrei Bucur.
574
575         When hit testing flow thread layer through the region layer,
576         we have to pass the depth sorting information and take that
577         into account for the situation in which an ancestor of the region
578         has preserve-3d transform style.
579
580         Test: fast/regions/hit-test-region-preserve3d-container.html
581
582         * rendering/RenderLayer.cpp:
583         (WebCore::RenderLayer::hitTestLayer):
584         (WebCore::RenderLayer::hitTestFlowThreadIfRegionForFragments):
585         * rendering/RenderLayer.h:
586
587 2014-04-13  Darin Adler  <darin@apple.com>
588
589         userVisibleString should not try to "encode" host names
590         https://bugs.webkit.org/show_bug.cgi?id=131587
591         rdar://problem/14686849
592
593         Reviewed by Alexey Proskuryakov.
594
595         * WebCore.exp.in: Updated for WebCoreNSURLExtras argument type changes.
596
597         * platform/mac/WebCoreNSURLExtras.h: Removed unneeded code to make this
598         Objective-C++ header compile in plain C++ files, which we never need to do.
599         Added missing argument name, baseURL, and changed mysterious CFIndex arguments
600         to the correct type, CFURLComponentType.
601
602         * platform/mac/WebCoreNSURLExtras.mm:
603         (WebCore::isLookalikeCharacter): Removed the inline keyword from this, and added
604         more lookalike characters from the Mozilla list referenced here.
605         (WebCore::URLByTruncatingOneCharacterBeforeComponent): Updated argument type.
606         (WebCore::dataForURLComponentType): Ditto.
607         (WebCore::userVisibleString): Only call mapHostNames if host name decoding is
608         needed; no encoding here.
609
610 2014-04-13  Darin Adler  <darin@apple.com>
611
612         REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
613         https://bugs.webkit.org/show_bug.cgi?id=126322
614
615         Reviewed by Ryosuke Niwa.
616
617         * dom/Element.cpp:
618         (WebCore::Element::canContainRangeEndPoint): Now returns false when the role of the element
619         is "img". This is the same rule that's hard-coded in isRenderReplacedElement for the same
620         reason. Need more test coverage to make sure this role feature works consistently.
621
622         * dom/Element.h: Made canContainRangeEndPoint no longer inline since it's not just a
623         return statement any more.
624
625         * dom/Position.cpp:
626         (WebCore::Position::isCandidate): Took out code that calls isRendererReplacedElement
627         that was added in r158617; not needed now that we updated canContainRangeEndPoint.
628
629         * dom/Range.cpp:
630         (WebCore::Range::firstNode): Removed code here that called isRendererReplacedElement.
631         This was the wrong level to be adding editing logic, and there's a FIXME here to that
632         effect, which we are now deleting. This was the change that broke Find.
633
634         * editing/TextIterator.cpp: Added a comment about the redundancy between the
635         isRendererReplacedElement and editingIgnoresContent functions.
636
637         * html/HTMLHRElement.cpp:
638         (WebCore::HTMLHRElement::canContainRangeEndPoint): Call through to base class instead
639         of just returning true when we have child nodes. Lets Element::canContainRangeEndPoint
640         do its thing.
641         * html/HTMLHRElement.h: Ditto.
642
643         * html/HTMLObjectElement.cpp:
644         (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to base class instead
645         of just returning true when we have fallback content. Lets Element::canContainRangeEndPoint
646         do its thing.
647         * html/HTMLObjectElement.h: Ditto.
648
649         * testing/Internals.cpp:
650         (WebCore::Internals::countMatchesForText): Set the limit to 1000 instead of infinite.
651
652 2014-04-12  Darin Adler  <darin@apple.com>
653
654         Use unique_ptr for FillLayer::m_next
655         https://bugs.webkit.org/show_bug.cgi?id=75222
656
657         Reviewed by Dan Bernstein.
658
659         * css/DeprecatedStyleBuilder.cpp:
660         (WebCore::ApplyPropertyFillLayer::applyInheritValue):
661         Renamed currChild to just child and prevChild to previousChild.
662         Changed code to pass ownership of the new FillLayer immediately.
663         Changed some loops to be for loops.
664         (WebCore::ApplyPropertyFillLayer::applyInitialValue): Ditto.
665         (WebCore::ApplyPropertyFillLayer::applyValue): Ditto.
666
667         * rendering/RenderBox.cpp:
668         (WebCore::RenderBox::backgroundHasOpaqueTopLayer): Use reference
669         instead of pointer.
670         (WebCore::RenderBox::paintFillLayers): Ditto.
671         * rendering/RenderBoxModelObject.cpp:
672         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
673
674         * rendering/style/FillLayer.cpp:
675         (WebCore::FillLayer::FillLayer): Removed m_next initializer since it is now an
676         OwnPtr and initializes automatically. In a couple other places, changed m_next
677         initializer to use make_unique.
678         (WebCore::FillLayer::~FillLayer): Wrote loop for deletion of m_next.
679         (WebCore::FillLayer::operator=): Removed unneeded explicit deletion of m_next.
680         (WebCore::FillLayer::cullEmptyLayers): Ditto.
681         (WebCore::clipMax): Marked inline.
682         (WebCore::FillLayer::computeClipMax): Rewrote to use a loop instead of recursion.
683         (WebCore::FillLayer::containsImage): Ditto.
684         (WebCore::FillLayer::imagesAreLoaded): Ditto.
685         (WebCore::FillLayer::hasOpaqueImage): Rewrote to use && instead of multiple if.
686         (WebCore::FillLayer::hasImage): Rewrote to use a loop instead of recursion.
687         (WebCore::FillLayer::hasFixedImage): Ditto.
688
689         * rendering/style/FillLayer.h: Changed m_next to be a unique_ptr.
690
691 2014-04-13  Andy Estes  <aestes@apple.com>
692
693         [QuickLook] Move file system-related code into WebKit
694         https://bugs.webkit.org/show_bug.cgi?id=131597
695
696         Reviewed by Dan Bernstein.
697
698         QuickLookHandle should not be responsible for saving a copy of the
699         original document to disk as it might be running in a process that
700         either can't write to disk or can only write into a sandboxed
701         container. To account for this, we need to separate the concern of
702         quick look conversion from that of original document saving so that
703         each activity can run in the appropriate process.
704
705         Created a new interface between WebCore and WebKit by adding a client
706         (QuickLookHandleClient) to QuickLookHandle which is notified of incoming
707         bytes. A new function on FrameLoaderClient tells WebKit when a new
708         QuickLookHandle is created, giving WebKit the opportunity to register a
709         handle client. Moved the existing file system-related code as well as
710         code only needed by WebKit1 in QuickLookHandle into a new WebKit1
711         QuickLookHandleClient subclass.
712
713         * WebCore.exp.in:
714         * WebCore.xcodeproj/project.pbxproj: Made QuickLookHandleClient.h Private.
715         * loader/FrameLoaderClient.h:
716         (WebCore::FrameLoaderClient::didCreateQuickLookHandle): Added.
717         * loader/ResourceLoader.cpp:
718         (WebCore::ResourceLoader::didCreateQuickLookHandle): Called FrameLoaderClient::didCreateQuickLookHandle().
719         * loader/ResourceLoader.h:
720         * platform/network/ResourceHandle.h: Made m_quickLook a unique_ptr.
721         (WebCore::ResourceHandle::setQuickLookHandle): Changed to take a unique_ptr.
722         * platform/network/ResourceHandleClient.h:
723         (WebCore::ResourceHandleClient::didCreateQuickLookHandle): Added.
724         * platform/network/ios/QuickLook.h: Added m_client, gave m_converter a stronger type, and made m_nsResponse a RetainPtr.
725         (WebCore::QuickLookHandle::setClient): Added.
726         (WebCore::QuickLookHandle::firstRequestURL): Added.
727         (WebCore::QuickLookHandle::converter): Added.
728         * platform/network/ios/QuickLook.mm:
729         (WebCore::registerQLPreviewConverterIfNeeded):
730         (WebCore::createTemporaryFileForQuickLook): Made non-static.
731         (WebCore::emptyClient): Returned a shared empty QuickLookHandleClient.
732         (WebCore::QuickLookHandle::QuickLookHandle): Removed file system and WebKit1-only code.
733         (WebCore::QuickLookHandle::create): Changed to return a unique_ptr.
734         (WebCore::QuickLookHandle::nsResponse):
735         (WebCore::QuickLookHandle::didReceiveDataArray): Removed file system code and called QuickLookHandleClient::didReceiveDataArray() instead.
736         (WebCore::QuickLookHandle::didReceiveData): Removed file system code and called QuickLookHandleClient::didReceiveData() instead.
737         (WebCore::QuickLookHandle::didFinishLoading): Removed file system code and called QuickLookHandleClient::didFinishLoading() instead.
738         (WebCore::QuickLookHandle::didFail): Removed file system and WebKit1-only code, calling QuickLookHandleClient::didFail() instead.
739         (WebCore::QuickLookHandle::~QuickLookHandle): Removed file system and WebKit1-only code. Cleared our reference to m_client.
740         (WebCore::QuickLookHandle::previewFileName): Retrieved from m_converter.
741         (WebCore::QuickLookHandle::previewRequestURL): Ditto.
742         * platform/network/ios/QuickLookHandleClient.h: Added.
743         (WebCore::QuickLookHandleClient::~QuickLookHandleClient):
744         (WebCore::QuickLookHandleClient::didReceiveDataArray):
745         (WebCore::QuickLookHandleClient::didReceiveData):
746         (WebCore::QuickLookHandleClient::didFinishLoading):
747         (WebCore::QuickLookHandleClient::didFail):
748
749 2014-04-10  Pratik Solanki  <psolanki@apple.com>
750
751         Move early return out of dispatch_async() block so we can return from willSendRequest quickly
752         https://bugs.webkit.org/show_bug.cgi?id=131478
753         <rdar://problem/16575535>
754
755         Reviewed by Alexey Proskuryakov.
756
757         Do a quick check to see if we need to synthesize the redirect response on the dispatch queue
758         and return from willSendRequest callback quickly instead of always doing an effectively synchronous
759         call to the main thread. We can't call synthesizeRedirectResponseIfNecessary on the dispatch
760         queue since that accesses the ResourceRequest.
761
762         No new tests because no change in functionality.
763
764         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
765         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
766         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): Save the
767         request scheme to use later for early return from willSendRequest.
768         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
769
770 2014-04-08  Oliver Hunt  <oliver@apple.com>
771
772         Rewrite Function.bind as a builtin
773         https://bugs.webkit.org/show_bug.cgi?id=131083
774
775         Reviewed by Geoffrey Garen.
776
777         Switch WebCore to use the helper functions when defining the
778         prototype properties on DOM constructors, and update bindings
779         tests accordingly.
780
781         * bindings/js/JSImageConstructor.cpp:
782         (WebCore::JSImageConstructor::finishCreation):
783         * bindings/scripts/CodeGeneratorJS.pm:
784         (GenerateConstructorHelperMethods):
785         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
786         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
787         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
788         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
789         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
790         (WebCore::JSTestEventConstructorConstructor::finishCreation):
791         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
792         (WebCore::JSTestEventTargetConstructor::finishCreation):
793         * bindings/scripts/test/JS/JSTestException.cpp:
794         (WebCore::JSTestExceptionConstructor::finishCreation):
795         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
796         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
797         * bindings/scripts/test/JS/JSTestInterface.cpp:
798         (WebCore::JSTestInterfaceConstructor::finishCreation):
799         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
800         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
801         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
802         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
803         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
804         * bindings/scripts/test/JS/JSTestNode.cpp:
805         (WebCore::JSTestNodeConstructor::finishCreation):
806         * bindings/scripts/test/JS/JSTestObj.cpp:
807         (WebCore::JSTestObjConstructor::finishCreation):
808         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
809         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
810         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
811         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
812         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
813         (WebCore::JSTestTypedefsConstructor::finishCreation):
814         * bindings/scripts/test/JS/JSattribute.cpp:
815         (WebCore::JSattributeConstructor::finishCreation):
816         * bindings/scripts/test/JS/JSreadonly.cpp:
817         (WebCore::JSreadonlyConstructor::finishCreation):
818
819 2014-04-13  Simon Fraser  <simon.fraser@apple.com>
820
821         [iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
822         https://bugs.webkit.org/show_bug.cgi?id=131577
823
824         Reviewed by Tim Horton.
825
826         The call to scrollingCoordinator->frameViewRootLayerDidChange() was inside
827         a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
828         for WK2 we want to call this.
829
830         * loader/HistoryController.cpp:
831         (WebCore::HistoryController::restoreScrollPositionAndViewState):
832
833 2014-04-13  Zan Dobersek  <zdobersek@igalia.com>
834
835         Unreviewed build fix after r167196.
836
837         * platform/RemoteCommandListener.cpp:
838         (WebCore::RemoteCommandListener::create): Fall back to using the new operator
839         for allocating RemoteCommandListener object. Using std::make_unique() requires
840         for the operator to be public, which doesn't work well with the static create()
841         method.
842
843 2014-04-13  Zan Dobersek  <zdobersek@igalia.com>
844
845         Remove unnecessary uses of std::move() in return statements
846         https://bugs.webkit.org/show_bug.cgi?id=131457
847
848         Reviewed by Darin Adler.
849
850         Don't use std::move() in return statements unless necessary as it inhibits
851         named return value optimizations as performed by compilers.
852
853         * Modules/battery/BatteryManager.cpp:
854         (WebCore::BatteryManager::create):
855         * html/FormController.cpp:
856         (WebCore::FormController::createSavedFormStateMap):
857         * html/canvas/WebGLRenderingContext.cpp:
858         (WebCore::WebGLRenderingContext::create):
859         * platform/RemoteCommandListener.cpp:
860         (WebCore::RemoteCommandListener::create):
861         * platform/graphics/ca/GraphicsLayerCA.cpp:
862         (WebCore::GraphicsLayer::create):
863         * platform/ios/RemoteCommandListenerIOS.mm:
864         (WebCore::RemoteCommandListener::create):
865         * rendering/RenderGrid.cpp:
866         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
867         * rendering/RenderLayer.cpp:
868         (WebCore::RenderLayer::setupFilters):
869         * rendering/style/CounterDirectives.cpp:
870         (WebCore::clone):
871
872 2014-04-13  Commit Queue  <commit-queue@webkit.org>
873
874         Unreviewed, rolling out r167168 and r167194.
875         https://bugs.webkit.org/show_bug.cgi?id=131589
876
877         Caused massive ASSERTION failures on the GTK Debug bot
878         (Requested by philn on #webkit).
879
880         Reverted changesets:
881
882         "[GTK] Add HighDPI support for non-accelerated compositing
883         contents"
884         https://bugs.webkit.org/show_bug.cgi?id=131562
885         http://trac.webkit.org/changeset/167168
886
887         "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
888         r167168."
889         http://trac.webkit.org/changeset/167194
890
891 2014-04-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
892
893         [GStreamer] No CORS support for media elements
894         https://bugs.webkit.org/show_bug.cgi?id=99037
895
896         Reviewed by Philippe Normand.
897
898         Added CORS access control check to media sources when crossorigin attribute is set.
899
900         Added getter to CORS access control check status (used to compute whether the stream is tainted or not).
901         Related test is http/tests/security/video-cross-origin-readback.html.
902
903         Disabled access to cross-origin streams that fail CORS check when crossorigin attribute is set.
904         Related test is http/tests/security/video-cross-origin-accessfailure.html.
905
906         Tests: http/tests/security/video-cross-origin-accessfailure.html
907                http/tests/security/video-cross-origin-accesssameorigin.html
908
909         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
910         (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck): Return whether media is cross-origin (tainted) or not by querying the gstreamer source layer.
911         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added MediaPlayerPrivateGStreamer::didPassCORSAccessCheck declaration.
912         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
913         (webKitWebSrcStart): Passed CORS mode parameter to the streaming client. In case of CORS check failure, stop the resource loading.
914         (webKitSrcPassedCORSAccessCheck): Return whether CORS access control check was done and successful.
915         (StreamingClient::handleResponseReceived): Take a parameter to assign the CORS access control check result.
916         (CachedResourceStreamingClient::CachedResourceStreamingClient): Updated setting of the ResourceLoaderOptions according CORS mode.
917         (CachedResourceStreamingClient::responseReceived): Check CORS and pass result to handleResponseReceived.
918         (ResourceHandleStreamingClient::didReceiveResponse): No CORS check.
919         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Added webKitSrcPassedCORSAccessCheck declaration.
920
921 2014-04-12  Darin Adler  <darin@apple.com>
922
923         REGRESSION (r166860): ASSERTION FAILED: !isCalculated() on fast/css/image-set-value-not-removed-crash.html
924         https://bugs.webkit.org/show_bug.cgi?id=131480
925
926         Reviewed by Andreas Kling.
927
928         Fixes intermittent assertion failure in fast/css/image-set-value-not-removed-crash.html.
929
930         * css/CSSComputedStyleDeclaration.cpp:
931         (WebCore::valueForImageSliceSide): Added. Helper used below in valueForNinePieceImageSlice.
932         Handles calculated values by returning 0; incorrect but predictable.
933         (WebCore::valueForNinePieceImageSlice): Updated to call valueForImageSliceSide.
934         (WebCore::positionOffsetValue): Use nullptr.
935         (WebCore::ComputedStyleExtractor::propertyValue): Updated to call positionOffsetValue
936         by its new name. Removed "get" from the name.
937         (WebCore::positionOffsetValue): Renamed from getPositionOffsetValue.
938
939         * platform/Length.h: Made isCalculated public.
940
941 2014-04-12  Andy Estes  <aestes@apple.com>
942
943         Fix the iOS build after r167183.
944
945         * platform/network/ResourceHandle.h:
946         * platform/network/cf/ResourceHandleCFNet.cpp:
947         (WebCore::ResourceHandle::schedule):
948         (WebCore::ResourceHandle::unschedule):
949
950 2014-04-12  Andy Estes  <aestes@apple.com>
951
952         [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
953         https://bugs.webkit.org/show_bug.cgi?id=131580
954
955         Reviewed by Darin Adler.
956
957         There's no need to bloat WebKit1's ResourceLoader with a pointer that
958         only WebKit2's WebResourceLoader cares about.
959
960         * loader/ResourceLoader.h:
961         (WebCore::ResourceLoader::quickLookHandle): Deleted.
962         (WebCore::ResourceLoader::setQuickLookHandle): Deleted.
963
964 2014-04-12  Chris Fleizach  <cfleizach@apple.com>
965
966         AX: Cleanup AccessibilityObject::getAttribute
967         https://bugs.webkit.org/show_bug.cgi?id=131555
968
969         Reviewed by Darin Adler.
970
971         No new functionality.
972
973         * accessibility/AccessibilityObject.cpp:
974         (WebCore::AccessibilityObject::getAttribute):
975
976 2014-04-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
977
978         [SOUP] Libsoup internal credential setting should be controlled by loader decision
979         https://bugs.webkit.org/show_bug.cgi?id=130963
980
981         Reviewed by Darin Adler.
982
983         Disabled libsoup internal authentication manager for messages for which no credential is available and no stored credentials should be used.
984         Updated synchronous loader to return whether using credentials or not according StoredCredential loader option parameter.
985         Unskipped test http/tests/xmlhttprequest/cross-origin-no-authorization.html covers the patch.
986
987         * platform/network/ResourceHandleInternal.h:
988         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Added m_useAuthenticationManager boolean to control whether disable authentication manager or not.
989         * platform/network/soup/ResourceHandleSoup.cpp:
990         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Added m_storedCredentials member.
991         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage): Return true if stored credentials are allowed.
992         (WebCore::applyAuthenticationToRequest): Set m_useAuthenticationManager value to disable authentication manager if cannot use stored credentials and ResourceHandleInternal has no username and password.
993         (WebCore::createSoupMessageForHandleAndRequest): Disable authentication mananger according m_useAuthenticationManager value.
994         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Added StoredCredentials loader option to the sync loader constructor.
995
996 2014-04-11  Darin Adler  <darin@apple.com>
997
998         Some small loader refinements and refactoring
999         https://bugs.webkit.org/show_bug.cgi?id=131541
1000
1001         Reviewed by Alexey Proskuryakov.
1002
1003         Cut down on use of ResourceLoader::handle, which always returns null when
1004         using a network process. Also streamlined conditionals and did some other
1005         small refactoring.
1006
1007         * loader/DocumentLoader.h: Use references rather than pointers for SchedulePair.
1008
1009         * loader/ResourceLoader.cpp:
1010         (WebCore::ResourceLoader::didChangePriority): Use m_handle instead of handle(),
1011         since we'd like to delete handle() entirely soon.
1012         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Ditto.
1013         (WebCore::ResourceLoader::schedule): Added.
1014         (WebCore::ResourceLoader::unschedule): Ditto.
1015         * loader/ResourceLoader.h: Rearranged header to eliminate nested conditionals.
1016         Added schedule and unschedule functions for Mac.
1017
1018         * loader/mac/DocumentLoaderMac.cpp:
1019         (WebCore::scheduleAll): Changed to take a reference and call ResourceLoader::schedule.
1020         (WebCore::unscheduleAll): Ditto.
1021         (WebCore::DocumentLoader::schedule): Ditto.
1022         (WebCore::DocumentLoader::unschedule): Ditto.
1023
1024         * page/mac/PageMac.cpp:
1025         (WebCore::Page::addSchedulePair): Pass a reference rather than a pointer to schedule.
1026         (WebCore::Page::removeSchedulePair): Ditto.
1027
1028         * platform/network/ResourceHandle.h: Did a bit of reformatting and reorganizing of
1029         conditionals.
1030
1031         * platform/network/ResourceHandleInternal.h: Removed a tiny bit of unneeded declaration.
1032
1033         * platform/network/mac/ResourceHandleMac.mm:
1034         (WebCore::ResourceHandle::schedule): Updated to take a reference rather than a pointer.
1035         (WebCore::ResourceHandle::unschedule): Ditto.
1036
1037 2014-04-11  Andreas Kling  <akling@apple.com>
1038
1039         Make NodeList.length inline-cacheable by JSC.
1040         <https://webkit.org/b/131579>
1041
1042         For objects with custom index or name getters, we have to make sure
1043         that builtin properties take precedence. We do this by scanning the
1044         ancestor chain for a suitable property slot before moving on to
1045         named items.
1046
1047         With this patch, we now mark such builtins as cacheable. This is
1048         safe since the whole point of doing this before processing named
1049         items is to ensure the same slot is returned consistently.
1050
1051         Reviewed by Benjamin Poulain.
1052
1053         * bindings/scripts/CodeGeneratorJS.pm:
1054         (GenerateGetOwnPropertySlotBody):
1055
1056 2014-04-11  Tim Horton  <timothy_horton@apple.com>
1057
1058         Lots of compositing test failures after r167152
1059         https://bugs.webkit.org/show_bug.cgi?id=131574
1060
1061         Reviewed by Simon Fraser.
1062
1063         * platform/graphics/GraphicsLayer.cpp:
1064         (WebCore::GraphicsLayer::dumpProperties):
1065         We were asking the parent's client whether the child should be dumped,
1066         but really the child's client is the one who should decide.
1067
1068 2014-04-11  Benjamin Poulain  <bpoulain@apple.com>
1069
1070         ViewportConfiguration::layoutWidth() compute the width incorrectly when initial-scale+width do not fit in view
1071         https://bugs.webkit.org/show_bug.cgi?id=131575
1072
1073         Reviewed by Enrica Casucci.
1074
1075         I made a mistake when writing the new viewport code: ViewportConfiguration::layoutWidth() uses m_contentSize in one place.
1076         That make no sense, contentSize depends on the layout width.
1077
1078         * page/ViewportConfiguration.cpp:
1079         (WebCore::ViewportConfiguration::layoutWidth):
1080
1081 2014-04-11  Andreas Kling  <akling@apple.com>
1082
1083         Remove "numeric index getter" stuff from bindings code generator.
1084         <https://webkit.org/b/131565>
1085
1086         This was used for an earlier generation of typed arrays. Now that JSC
1087         has native typed array support, we're not using this functionality and
1088         can just remove it.
1089
1090         Reviewed by Geoffrey Garen.
1091
1092         * bindings/scripts/CodeGeneratorJS.pm:
1093         (GenerateGetOwnPropertySlotBody):
1094         (HasComplexGetOwnProperty):
1095         (InterfaceRequiresAttributesOnInstance):
1096         (InstanceOverridesGetOwnPropertySlot):
1097         (GenerateHeader):
1098         (GenerateImplementation):
1099
1100 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
1101
1102         Web Replay: consolidate decoding macros used in SerializationMethods
1103         https://bugs.webkit.org/show_bug.cgi?id=131564
1104
1105         Reviewed by Timothy Hatcher.
1106
1107         We can use EncodingTraits<T>::DecodedType to create a local variable
1108         with the appropriate decoded type, rather than special casing.
1109
1110         * replay/SerializationMethods.cpp:
1111         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
1112         (JSC::EncodingTraits<KeypressCommand>::decodeValue):
1113         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
1114         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue):
1115         (JSC::EncodingTraits<PlatformWheelEvent>::decodeValue):
1116         (JSC::EncodingTraits<PluginData>::decodeValue):
1117
1118 2014-04-11  Beth Dakin  <bdakin@apple.com>
1119
1120         Need WK2 API to disable rubber-banding
1121         https://bugs.webkit.org/show_bug.cgi?id=131567
1122
1123         Reviewed by Simon Fraser.
1124
1125         Page will now store a vertical and horizontal ScrollElasticity in case the API has 
1126         been called before the FrameView even exists.
1127
1128         New Page functions.
1129         * WebCore.exp.in:
1130
1131         Use Page’s cached ScrollElasticity.
1132         * page/FrameView.cpp:
1133         (WebCore::FrameView::FrameView):
1134
1135         If there is already a FrameView, then assign it the new ScrollElasticity.
1136         * page/Page.cpp:
1137         (WebCore::Page::Page):
1138         (WebCore::Page::setVerticalScrollElasticity):
1139         (WebCore::Page::setHorizontalScrollElasticity):
1140         * page/Page.h:
1141         (WebCore::Page::verticalScrollElasticity):
1142         (WebCore::Page::horizontalScrollElasticity):
1143
1144 2014-04-11  Martin Robinson  <mrobinson@igalia.com>
1145
1146         REGRESSION(167145): Many media tests fail
1147         https://bugs.webkit.org/show_bug.cgi?id=131569
1148
1149         Reviewed by Brent Fulgham.
1150
1151         * PlatformGTK.cmake: Add the localized strings file to the list of user agent scripts.
1152         * platform/gtk/RenderThemeGtk.cpp:
1153         (WebCore::RenderThemeGtk::mediaControlsScript): Include the localized strings file in the script body.
1154
1155 2014-04-11  Tim Horton  <timothy_horton@apple.com>
1156
1157         [iOS WebKit2] Find-in-page indicator
1158         https://bugs.webkit.org/show_bug.cgi?id=131510
1159         <rdar://problem/16547777>
1160
1161         Reviewed by Simon Fraser and Enrica Casucci.
1162
1163         * editing/Editor.cpp:
1164         (WebCore::Editor::findString):
1165         * editing/FindOptions.h:
1166         Add a find option which prevents WebCore from revealing the selection
1167         after selecting a successful find match.
1168
1169 2014-04-11  Owen Taylor  <otaylor@redhat.com>
1170
1171         [GTK] Add HighDPI support for non-accelerated compositing contents
1172         https://bugs.webkit.org/show_bug.cgi?id=131562
1173
1174         Reviewed by Martin Robinson.
1175
1176         No new tests. This will be tested once we have the proper dependencies in the WebKit testing
1177         JHBuild.
1178
1179         * platform/cairo/WidgetBackingStore.h:
1180         (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
1181         * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
1182         * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
1183         * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
1184         * platform/graphics/cairo/CairoUtilities.h:
1185         * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
1186         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
1187         * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
1188
1189 2014-04-11  Jon Honeycutt  <jhoneycutt@apple.com>
1190
1191         Assertion failure changing select element size during focus event
1192         dispatch
1193         <https://bugs.webkit.org/show_bug.cgi?id=131566>
1194         <rdar://problem/16400735>
1195
1196         Reviewed by Andy Estes.
1197
1198         Test: fast/forms/select-change-size-during-focus.html
1199
1200         * html/HTMLSelectElement.cpp:
1201         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1202         Adopt the fix from Chromium r171216; check that the renderer is still
1203         of the expected type, and return early if it is not.
1204
1205 2014-04-11  Bem Jones-Bey  <bjonesbe@adobe.com>
1206
1207         Clear sibling floats while splitting inline flow
1208         https://bugs.webkit.org/show_bug.cgi?id=130905
1209
1210         Reviewed by David Hyatt.
1211
1212         This is a port of a Blink patch by kenrb@chromium.org.
1213         (https://src.chromium.org/viewvc/blink?revision=169658&view=revision)
1214
1215         During RenderInline::splitFlow(), floats are cleared on an anonymous
1216         containingBlock() for the inline being split. This is a problem if
1217         siblings of the block contain references to the same floats, since the
1218         float removal code in markSiblingsWithFloatsForLayout() will not later
1219         find them.
1220
1221         This change also affects RenderBlock::splitFlow() and
1222         RenderBoxModelObject::moveChildrenTo, since those are called in
1223         similar situations as RenderInline::splitFlow().
1224
1225         Test: fast/block/float/split-inline-sibling-of-float-crash.html
1226
1227         * rendering/RenderBlockFlow.cpp:
1228         (WebCore::RenderBlockFlow::removeFloatingObjects): Add call to
1229             markSiblingsWithFloatsForLayout() before removing floats.
1230
1231 2014-04-11  Gavin Barraclough  <baraclough@apple.com>
1232
1233         Rollout - Rewrite Function.bind as a builtin
1234         https://bugs.webkit.org/show_bug.cgi?id=131083
1235
1236         Unreviewed.
1237
1238         Rolling out r167020 while investigating a performance regression.
1239
1240         * bindings/js/JSImageConstructor.cpp:
1241         (WebCore::JSImageConstructor::finishCreation):
1242         * bindings/scripts/CodeGeneratorJS.pm:
1243         (GenerateConstructorHelperMethods):
1244         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1245         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1246         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1247         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1248         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1249         (WebCore::JSTestEventConstructorConstructor::finishCreation):
1250         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1251         (WebCore::JSTestEventTargetConstructor::finishCreation):
1252         * bindings/scripts/test/JS/JSTestException.cpp:
1253         (WebCore::JSTestExceptionConstructor::finishCreation):
1254         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1255         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1256         * bindings/scripts/test/JS/JSTestInterface.cpp:
1257         (WebCore::JSTestInterfaceConstructor::finishCreation):
1258         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1259         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1260         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1261         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1262         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1263         * bindings/scripts/test/JS/JSTestNode.cpp:
1264         (WebCore::JSTestNodeConstructor::finishCreation):
1265         * bindings/scripts/test/JS/JSTestObj.cpp:
1266         (WebCore::JSTestObjConstructor::finishCreation):
1267         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1268         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1269         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1270         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1271         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1272         (WebCore::JSTestTypedefsConstructor::finishCreation):
1273         * bindings/scripts/test/JS/JSattribute.cpp:
1274         (WebCore::JSattributeConstructor::finishCreation):
1275         * bindings/scripts/test/JS/JSreadonly.cpp:
1276         (WebCore::JSreadonlyConstructor::finishCreation):
1277
1278 2014-04-11  Myles C. Maxfield  <mmaxfield@apple.com>
1279
1280         Build Fix after r167151.
1281
1282         Unreviewed.
1283
1284         * editing/AlternativeTextController.cpp:
1285         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1286
1287 2014-04-10  Jer Noble  <jer.noble@apple.com>
1288
1289         [EME][Mac] Using KeySession.update([renew]) should trigger KeyMessage event instead of NeedKey event
1290         https://bugs.webkit.org/show_bug.cgi?id=131527
1291
1292         Reviewed by Eric Carlson.
1293
1294         Rather than triggering a needKey() event, necessatating the creation
1295         of an entirely new MediaKeySession, cause a new key request to be
1296         created by sending the same initData back into the AVSampleDataParser.
1297
1298         Also, do some drive-by clean up suggested by Darin in the review for
1299         r166509.
1300
1301         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1302         (WebCore::isEqual): Support an alloc-free equality check between
1303             Uint8Array and static strings.
1304         (WebCore::CDMSessionMediaSourceAVFObjC::update):
1305
1306 2014-04-11  David Kilzer  <ddkilzer@apple.com>
1307
1308         Build fix (r167151): Do not dereference Node::document() before passing to Range::create()
1309         <https://webkit.org/b/131475>
1310
1311         Fixes the following build failure:
1312
1313             WebCore/editing/AlternativeTextController.cpp:275:71: error: indirection requires pointer operand ('WebCore::Document' invalid)
1314                 int paragraphStartIndex = TextIterator::rangeLength(Range::create(*rootNode.document(), &rootNode, 0, paragraphRangeContainingCorrection.get()->startContainer(), paragraphRangeContainingCorrection.get()->startOffset()).get());
1315                                                                                   ^~~~~~~~~~~~~~~~~~~~
1316
1317         * editing/AlternativeTextController.cpp:
1318         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1319         Remove unneeded '*' operator since Node::document() returns a
1320         Document& and Range::create() accepts a Document& for its first
1321         argument.
1322
1323 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
1324
1325         Web Replay: memoize nondeterministic attributes of the Navigator interface
1326         https://bugs.webkit.org/show_bug.cgi?id=131340
1327
1328         Reviewed by Timothy Hatcher.
1329
1330         Most attributes of window.navigator do not change very often, but they
1331         could be easily changed by the user or embedder. So, memoize attribute values.
1332
1333         This change does not include navigator.mimeTypes and navigator.plugins,
1334         which will be handled at a different level. <https://webkit.org/b/131341>
1335
1336         Test: ManualTests/inspector/replay-window-navigator-basic.html
1337
1338         * page/Navigator.idl: Add Nondeterministic attribute.
1339
1340 2014-04-10  Jer Noble  <jer.noble@apple.com>
1341
1342         [iOS][WK2] Videos should animate into and out of fullscreen.
1343         https://bugs.webkit.org/show_bug.cgi?id=131497
1344
1345         Reviewed by Simon Fraser.
1346
1347         Use AVPlayerViewController's new enterFullScreenWithCompletionHandler: and exitFullScreenWithCompletionHandler:
1348         methods to animate into and out of full screen. To do so, use the provided initialFrame and finalFrame screen
1349         rects to correctly place the AVPlayerViewController's view before entering or exiting fullscreen.
1350
1351         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1352         (-[WebVideoFullscreenController enterFullscreen:]): Pass the media element's screen rect.
1353         (-[WebVideoFullscreenController exitFullscreen]): Ditto.
1354         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1355         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1356         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Renamed from shouldDismissWithReason.
1357         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Use the new AVKit APIs.
1358         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Ditto.
1359         * WebCore.exp.in: Modify the exported symbols for enter and exitFullscreen.
1360
1361 2014-04-11  Tim Horton  <timothy_horton@apple.com>
1362
1363         Support document-relative and custom-frame page overlays
1364         https://bugs.webkit.org/show_bug.cgi?id=131560
1365         <rdar://problem/16595556>
1366
1367         Reviewed by Simon Fraser.
1368
1369         * WebCore.exp.in:
1370         * rendering/RenderLayerCompositor.cpp:
1371         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1372         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1373         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer):
1374         * rendering/RenderLayerCompositor.h:
1375         Add the concept of a document overlay layer, which is plugged in as the
1376         last child of the root content layer. Expose it to WebKit2.
1377
1378 2014-04-09  Myles C. Maxfield  <mmaxfield@apple.com>
1379
1380         Autocorrection causes ASSERT when replacing alternative string
1381         https://bugs.webkit.org/show_bug.cgi?id=131475
1382
1383         Reviewed by Ryosuke Niwa.
1384
1385         In AlternativeTextController::applyAlternativeTextToRange(), we attempt to create
1386         a Range that crosses from outside of a shadow root to inside of one. Instead,
1387         we should keep the Range entirely within the shadow root.
1388
1389         Test: ManualTests/autocorrection/autocorrection-accept-crash.html
1390
1391         * editing/AlternativeTextController.cpp:
1392         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1393
1394 2014-04-11  Hans Muller  <hmuller@adobe.com>
1395
1396         [CSS Shapes] shape-outside from image doesn't load properly
1397         https://bugs.webkit.org/show_bug.cgi?id=131491
1398
1399         Reviewed by Bem Jones-Bey.
1400
1401         Make RenderImage::imageChanged() call super if there's a shape-outside
1402         image because the shape-outside imageChanged() logic is in RenderBox.
1403
1404         Test: http/tests/css/shape-image-file.html
1405
1406         * rendering/RenderElement.h:
1407         (WebCore::RenderElement::hasShapeOutside):
1408         * rendering/RenderImage.cpp:
1409         (WebCore::RenderImage::imageChanged):
1410
1411 2014-04-11  Brady Eidson  <beidson@apple.com>
1412
1413         Aggregate multiple "respondToChangedSelection" calls to one scan for telephone numbers
1414         https://bugs.webkit.org/show_bug.cgi?id=131559
1415
1416         Reviewed by Gavin Barraclough.
1417
1418         No new tests (Perf-only change to an untested feature)
1419
1420         * editing/Editor.cpp:
1421         (WebCore::Editor::Editor):
1422         (WebCore::Editor::respondToChangedSelection): Start a one shot timer for scanSelectionForTelephoneNumbers
1423           instead of scanning synchronously.
1424         (WebCore::Editor::scanSelectionForTelephoneNumbers):
1425         * editing/Editor.h:
1426
1427 2014-04-11  Antti Koivisto  <antti@apple.com>
1428
1429         Try to fix windows build.
1430         
1431         * platform/graphics/ca/GraphicsLayerCA.h:
1432
1433 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
1434
1435         Unreviewed follow-up for r167145
1436
1437         * English.lproj/mediaControlsLocalizedStringsiOS.js:
1438         (mediaControlsLocalizedStringsiOS): Use smart-quote in
1439         message string.
1440
1441 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
1442
1443         Regression: media controls and status messages are no longer localized.
1444         https://bugs.webkit.org/show_bug.cgi?id=120956
1445
1446         Reviewed by Jer Noble.
1447
1448         * English.lproj/mediaControlsLocalizedStrings.js: Added.
1449         (mediaControlsLocalizedStrings): Moved from mediaControlsApple.js.
1450         * English.lproj/mediaControlsLocalizedStringsiOS.js: Added.
1451         (mediaControlsLocalizedStringsiOS): Moved from mediaControlsiOS.js.
1452         * Modules/mediacontrols/mediaControlsApple.js:
1453         (Controller.prototype.UIString): Get strings from external file.
1454         * Modules/mediacontrols/mediaControlsiOS.js:
1455         (ControllerIOS.prototype.UIString): Ditto.
1456         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Copy to Windows bundle.
1457         * WebCore.xcodeproj/project.pbxproj: Copy new files to bundle.
1458         * rendering/RenderThemeIOS.mm:
1459         (WebCore::RenderThemeIOS::mediaControlsScript): Load the locale-specific
1460         string resource when loading the media controls.
1461         * rendering/RenderThemeMac.mm:
1462         (WebCore::RenderThemeMac::mediaControlsScript): Ditto.
1463         * rendering/RenderThemeWin.cpp:
1464         (WebCore::RenderThemeWin::mediaControlsScript): Ditto.
1465
1466 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
1467
1468         [Win] Build fix after r167138
1469
1470         * platform/graphics/ca/GraphicsLayerCA.h: The TileController is
1471         only available on Mac/Cocoa builds.
1472
1473 2014-04-11  Mark Lam  <mark.lam@apple.com>
1474
1475         JSMainThreadExecState::call() should clear exceptions before returning.
1476         <https://webkit.org/b/131530>
1477
1478         Reviewed by Geoffrey Garen.
1479
1480         Test: fast/dom/regress-131530.html
1481
1482         Previously, JSMainThreadExecState::call() did not clear any pending
1483         exceptions in the VM before returning.  On returning, the
1484         JSMainThreadExecState destructor may re-enter the VM to notify
1485         MutationObservers.  This may result in a crash because the VM expects
1486         exceptions to be cleared at entry.
1487
1488         We now change JSMainThreadExecState::call() to return the exception
1489         (if present) via an argument, and clear it from the VM before returning.
1490
1491         As part of this change, I updated various parts of the code base to use the
1492         new API as needed.
1493
1494         * bindings/js/JSCallbackData.cpp:
1495         (WebCore::JSCallbackData::invokeCallback):
1496         * bindings/js/JSCustomXPathNSResolver.cpp:
1497         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1498         * bindings/js/JSDOMGlobalObjectTask.cpp:
1499         - Assert that there's no unhandled exception after the Microtask returns.
1500           See comment for WebCore::JSMainThreadExecState::runTask below for more
1501           details.
1502
1503         * bindings/js/JSErrorHandler.cpp:
1504         (WebCore::JSErrorHandler::handleEvent):
1505         * bindings/js/JSEventListener.cpp:
1506         (WebCore::JSEventListener::handleEvent):
1507         * bindings/js/JSHTMLDocumentCustom.cpp:
1508         (WebCore::JSHTMLDocument::open):
1509         - Document.open() cannot be the first function on the JS stack.  Hence,
1510           there is no need to use JSMainThreadExecState to call into the VM, as
1511           this is only needed to catch the event of returning from the first
1512           function for the purpose of notifying MutationObservers.  Change to
1513           call JSC::call() directly.
1514
1515         * bindings/js/JSMainThreadExecState.cpp:
1516         (WebCore::functionCallHandlerFromAnyThread):
1517         * bindings/js/JSMainThreadExecState.h:
1518         (WebCore::JSMainThreadExecState::call):
1519         (WebCore::JSMainThreadExecState::evaluate):
1520         - Remove the explicitly acquisition of the JSLock here because we now
1521           acquire the JSLock as part of the JSMainThreadExecState instance.
1522         (WebCore::JSMainThreadExecState::runTask):
1523         - Added an assert to verify that the task does not return with an
1524           unhandled exception.  Currently, the only Microtask in use is for the
1525           Promise implementation, which will eat the exception before returning.
1526           This assertion is added here to verify that this contract does not
1527           inadvertantly change in the future.
1528         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
1529         - Now acquires the JSLock as well since by definition, we're only
1530           instantiating the JSMainThreadExecState because we're about to enter
1531           the VM.
1532
1533         * bindings/js/JSMutationCallback.cpp:
1534         (WebCore::JSMutationCallback::call):
1535         * bindings/js/JSNodeFilterCondition.cpp:
1536         (WebCore::JSNodeFilterCondition::acceptNode):
1537         - acceptNode() is only used in the TreeWalker and NodeIterator APIs which
1538           cannot be the first function on the JS stack.  Hence, we should call
1539           JSC::call() directly instead of going through JSMainThreadExecState.
1540
1541         * bindings/js/ScheduledAction.cpp:
1542         (WebCore::ScheduledAction::executeFunctionInContext):
1543         * bindings/objc/WebScriptObject.mm:
1544         (WebCore::addExceptionToConsole):
1545         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1546
1547 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
1548
1549         Web Replay: CodeGeneratorJS should guard includes of replay-related headers
1550         https://bugs.webkit.org/show_bug.cgi?id=131407
1551
1552         Reviewed by Timothy Hatcher.
1553
1554         This patch adds guards to headers that are only required by generated replay code
1555         that is itself guarded. Other ports probably haven't added the headers to their
1556         build files, so we don't want to emit the unused header includes.
1557
1558         This patch also converts generated uses of DEFINE_STATIC_LOCAL to NeverDestroyed<T>.
1559         Finally, a new bindings test was added to document changes to generated replay code.
1560
1561         Test: Source/WebCore/bindings/scripts/test/TestNondeterministic.idl
1562
1563         * bindings/scripts/CodeGeneratorJS.pm:
1564         (GenerateImplementation):
1565         (GenerateImplementationFunctionCall):
1566
1567         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp: Added.
1568         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h: Added.
1569         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.symbols: Added.
1570         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministicPrivate.h: Added.
1571         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added.
1572         * bindings/scripts/test/JS/JSTestNondeterministic.h: Added.
1573         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h: Added.
1574         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm: Added.
1575         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h: Added.
1576         * bindings/scripts/test/TestNondeterministic.idl: Added.
1577
1578 2014-04-11  Antti Koivisto  <antti@apple.com>
1579
1580         Pipe initial scale factor to TileController
1581         https://bugs.webkit.org/show_bug.cgi?id=131521
1582
1583         Reviewed by Tim Horton.
1584
1585         * WebCore.exp.in:
1586         * page/Page.cpp:
1587         (WebCore::Page::Page):
1588         (WebCore::Page::setZoomedOutPageScaleFactor):
1589         * page/Page.h:
1590         (WebCore::Page::zoomedOutPageScaleFactor):
1591         * platform/graphics/GraphicsLayerClient.h:
1592         (WebCore::GraphicsLayerClient::zoomedOutPageScaleFactor):
1593         * platform/graphics/TiledBacking.h:
1594         * platform/graphics/ca/GraphicsLayerCA.cpp:
1595         (WebCore::GraphicsLayerCA::updateContentsScale):
1596         * platform/graphics/ca/GraphicsLayerCA.h:
1597         * platform/graphics/ca/mac/TileController.h:
1598         * platform/graphics/ca/mac/TileController.mm:
1599         (WebCore::TileController::TileController):
1600         (WebCore::TileController::setContentsScale):
1601         (WebCore::TileController::setZoomedOutContentsScale):
1602         * rendering/RenderLayerBacking.cpp:
1603         (WebCore::RenderLayerBacking::zoomedOutPageScaleFactor):
1604         * rendering/RenderLayerBacking.h:
1605         * rendering/RenderLayerCompositor.cpp:
1606         (WebCore::RenderLayerCompositor::zoomedOutPageScaleFactor):
1607         * rendering/RenderLayerCompositor.h:
1608
1609 2014-04-10  Chris Fleizach  <cfleizach@apple.com>
1610
1611         Heap-use-after-free in WebCore::SpeechSynthesisUtterance::startTime
1612         https://bugs.webkit.org/show_bug.cgi?id=131482
1613
1614         Reviewed by David Kilzer.
1615
1616         Hold onto the utterance until it has time to fire, in case other references have been removed.
1617
1618         Merged from Blink r171077 by <dmazzoni@chromium.org>
1619
1620         Test: platform/mac/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html
1621
1622         * Modules/speech/SpeechSynthesis.cpp:
1623         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
1624
1625 2014-04-11  Zan Dobersek  <zdobersek@igalia.com>
1626
1627         Avoid Vector copies in RenderGrid::placeItemsOnGrid()
1628         https://bugs.webkit.org/show_bug.cgi?id=131452
1629
1630         Reviewed by Sergio Villar Senin.
1631
1632         * rendering/RenderGrid.cpp:
1633         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Take in a const reference to the
1634         Vector object. Make the for-loop that iterates through it range-based.
1635         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Ditto.
1636         * rendering/RenderGrid.h:
1637
1638 2014-04-11  Joseph Pecoraro  <pecoraro@apple.com>
1639
1640         Web Inspector: Remove shared PageScriptDebugServer, create per-Page
1641         https://bugs.webkit.org/show_bug.cgi?id=131523
1642
1643         Reviewed by Timothy Hatcher.
1644
1645         Having a shared PageScriptDebugServer was causing issues when we called
1646         JSC::Debugger::clearBreakpoints() closing one inspector while another
1647         is open for another WebCore::Page in the same process. Having the same
1648         JSC::Debugger underlying multiple InspectorDebuggerAgent instances
1649         means that when clearBreakpoints is called, the real JSC breakpoints
1650         underlying other InspectorDebuggerAgent's get removed. When those
1651         InspectorDebuggerAgents attempt to remove their breakpoints they
1652         encounter unexpected issues.
1653
1654         This entirely rebuilds PageScriptDebugServer to be per-Page instead
1655         of shared across all pages. So take this opportunity to move the
1656         file from WebCore/bindings/js to WebCore/inspector.
1657
1658         * CMakeLists.txt:
1659         * WebCore.vcxproj/WebCore.vcxproj:
1660         * WebCore.vcxproj/WebCore.vcxproj.filters:
1661         * WebCore.xcodeproj/project.pbxproj:
1662         * bindings/js/JSBindingsAllInOne.cpp:
1663         * bindings/js/PageScriptDebugServer.h: Removed.
1664         * inspector/InspectorAllInOne.cpp:
1665         Move PageScriptDebugServer.
1666
1667         * inspector/InspectorController.h:
1668         * inspector/InspectorController.cpp:
1669         (WebCore::InspectorController::InspectorController):
1670         Set the ScriptDebugServer directly on some other agents that
1671         were previously using the global debug server.
1672
1673         * inspector/InspectorProfilerAgent.h:
1674         (WebCore::InspectorProfilerAgent::scriptDebugServer):
1675         * inspector/InspectorProfilerAgent.cpp:
1676         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1677         (WebCore::InspectorProfilerAgent::setScriptDebugServer):
1678         (WebCore::InspectorProfilerAgent::start):
1679         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend): Deleted.
1680         * inspector/InspectorTimelineAgent.h:
1681         * inspector/InspectorTimelineAgent.cpp:
1682         (WebCore::InspectorTimelineAgent::start):
1683         (WebCore::InspectorTimelineAgent::stop):
1684         (WebCore::InspectorTimelineAgent::setPageScriptDebugServer):
1685         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1686         Refactor these two agents to take in a script debug server.
1687         The server is expected to be set during initialization and
1688         to always be valid (like debug server on RuntimeAgent).
1689
1690         * inspector/PageDebuggerAgent.h:
1691         * inspector/PageDebuggerAgent.cpp:
1692         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
1693         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
1694         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1695         (WebCore::PageDebuggerAgent::scriptDebugServer):
1696         Have PageDebuggerAgent hold the PageScriptDebugServer.
1697         Update for the simplified interfaces.
1698
1699         * inspector/PageScriptDebugServer.h: Added.
1700         * inspector/PageScriptDebugServer.cpp: Renamed from Source/WebCore/bindings/js/PageScriptDebugServer.cpp.
1701         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1702         (WebCore::PageScriptDebugServer::addListener):
1703         (WebCore::PageScriptDebugServer::removeListener):
1704         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1705         (WebCore::PageScriptDebugServer::didPause):
1706         (WebCore::PageScriptDebugServer::didContinue):
1707         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
1708         (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
1709         (WebCore::PageScriptDebugServer::isContentScript):
1710         (WebCore::PageScriptDebugServer::reportException):
1711         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1712         Model after JSGlobalObjectScriptDebugServer, the PageScriptDebugServer
1713         holds a reference to a Page.
1714
1715 2014-04-11  Bear Travis  <betravis@adobe.com>
1716
1717         [CSS Shapes] inset args and radial args should serialize to the simplest form
1718         https://bugs.webkit.org/show_bug.cgi?id=129825
1719
1720         Reviewed by Dirk Schulze.
1721
1722         Modify inset serialization to omit components where possible. The insets simplify
1723         according to the margin shorthand, while the corner radii simplify according to
1724         the border-radius shorthand.
1725
1726         Modifying existing parsing tests.
1727
1728         * css/CSSBasicShapes.cpp:
1729         (WebCore::buildInsetRadii): Add the necessary radii, omitting components where possible.
1730         (WebCore::buildInsetString): Omit components where possible.
1731
1732 2014-04-11  Praveen R Jadhav  <praveen.j@samsung.com>
1733
1734         "playbackTime" parameter is not present in AudioProcessingEvent Interface as per W3C spec
1735         https://bugs.webkit.org/show_bug.cgi?id=105518
1736
1737         Reviewed by Jer Noble.
1738
1739         Attribute "playbackTime" in AudioProcessingEvent implemented to pass playback time of
1740         audiobuffer associated with ScriptProcessorNode of the context.
1741  
1742         Reference: https://codereview.chromium.org/210973002
1743
1744         Spec: http://www.w3.org/TR/webaudio/#AudioProcessingEvent
1745
1746         Test: webaudio/audioprocessingevent.html
1747
1748         * Modules/webaudio/AudioProcessingEvent.cpp:
1749         (WebCore::AudioProcessingEvent::create):
1750         (WebCore::AudioProcessingEvent::AudioProcessingEvent):
1751         * Modules/webaudio/AudioProcessingEvent.h:
1752         (WebCore::AudioProcessingEvent::playbackTime):
1753         * Modules/webaudio/AudioProcessingEvent.idl:
1754         * Modules/webaudio/ScriptProcessorNode.cpp:
1755         (WebCore::ScriptProcessorNode::fireProcessEvent):
1756
1757 2014-04-11  Zalan Bujtas  <zalan@apple.com>
1758
1759         Subpixel rendering: WK1: Trail of cruft in redraw during animations.
1760         https://bugs.webkit.org/show_bug.cgi?id=131525
1761
1762         Reviewed by Simon Fraser.
1763
1764         Use enclosing rect instead of snapping to make sure the repaint rect always
1765         covers the dirty area when painting is requested in a non-compositing RenderView.
1766         This only applies to WK1 as WK2 has compositing RenderView and the repainting 
1767         is managed by RenderLayerBacking.
1768
1769         This is a temporary solution until after ScrollView/FrameView/RenderView
1770         is transitioned to device pixels. (tracked here: webkit.org/b/131526).
1771
1772         Test: fast/repaint/hidpi-block-width-change-leaves-cruft.html
1773
1774         * rendering/RenderView.cpp:
1775         (WebCore::RenderView::repaintViewRectangle):
1776
1777 2014-04-10  Dean Jackson  <dino@apple.com>
1778
1779         WebGL: need error checking after texture uploads
1780         https://bugs.webkit.org/show_bug.cgi?id=62902
1781         rdar://problem/9640309
1782
1783         Reviewed by Brent Fulgham.
1784
1785         A followup to Darin's r167109. We need to also check for errors
1786         in the texImage2D case.
1787
1788         This is difficult to reproducibly test because it would require
1789         attempting to exhaust GPU memory.
1790
1791         * html/canvas/WebGLRenderingContext.cpp:
1792         (WebCore::WebGLRenderingContext::compressedTexImage2D): Check for errors by calling
1793         moveErrorsToSyntheticErrorList twice, once before and once after. If an error
1794         occurred, explicitly mark the texture as invalid.
1795         (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
1796         * html/canvas/WebGLTexture.cpp:
1797         (WebCore::WebGLTexture::markInvalid): If the LevelInfo exists for this
1798         mipmap level, then set the valid flag to false. There is a chance that
1799         a previous call to texImage2D succeeded for this level, but it's probably
1800         better to assume that is now invalid.
1801         * html/canvas/WebGLTexture.h: New markInvalid method.
1802
1803 2014-04-10  Darin Adler  <darin@apple.com>
1804
1805         WebGL: need error checking after texture and buffer uploads in some cases
1806         https://bugs.webkit.org/show_bug.cgi?id=62902
1807         rdar://problem/9640309
1808
1809         Reviewed by Dean Jackson.
1810
1811         Not clear how to write a test for this.
1812
1813         * html/canvas/WebGLBuffer.cpp:
1814         (WebCore::WebGLBuffer::disassociateBufferData): Added.
1815         * html/canvas/WebGLBuffer.h: Added disassociateBufferData.
1816
1817         * html/canvas/WebGLRenderingContext.cpp:
1818         (WebCore::WebGLRenderingContext::bufferData): Check for errors by calling
1819         moveErrorsToSyntheticErrorList twice, once before and once after. If an error
1820         occurred, call the WebGLBuffer so it doesn't think it has data.
1821         (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
1822
1823         * platform/graphics/GraphicsContext3D.h: Added moveErrorsToSyntheticErrorList.
1824
1825         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1826         (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList): Added. Calls
1827         glError and moves any errors to the synthetic error list.
1828         (WebCore::GraphicsContext3D::getError): Added call to moveErrorsToSyntheticErrorList
1829         to preserve error ordering.
1830         (WebCore::GraphicsContext3D::synthesizeGLError): Ditto.
1831
1832 2014-04-10  Enrica Casucci  <enrica@apple.com>
1833
1834         iOS build fix to deal with CoreText changes.
1835         
1836         Reviewed by Benjamin Poulain.
1837         
1838         This is a temporary fix until CT fixes the issue.
1839
1840         * rendering/RenderThemeIOS.mm:
1841
1842 2014-04-10  Commit Queue  <commit-queue@webkit.org>
1843
1844         Unreviewed, rolling out r167073.
1845         https://bugs.webkit.org/show_bug.cgi?id=131516
1846
1847         This patch caused crashes in video tests. (Requested by
1848         mrobinson on #webkit).
1849
1850         Reverted changeset:
1851
1852         "[GStreamer] No CORS support for media elements"
1853         https://bugs.webkit.org/show_bug.cgi?id=99037
1854         http://trac.webkit.org/changeset/167073
1855
1856 2014-04-10  Beth Dakin  <bdakin@apple.com>
1857
1858         Radio buttons are using the wrong sizes and margins
1859         https://bugs.webkit.org/show_bug.cgi?id=131503
1860
1861         Reviewed by Jer Noble.
1862
1863         This is a regression that I caused recently when I combined radio button and 
1864         checkbox code. 
1865         * platform/mac/ThemeMac.mm:
1866         (WebCore::paintToggleButton):
1867
1868 2014-04-08  Jon Honeycutt  <jhoneycutt@apple.com>
1869
1870         Assertion failure in WebCore::FlexBoxIterator::next()
1871         <https://bugs.webkit.org/show_bug.cgi?id=117176>
1872         <rdar://problem/14054549>
1873
1874         Code added in r115687 began removing anonymous wrappers when children
1875         become inline. However, there are some objects, like
1876         RenderDeprecatedFlexBox, whose children should always be blocks.
1877
1878         Reviewed by Tim Horton.
1879
1880         * rendering/RenderBlock.h:
1881         (WebCore::RenderBlock::canCollapseAnonymousBlockChild):
1882         Made public.
1883
1884         * rendering/RenderObject.cpp:
1885         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
1886         Return early if we can't collapse anonymous block children.
1887
1888 2014-04-07  Jon Honeycutt  <jhoneycutt@apple.com>
1889
1890         Assertion failure, !node || node->isElementNode(), in
1891         WebCore::RenderBlock::clone()
1892         <https://bugs.webkit.org/show_bug.cgi?id=110489>
1893         <rdar://problem/13666425>
1894
1895         Reviewed by Antti Koivisto.
1896
1897         We're ending up in RenderBlock::splitBlocks() with |this| ==
1898         |fromBlock|.  We then try to climb the ancestor block chain from
1899         this->parent() to |fromBlock|, but this->parent() is already above
1900         |fromBlock|, so we end up climbing up to the RenderView and trying to
1901         clone it, causing the assertion failure.
1902
1903         Adopt Chromium's mitigation for this from
1904         <https://codereview.chromium.org/13852041>. This is not intended as a
1905         fix for the underlying issue.
1906
1907         Also, fix another issue that occurs with this fuzzed test case that's
1908         not handled by the Chromium fix.
1909
1910         * rendering/RenderBlock.cpp:
1911         (WebCore::RenderBlock::splitBlocks):
1912         Ensure while we're in the loop that |curr| is a descendant of
1913         |fromBlock|. From the Chromium patch:
1914
1915             We need to check in every iteration of the loop because
1916             moveChildrenTo could have moved |curr|. This is a mitigation and
1917             not really a fix against a class of tree craziness.
1918
1919         Finally, before moving children from |fromBlock| to |toBlock|, ensure
1920         that the children are children of |fromBlock|. If we never entered the
1921         loop, they will be siblings of |fromBlock|, not children.
1922
1923 2014-04-10  Enrica Casucci  <enrica@apple.com>
1924
1925         Build fix after http://trac.webkit.org/changeset/167085.
1926
1927         Reviewed by Timothy Hatcher.
1928
1929         * plugins/PluginData.h:
1930
1931 2014-04-10  Zalan Bujtas  <zalan@apple.com>
1932
1933         Web Inspector: Breakpoint in gutter has clipped / broken border image.
1934         https://bugs.webkit.org/show_bug.cgi?id=131500
1935
1936         Reviewed by Joseph Pecoraro.
1937
1938         Typo in r166925.
1939
1940         Test: fast/borders/border-image-slice-missing-right.html
1941
1942         * rendering/RenderBoxModelObject.cpp:
1943         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1944
1945 2014-04-10  James Craig  <jcraig@apple.com>
1946
1947         Web Inspector: AXI: expose aria-busy state of current and ancestor nodes
1948         https://bugs.webkit.org/show_bug.cgi?id=130826
1949
1950         Reviewed by Timothy Hatcher.
1951
1952         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1953
1954         Expose if node is contained by any "busy" ancestor nodes, too.
1955
1956         * inspector/InspectorDOMAgent.cpp:
1957         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1958
1959 2014-04-10  Joseph Pecoraro  <pecoraro@apple.com>
1960
1961         Web Inspector: Remove unused ruler in overlay code
1962         https://bugs.webkit.org/show_bug.cgi?id=131507
1963
1964         Reviewed by Timothy Hatcher.
1965
1966         * inspector/InspectorDOMAgent.cpp:
1967         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
1968         * inspector/InspectorOverlay.cpp:
1969         (WebCore::buildObjectForHighlight):
1970         * inspector/InspectorOverlay.h:
1971         (WebCore::Highlight::Highlight):
1972         (WebCore::Highlight::setDataFromConfig):
1973         * inspector/InspectorOverlayPage.js:
1974         (_drawFragmentHighlight):
1975         (_drawRegionNumber): Deleted.
1976         (quadToPath): Deleted.
1977         (drawOutlinedQuad): Deleted.
1978         (pathCommand): Deleted.
1979         (drawPath): Deleted.
1980         (drawOutlinedQuadWithClip): Deleted.
1981         (quadEquals): Deleted.
1982         (drawGutter): Deleted.
1983         (drawNodeHighlight): Deleted.
1984         (drawQuadHighlight): Deleted.
1985         (setPlatform): Deleted.
1986         (dispatch): Deleted.
1987         (log): Deleted.
1988
1989 2014-04-10  Brian J. Burg  <burg@cs.washington.edu>
1990
1991         Web Replay: memoize plugin data for navigator.mimeTypes and navigator.plugins
1992         https://bugs.webkit.org/show_bug.cgi?id=131341
1993
1994         Reviewed by Timothy Hatcher.
1995
1996         Information about plugins and mime types is nondeterministic and can change
1997         at any time, whether by system events, browser settings changes, or
1998         triggered by script. To avoid interposing on all those code paths, just
1999         memoize the plugin data used by DOMPluginArray and DOMMimeTypeArray.
2000
2001         This is less efficient than controlling mutations to the underlying PluginData
2002         of a Page, but that can be done later if better plugin support is desired.
2003         The point of this change is to make analytics trackers deterministic across
2004         enabling/disabling of plugins.
2005
2006         Test: LayoutTests/inspector/window-navigator-plugins-memoized.hml
2007
2008         * plugins/DOMMimeTypeArray.cpp:
2009         (WebCore::DOMMimeTypeArray::getPluginData):
2010         * plugins/DOMPluginArray.cpp:
2011         (WebCore::DOMPluginArray::pluginData): Save or restore memoized plugin
2012         data during capture and replay, respectively.
2013
2014         * plugins/PluginData.h:
2015         (WebCore::PluginData::PluginData): Add a constructor that uses the
2016         provided plugin data rather than fetching live plugin data. This is
2017         marked protected so it's only used by a subclass specifically for
2018         deserialization.
2019
2020         * replay/SerializationMethods.cpp: Add encoder specializations.
2021         (JSC::EncodingTraits<MimeClassInfo>::encodeValue):
2022         (JSC::EncodingTraits<MimeClassInfo>::decodeValue):
2023         (JSC::EncodingTraits<PluginInfo>::encodeValue):
2024         (JSC::EncodingTraits<PluginInfo>::decodeValue):
2025         (JSC::EncodingTraits<PluginData>::encodeValue):
2026         (JSC::DeserializedPluginData::DeserializedPluginData): Add a custom
2027         subclass of PluginData that can be initialized from deserialized data.
2028         (JSC::EncodingTraits<PluginData>::decodeValue):
2029         * replay/SerializationMethods.h:
2030         * replay/WebInputs.json: Add new input FetchPluginData.
2031
2032 2014-04-10  Myles C. Maxfield  <mmaxfield@apple.com>
2033
2034         Remove "System Font" from character width calculations
2035         https://bugs.webkit.org/show_bug.cgi?id=131411
2036
2037         Reviewed by Tim Horton.
2038
2039         Covered by existing tests
2040
2041         * platform/graphics/Font.cpp:
2042         (WebCore::Font::hasValidAverageCharWidth):
2043
2044 2014-04-10  Bem Jones-Bey  <bjonesbe@adobe.com>
2045
2046         Invalid cast in WebCore::RenderLayer::setupClipPath
2047         https://bugs.webkit.org/show_bug.cgi?id=131368
2048
2049         Reviewed by Dirk Schulze.
2050
2051         Only attempt to clip to a box shape if the renderer being clipped is
2052         actually a box.
2053
2054         Test: css3/masking/clip-path-box-shape-on-inline-crash.html
2055
2056         * rendering/RenderLayer.cpp:
2057         (WebCore::RenderLayer::setupClipPath): Add isBox() check.
2058
2059 2014-04-10  Owen Taylor  <otaylor@redhat.com>
2060
2061         [GTK] Remove a comment that was incorrectly cut-and-pasted from WidgetBackingStoreCairo
2062         https://bugs.webkit.org/show_bug.cgi?id=131499
2063
2064         Reviewed by Martin Robinson.
2065
2066         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Remove a comment that was incorrectly copy and pasted
2067         from the Cairo implementation.
2068
2069 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
2070
2071         Eliminate DragSession structure
2072         https://bugs.webkit.org/show_bug.cgi?id=131465
2073
2074         Reviewed by Benjamin Poulain.
2075
2076         DragSession is really just a transient response to NSDragDestination delegate methods.
2077         The "session" name was quite misleading, and thankfully, we don't need a class for this
2078         bag of data at all.
2079
2080         * WebCore.xcodeproj/project.pbxproj:
2081         * page/DragController.cpp:
2082         (WebCore::DragController::DragController):
2083         (WebCore::DragController::dragEntered):
2084         (WebCore::DragController::dragUpdated):
2085         (WebCore::DragController::dragEnteredOrUpdated):
2086         (WebCore::DragController::tryDocumentDrag):
2087         * page/DragController.h:
2088         (WebCore::DragController::mouseIsOverFileInput):
2089         (WebCore::DragController::numberOfItemsToBeAccepted):
2090         * page/DragSession.h: Removed.
2091
2092 2014-04-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2093
2094         [GStreamer] No CORS support for media elements
2095         https://bugs.webkit.org/show_bug.cgi?id=99037
2096
2097         Reviewed by Philippe Normand.
2098
2099         Added CORS access control check to media sources when crossorigin attribute is set.
2100
2101         Added getter to CORS access control check status (used to compute whether the stream is tainted or not).
2102         Related test is http/tests/security/video-cross-origin-readback.html.
2103
2104         Disabled access to cross-origin streams that fail CORS check when crossorigin attribute is set.
2105         Related test is http/tests/security/video-cross-origin-accessfailure.html.
2106
2107         Tests: http/tests/security/video-cross-origin-accessfailure.html
2108                http/tests/security/video-cross-origin-accesssameorigin.html
2109
2110         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2111         (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck): Return whether media is cross-origin (tainted) or not by querying the gstreamer source layer.
2112         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added MediaPlayerPrivateGStreamer::didPassCORSAccessCheck declaration.
2113         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2114         (webKitWebSrcStart): Passed CORS mode parameter to the streaming client. In case of CORS check failure, stop the resource loading.
2115         (webKitSrcPassedCORSAccessCheck): Return whether CORS access control check was done and successful.
2116         (StreamingClient::handleResponseReceived): Take a parameter to assign the CORS access control check result.
2117         (CachedResourceStreamingClient::CachedResourceStreamingClient): Updated setting of the ResourceLoaderOptions according CORS mode.
2118         (CachedResourceStreamingClient::responseReceived): Check CORS and pass result to handleResponseReceived.
2119         (ResourceHandleStreamingClient::didReceiveResponse): No CORS check.
2120         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Added webKitSrcPassedCORSAccessCheck declaration.
2121
2122 2014-04-10  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2123
2124         Move UseJSC.cmake back to CMakeLists.txt
2125         https://bugs.webkit.org/show_bug.cgi?id=130834
2126
2127         Reviewed by Csaba Osztrogonác.
2128
2129         No new tests required.
2130
2131         * CMakeLists.txt:
2132         * UseJSC.cmake: Removed.
2133
2134 2014-04-09  Commit Queue  <commit-queue@webkit.org>
2135
2136         Unreviewed, rolling out r167046.
2137         https://bugs.webkit.org/show_bug.cgi?id=131479
2138
2139         Caused 300+ failures on Mavericks WK1 tester (Requested by ap
2140         on #webkit).
2141
2142         Reverted changeset:
2143
2144         "Remove "System Font" from whitelisted DRT fonts and char
2145         width calculations"
2146         https://bugs.webkit.org/show_bug.cgi?id=131411
2147         http://trac.webkit.org/changeset/167046
2148
2149 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2150
2151         Fix build failure.
2152         https://bugs.webkit.org/show_bug.cgi?id=131473
2153
2154         Reviewed by Dan Bernstein.
2155
2156         Fix build failure.
2157
2158         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2159         (mediaSelectionOptions):
2160
2161 2014-04-09  Enrica Casucci  <enrica@apple.com>
2162
2163         Unreviewed build fix after http://trac.webkit.org/changeset/167045
2164
2165         The file contained an invalid character.
2166
2167         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2168         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2169
2170 2014-04-09  Dean Jackson  <dino@apple.com>
2171
2172         [iOS] Media controls should resize as the user zooms
2173         https://bugs.webkit.org/show_bug.cgi?id=131322
2174
2175         Reviewed by Eric Carlson.
2176
2177         On iOS the media controls should remain the same size
2178         independent of user zoom. Have the HTMLMediaElement optionally
2179         register for updates in the page scale to apply an inverse
2180         scale.
2181
2182         * Modules/mediacontrols/MediaControlsHost.cpp: New exposed property that calls
2183         back into HTMLMediaElement::mediaControlsDependOnPageScaleFactor.
2184         (WebCore::MediaControlsHost::controlsDependOnPageScaleFactor):
2185         (WebCore::MediaControlsHost::setControlsDependOnPageScaleFactor):
2186         * Modules/mediacontrols/MediaControlsHost.h: Keep a reference to the actual
2187         controls from the JavaScript side so we can talk to it later.
2188         (WebCore::MediaControlsHost::controllerJSValue):
2189         (WebCore::MediaControlsHost::setControllerJSValue):
2190         * Modules/mediacontrols/MediaControlsHost.idl: Expose controlsDependOnPageScaleFactor.
2191
2192         * Modules/mediacontrols/mediaControlsiOS.css:
2193         (audio::-webkit-media-controls-panel): Specify the transform origin so that
2194         scaling will keep the controls pinned to the bottom left corner.
2195         (audio::-webkit-media-controls-start-playback-button): Update to the correct size
2196         and provide new artwork.
2197         (audio::-webkit-media-controls-start-playback-button.failed): New artwork.
2198         * Modules/mediacontrols/mediaControlsiOS.js:
2199         (ControllerIOS): Tell the host that these controls care about the page scale.
2200         (ControllerIOS.prototype.get pageScaleFactor): New getter.
2201         (ControllerIOS.prototype.set pageScaleFactor): When set, update the play button and the panel.
2202
2203         * html/HTMLMediaElement.cpp:
2204         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Small naming cleanup.
2205         (setPageScaleFactorProperty): Static helper to set a JS property value.
2206         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Keep a reference to the controls object,
2207         and make sure to set the page scale factor on the controls.
2208         (WebCore::HTMLMediaElement::pageScaleFactorChanged): Implement the callback, telling
2209         the controls object that it needs to relayout.
2210
2211 2014-04-09  Antti Koivisto  <antti@apple.com>
2212
2213         Try to fix iOS build.
2214
2215         * platform/graphics/ca/mac/TileController.mm:
2216
2217 2014-04-09  Andy Estes  <aestes@apple.com>
2218
2219         REGRESSION (r165908): ~QuickLookHandle() tries to dereference a null ResourceHandle
2220         https://bugs.webkit.org/show_bug.cgi?id=131467
2221
2222         Reviewed by Tim Horton.
2223
2224         QuickLookHandle stored a ResourceHandle pointer in order to later
2225         retrive the URL of its firstRequest(), but after r165908 we no longer
2226         always have a ResourceHandle. Since firstRequest()'s URL is the only
2227         thing we need from ResourceHandle, store it directly rather than a
2228         ResourceHandle pointer. In the case where we create a QuickLookHandle
2229         from a ResourceLoader rather than a ResourceHandle, pass the loader's
2230         originalRequest(), which represents the same request as firstRequest()
2231         (i.e. the request after willSendRequest() but before redirects).
2232
2233         * platform/network/ios/QuickLook.h:
2234         * platform/network/ios/QuickLook.mm:
2235         (WebCore::QuickLookHandle::QuickLookHandle):
2236         (WebCore::QuickLookHandle::create):
2237         (WebCore::QuickLookHandle::didFail):
2238         (WebCore::QuickLookHandle::~QuickLookHandle):
2239
2240 2014-04-09  James Craig  <jcraig@apple.com>
2241
2242         AX: Bug in AccessibilityNodeObject::helpText
2243         https://bugs.webkit.org/show_bug.cgi?id=130386
2244
2245         Reviewed by Chris Fleizach.
2246
2247         Test: accessibility/help-text.html
2248
2249         Ancestor loop was always checking attribute of original node rather than current node.
2250
2251         * accessibility/AccessibilityNodeObject.cpp:
2252         (WebCore::AccessibilityNodeObject::helpText):
2253
2254 2014-04-09  Chris Fleizach  <cfleizach@apple.com>
2255
2256         Regression: AX: list heuristics sometimes determined as presentational even when explicit roles applied
2257         https://bugs.webkit.org/show_bug.cgi?id=131041
2258
2259         Reviewed by Mario Sanchez Prada.
2260
2261         When display:table is used on a list item, it inserts RenderObjects that can be ignored as the children
2262         of the list. This allows normal list heuristics to be applied.
2263
2264         * accessibility/AccessibilityTableCell.cpp:
2265         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
2266
2267 2014-04-09  Antti Koivisto  <antti@apple.com>
2268
2269         TileGrid should be PlatformCALayerClient instead of TileController
2270         https://bugs.webkit.org/show_bug.cgi?id=131456
2271         
2272         Switch one more place to use removeTiles.
2273
2274         * platform/graphics/ca/mac/TileGrid.mm:
2275         (WebCore::TileGrid::revalidateTiles):
2276
2277 2014-04-09  Myles C. Maxfield  <mmaxfield@apple.com>
2278
2279         Remove "System Font" from whitelisted DRT fonts and char width calculations
2280         https://bugs.webkit.org/show_bug.cgi?id=131411
2281
2282         Reviewed by Tim Horton.
2283
2284         Covered by existing tests.
2285
2286         * platform/graphics/Font.cpp:
2287         (WebCore::Font::hasValidAverageCharWidth):
2288
2289 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2290
2291         Fullscreen does two view controller changes at once
2292         https://bugs.webkit.org/show_bug.cgi?id=131432
2293
2294         Reviewed by Eric Carlson.
2295
2296         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2297         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2298         delay -presentViewController on the main run loop to allow
2299         previous view controller change to complete.
2300
2301 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2302
2303         Enable fullscreen captions selection
2304         https://bugs.webkit.org/show_bug.cgi?id=131069
2305
2306         Reviewed by Eric Carlson.
2307
2308         Enable media selection options from fullscreen. i.e. captions.
2309
2310         * WebCore.exp.in:
2311         Add exports for 
2312         setAudioMediaSelectionOptions
2313         setLegibleMediaSelectionOptions
2314         selectAudioMediaOption
2315         selectLegibleMediaOption
2316
2317         * platform/ios/WebVideoFullscreenInterface.h:
2318         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
2319
2320         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2321         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
2322
2323         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2324         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
2325
2326         (-[WebAVPlayerController dealloc]):
2327         (-[WebAVPlayerController hasMediaSelectionOptions]):
2328         (+[WebAVPlayerController keyPathsForValuesAffectingHasMediaSelectionOptions]):
2329         (-[WebAVPlayerController hasAudioMediaSelectionOptions]):
2330         (+[WebAVPlayerController keyPathsForValuesAffectingHasAudioMediaSelectionOptions]):
2331         (-[WebAVPlayerController hasLegibleMediaSelectionOptions]):
2332         (+[WebAVPlayerController keyPathsForValuesAffectingHasLegibleMediaSelectionOptions]):
2333         (-[WebAVPlayerController currentAudioMediaSelectionOption]):
2334         (-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]):
2335         (-[WebAVPlayerController currentLegibleMediaSelectionOption]):
2336         (-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]):
2337         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
2338         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
2339         * platform/ios/WebVideoFullscreenModel.h:
2340         Add selectAudioMediaOption/selectLegibleMediaOption
2341
2342         * platform/ios/WebVideoFullscreenModelMediaElement.h:
2343         Add selectAudioMediaOption/selectLegibleMediaOption
2344
2345         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2346         Add selectAudioMediaOption/selectLegibleMediaOption
2347
2348         (WebVideoFullscreenModelMediaElement::setMediaElement):
2349         Send initial media selection options.
2350
2351         (WebVideoFullscreenModelMediaElement::selectAudioMediaOption):
2352         Will be implemented when audio track slection is implemented.
2353
2354         (WebVideoFullscreenModelMediaElement::selectLegibleMediaOption):
2355         Select corresponding text track on HTMLMediaElement.
2356
2357 2014-04-09  Antti Koivisto  <antti@apple.com>
2358
2359         TileGrid should be PlatformCALayerClient instead of TileController
2360         https://bugs.webkit.org/show_bug.cgi?id=131456
2361
2362         Reviewed by Tim Horton.
2363
2364         The client interface is for the tiles in the grid.
2365
2366         * platform/graphics/ca/mac/TileController.h:
2367         * platform/graphics/ca/mac/TileController.mm:
2368         (WebCore::TileController::setContentsScale):
2369         (WebCore::TileController::createTileLayer):
2370         (WebCore::TileController::platformCALayerPaintContents): Deleted.
2371         (WebCore::TileController::platformCALayerDeviceScaleFactor): Deleted.
2372         (WebCore::TileController::platformCALayerShowDebugBorders): Deleted.
2373         (WebCore::TileController::platformCALayerShowRepaintCounter): Deleted.
2374         (WebCore::TileController::platformCALayerIncrementRepaintCount): Deleted.
2375         * platform/graphics/ca/mac/TileGrid.h:
2376         
2377             Move repaint counter to TileGrid too.
2378
2379         * platform/graphics/ca/mac/TileGrid.mm:
2380         (WebCore::TileGrid::removeTiles):
2381         (WebCore::TileGrid::removeAllSecondaryTiles):
2382         (WebCore::TileGrid::removeTilesInCohort):
2383         
2384            Cleaned up tile removal.
2385
2386         (WebCore::TileGrid::revalidateTiles):
2387         (WebCore::TileGrid::ensureTilesForRect):
2388         (WebCore::TileGrid::platformCALayerPaintContents):
2389         (WebCore::TileGrid::platformCALayerDeviceScaleFactor):
2390         (WebCore::TileGrid::platformCALayerShowDebugBorders):
2391         (WebCore::TileGrid::platformCALayerShowRepaintCounter):
2392         (WebCore::TileGrid::platformCALayerContentsOpaque):
2393         (WebCore::TileGrid::platformCALayerIncrementRepaintCount):
2394         (WebCore::queueTileForRemoval): Deleted.
2395
2396 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
2397
2398         Rename some dragging functions
2399         https://bugs.webkit.org/show_bug.cgi?id=131460
2400
2401         Reviewed by Tim Horton.
2402
2403         Renamed performDrag to performDragOperation. This function is responsible for
2404         accepting a drop, not for the whole drag.
2405
2406         The new name is not perfect either, but I think that it's better, and at least
2407         it matches AppKit, like the other dragging destination functions already do.
2408
2409         * WebCore.exp.in:
2410         * page/DragController.cpp:
2411         (WebCore::DragController::performDragOperation):
2412         (WebCore::DragController::performDrag): Deleted.
2413         * page/DragController.h:
2414
2415 2014-04-08  Samuel White  <samuel_white@apple.com>
2416
2417         AX: Initial text selection point should respect element focus.
2418         https://bugs.webkit.org/show_bug.cgi?id=131402
2419
2420         Reviewed by Chris Fleizach.
2421
2422         Support the case where we want to set the initial selection and there's already a focused element.
2423
2424         No new tests, updated existing selection-initial to test this functionality.
2425
2426         * page/EventHandler.cpp:
2427         (WebCore::setKeyboardSelection):
2428         (WebCore::handleKeyboardSelectionMovement):
2429
2430 2014-04-09  Ryosuke Niwa  <rniwa@webkit.org>
2431
2432         HTMLCollection::updateNamedElementCach iterates over items twice
2433         https://bugs.webkit.org/show_bug.cgi?id=131448
2434
2435         Reviewed by Andreas Kling.
2436
2437         Compute the length first and go through the cache interface to traverse through items.
2438
2439         * html/HTMLCollection.cpp:
2440         (WebCore::HTMLCollection::updateNamedElementCache):
2441
2442 2014-04-09  Brendan Long  <b.long@cablelabs.com>
2443
2444         [GStreamer] Expose MPEG-TS metadata
2445         https://bugs.webkit.org/show_bug.cgi?id=122001
2446
2447         Reviewed by Eric Carlson.
2448
2449         Test: media/track/in-band/track-in-band-mpegts-metadata.html
2450
2451         * CMakeLists.txt: Add InbandDataTextTrack.
2452         * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available.
2453         * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack.
2454         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
2455         * WebCore.xcodeproj/project.pbxproj: Same.
2456         * html/track/DataCue.cpp:
2457         (WebCore::DataCue::DataCue): Add a constructor using raw data.
2458         * html/track/DataCue.h:
2459         (WebCore::DataCue::create): Same.
2460         * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue().
2461         * html/track/InbandDataTextTrack.h:
2462         * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack.
2463         * html/track/InbandWebVTTTextTrack.h: Same.
2464         * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType.
2465         * html/track/InbandTextTrack.cpp:
2466         (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack.
2467         (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added.
2468         * html/track/TextTrack.h:
2469         (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty).
2470         * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType.
2471         * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format.
2472         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
2473         * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method.
2474         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2475         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id.
2476          (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same.
2477         (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added.
2478         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added.
2479         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added.
2480         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2481         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections.
2482         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT.
2483         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat.
2484         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2485
2486 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
2487
2488         AX: Make AXPress much more reliable on the Web
2489         https://bugs.webkit.org/show_bug.cgi?id=131426
2490
2491         Reviewed by Mario Sanchez Prada.
2492
2493         AXPress fails when an event handler is on a node higher in the parent chain than the focused node.
2494
2495         We need to make AXPress more reliable by 
2496             1) Using the element that is focused as the target of the event
2497             2) Search for the inner most control object when dispatching the event
2498
2499         Updated existing accessibility/press-works-on-control-types.html
2500
2501         * accessibility/AccessibilityMenuList.cpp:
2502         (WebCore::AccessibilityMenuList::press):
2503         * accessibility/AccessibilityMenuList.h:
2504         * accessibility/AccessibilityMenuListPopup.cpp:
2505         (WebCore::AccessibilityMenuListPopup::press):
2506         * accessibility/AccessibilityMenuListPopup.h:
2507         * accessibility/AccessibilityObject.cpp:
2508         (WebCore::AccessibilityObject::press):
2509         * accessibility/AccessibilityObject.h:
2510         (WebCore::AccessibilityObject::performDefaultAction):
2511         * accessibility/AccessibilitySearchFieldButtons.cpp:
2512         (WebCore::AccessibilitySearchFieldCancelButton::press):
2513         * accessibility/AccessibilitySearchFieldButtons.h:
2514         * accessibility/AccessibilitySpinButton.cpp:
2515         (WebCore::AccessibilitySpinButtonPart::press):
2516         * accessibility/AccessibilitySpinButton.h:
2517
2518 2014-04-09  Brady Eidson  <beidson@apple.com>
2519
2520         ContentFilterMac is broken when NE_FILTER_SOURCE is enabled.
2521         <rdar://problem/15978793> and https://bugs.webkit.org/show_bug.cgi?id=131445
2522
2523         Reviewed by Andy Estes.
2524
2525         No new tests (Not a tested feature).
2526
2527         * platform/mac/ContentFilterMac.mm:
2528         (WebCore::ContentFilter::needsMoreData): Only consider m_neFilterSourceStatus if m_neFilterSource exists.
2529         (WebCore::ContentFilter::didBlockData): Ditto.
2530
2531 2014-04-08  Oliver Hunt  <oliver@apple.com>
2532
2533         Rewrite Function.bind as a builtin
2534         https://bugs.webkit.org/show_bug.cgi?id=131083
2535
2536         Reviewed by Geoffrey Garen.
2537
2538         Switch WebCore to use the helper functions when defining the
2539         prototype properties on DOM constructors, and update bindings
2540         tests accordingly.
2541
2542         * bindings/js/JSImageConstructor.cpp:
2543         (WebCore::JSImageConstructor::finishCreation):
2544         * bindings/scripts/CodeGeneratorJS.pm:
2545         (GenerateConstructorHelperMethods):
2546         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2547         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2548         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2549         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2550         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2551         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2552         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2553         (WebCore::JSTestEventTargetConstructor::finishCreation):
2554         * bindings/scripts/test/JS/JSTestException.cpp:
2555         (WebCore::JSTestExceptionConstructor::finishCreation):
2556         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2557         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2558         * bindings/scripts/test/JS/JSTestInterface.cpp:
2559         (WebCore::JSTestInterfaceConstructor::finishCreation):
2560         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2561         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2562         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2563         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2564         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2565         * bindings/scripts/test/JS/JSTestNode.cpp:
2566         (WebCore::JSTestNodeConstructor::finishCreation):
2567         * bindings/scripts/test/JS/JSTestObj.cpp:
2568         (WebCore::JSTestObjConstructor::finishCreation):
2569         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2570         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2571         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2572         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2573         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2574         (WebCore::JSTestTypedefsConstructor::finishCreation):
2575         * bindings/scripts/test/JS/JSattribute.cpp:
2576         (WebCore::JSattributeConstructor::finishCreation):
2577         * bindings/scripts/test/JS/JSreadonly.cpp:
2578         (WebCore::JSreadonlyConstructor::finishCreation):
2579
2580 2014-04-09  Enrica Casucci  <enrica@apple.com>
2581
2582         Unreviewed iOS build fix. Replacing deprecated enum with AVPlayerViewControllerExitFullScreenReason.
2583
2584         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2585         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
2586
2587 2014-04-09  Radu Stavila  <stavila@adobe.com>
2588
2589         [CSS Regions] Monolithic elements should not affect the layout of the content outside its region
2590         https://bugs.webkit.org/show_bug.cgi?id=130499
2591
2592         Reviewed by David Hyatt.
2593
2594         When performing layout on an element flowed into regions, its logical height must not be incremented 
2595         past the region's logical bottom for monolithic elements in regions different than the last region their containing
2596         block is fragmented into. This ensures that the following elements are correctly laid out 
2597         from the top of the next region.
2598         This change must also be applied to floats in order to prevent text from avoiding part
2599         of a float that did not actually made it into the current region, but instead overflowed
2600         the previous one.
2601
2602         Tests: fast/regions/fragmentation-after-float-overflow-single-region.html
2603                fast/regions/fragmentation-after-monolithic-overflow-self-collapsed.html
2604                fast/regions/fragmentation-after-monolithic-overflow-single-region.html
2605                fast/regions/fragmentation-after-monolithic-overflow.html
2606
2607         * rendering/FloatingObjects.cpp:
2608         (WebCore::FloatingObjects::computePlacedFloatsTree):
2609         * rendering/RenderBlockFlow.cpp:
2610         (WebCore::RenderBlockFlow::layoutBlockChild):
2611         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
2612         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
2613         (WebCore::RenderBlockFlow::getClearDelta):
2614         (WebCore::RenderBlockFlow::applyAfterBreak): Deleted.
2615         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow): Deleted.
2616         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock): Deleted.
2617         (WebCore::RenderBlockFlow::flipFloatForWritingModeForChild): Deleted.
2618         * rendering/RenderBlockFlow.h:
2619         * rendering/RenderFlowThread.cpp:
2620         (WebCore::RenderFlowThread::isBoxInDifferentRegionsAsFloat):
2621         * rendering/RenderFlowThread.h:
2622
2623 2014-04-09  Anders Carlsson  <andersca@apple.com>
2624
2625         Use std::array in AffineTransform, and get rid of setMatrix
2626         https://bugs.webkit.org/show_bug.cgi?id=131416
2627
2628         Reviewed by Sam Weinig.
2629
2630         * platform/graphics/transforms/AffineTransform.cpp:
2631         (WebCore::AffineTransform::AffineTransform):
2632         (WebCore::AffineTransform::multiply):
2633         * platform/graphics/transforms/AffineTransform.h:
2634         (WebCore::AffineTransform::setMatrix): Deleted.
2635
2636 2014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2637
2638         [GTK] Plugin process crashes when loading totem plugin
2639         https://bugs.webkit.org/show_bug.cgi?id=131357
2640
2641         Reviewed by Martin Robinson.
2642
2643         Remove netscape plugin implementation from WebCore that was only
2644         used by WebKit1. This removes the conflict between the WebCore NPN
2645         symbols and the ones used by the plugins.
2646
2647         * CMakeLists.txt:
2648         * PlatformEfl.cmake:
2649         * PlatformGTK.cmake:
2650         * PlatformWin.cmake:
2651         * plugins/PluginViewNone.cpp:
2652         * plugins/gtk/PluginPackageGtk.cpp: Removed.
2653         * plugins/gtk/PluginViewGtk.cpp: Removed.
2654         * plugins/gtk/gtk2xtbin.c: Removed.
2655         * plugins/gtk/gtk2xtbin.h: Removed.
2656         * plugins/gtk/xembed.h: Removed.
2657
2658 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
2659
2660         fullscreen controls first show a play button instead of a pause button
2661         https://bugs.webkit.org/show_bug.cgi?id=131430
2662
2663         Reviewed by Jer Noble.
2664
2665         isPlaying() is false while buffering, paused() isn't; use paused() for
2666         the play button.
2667
2668         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2669         (WebVideoFullscreenModelMediaElement::setMediaElement):
2670         (WebVideoFullscreenModelMediaElement::handleEvent):
2671         Use HTMLMediaElement::paused() instead of HTMLMediaElement::isPlaying()
2672
2673 2014-04-09  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2674
2675         Remove duplicated files and unnecessary conditions from UseJSC.cmake
2676         https://bugs.webkit.org/show_bug.cgi?id=131438
2677
2678         Reviewed by Csaba Osztrogonác.
2679
2680         No new tests required.
2681
2682         * UseJSC.cmake:
2683
2684 2014-04-09  Mario Sanchez Prada  <mario.prada@samsung.com>
2685
2686         [GTK] Layout tests accessibility/children-changed-sends-notification.html and accessibility/notification-listeners.html fails
2687         https://bugs.webkit.org/show_bug.cgi?id=131380
2688
2689         Reviewed by Chris Fleizach.
2690
2691         Don't emit signals for added objects that we know won't be exposed
2692         to the accessibility hierarchy (e.g. static text).
2693
2694         * accessibility/atk/AXObjectCacheAtk.cpp:
2695         (WebCore::AXObjectCache::attachWrapper): Add extra check and early return.
2696
2697 2014-04-09  Mario Sanchez Prada  <mario.prada@samsung.com>
2698
2699         [AX][GTK] No new lines in some AX tests output
2700         https://bugs.webkit.org/show_bug.cgi?id=131294
2701
2702         Reviewed by Martin Robinson.
2703
2704         Do not implement Hypetext or AtkText for the WebArea. Those
2705         interfaces will be implemented by the containers (automatically
2706         generated or not) for the different parts of the DOM and the
2707         render subtree under this element anyway.
2708
2709         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2710         (getInterfaceMaskFromObject): Make sure we don't apply
2711         WAIHypertext nor WAIText to objects with role WebAreaRole.
2712
2713 2014-04-08  Conrad Shultz  <conrad_shultz@apple.com>
2714
2715         nil should only be used for objects
2716         https://bugs.webkit.org/show_bug.cgi?id=131431
2717
2718         Reviewed by Chris Fleizach.
2719
2720         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2721         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2722         nil -> NO.
2723
2724         * platform/mac/WebVideoFullscreenController.mm:
2725         (-[WebVideoFullscreenController setMediaElement:]):
2726         nil -> 0; change a NULL to nullptr while we're here.
2727
2728 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
2729
2730         [CSSRegions] Crash when video in region exits fullscreen
2731         https://bugs.webkit.org/show_bug.cgi?id=131366
2732
2733         Reviewed by Andrei Bucur.
2734
2735         After fix for https://bugs.webkit.org/show_bug.cgi?id=130392, we compute the region ranges
2736         information for inline elements collected in named flows with associated region chains.
2737         The algorithm for this computation, implemented in RenderFlowThread::getRegionRangeForBox,
2738         walks up the render tree trying to find the top-most unsplittable box under the named flow
2739         in the case where the region ranges information is not available.
2740
2741         As this traversal works properly only when the starting box is not detached from the render tree,
2742         i changed the named flow information clearing in RenderBlock::collapseAnonymousBoxChild
2743         to occur before the child to be collapsed is removed from the render tree.
2744
2745         Test: fast/regions/full-screen-video-in-region-crash.html
2746
2747         * rendering/RenderBlock.cpp:
2748         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2749         * rendering/RenderFlowThread.cpp:
2750         (WebCore::RenderFlowThread::getRegionRangeForBox):
2751
2752 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
2753
2754         Unreviewed build fix for iOS (redux).
2755
2756         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2757         (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
2758         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
2759
2760 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
2761  
2762         Unreviewed build fix for iOS.
2763
2764         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2765         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
2766
2767 2014-04-08  Antti Koivisto  <antti@apple.com>
2768
2769         Factor tile coverage map into a class
2770         https://bugs.webkit.org/show_bug.cgi?id=131417
2771
2772         Reviewed by Tim Horton.
2773
2774         * WebCore.xcodeproj/project.pbxproj:
2775         * platform/graphics/ca/PlatformCALayerClient.h:
2776         (WebCore::PlatformCALayerClient::platformCALayerLayoutSublayersOfLayer):
2777         (WebCore::PlatformCALayerClient::platformCALayerRespondsToLayoutChanges):
2778         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
2779         (WebCore::PlatformCALayerClient::platformCALayerContentsOrientation):
2780         (WebCore::PlatformCALayerClient::platformCALayerShowDebugBorders):
2781         (WebCore::PlatformCALayerClient::platformCALayerShowRepaintCounter):
2782         (WebCore::PlatformCALayerClient::platformCALayerIncrementRepaintCount):
2783         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
2784         
2785             Added default implementation to some of these to make clients less messy.
2786
2787         * platform/graphics/ca/mac/TileController.h:
2788         * platform/graphics/ca/mac/TileController.mm:
2789         (WebCore::TileController::~TileController):
2790         (WebCore::TileController::platformCALayerPaintContents):
2791         (WebCore::TileController::setTiledScrollingIndicatorPosition):
2792         (WebCore::TileController::updateTileCoverageMap):
2793         (WebCore::TileController::tiledScrollingIndicatorLayer):
2794         * platform/graphics/ca/mac/TileCoverageMap.h: Added.
2795         (WebCore::TileCoverageMap::setPosition):
2796         (WebCore::TileCoverageMap::layer):
2797         * platform/graphics/ca/mac/TileCoverageMap.mm: Added.
2798         
2799             The new class.
2800
2801         (WebCore::TileCoverageMap::TileCoverageMap):
2802         (WebCore::TileCoverageMap::~TileCoverageMap):
2803         (WebCore::TileCoverageMap::update):
2804         (WebCore::TileCoverageMap::platformCALayerPaintContents):
2805         (WebCore::TileCoverageMap::platformCALayerDeviceScaleFactor):
2806         * platform/graphics/ca/mac/TileGrid.h:
2807         * platform/graphics/ca/mac/TileGrid.mm:
2808         (WebCore::TileGrid::drawTileMapContents):
2809
2810 2014-04-08  Zalan Bujtas  <zalan@apple.com>
2811
2812         Subpixel rendering: Clip outer rounded border rect on device pixel boundaries.
2813         https://bugs.webkit.org/show_bug.cgi?id=131404
2814
2815         Reviewed by Simon Fraser.
2816
2817         Use device pixel snapped rectangle to clip out rounded rects, when not all sides are solid/double.
2818         Snapping it to device pixel boundaries ensures that when we call drawRect(devicePixelSnappedRect) later,
2819         it leaves no cruft behind.
2820
2821         Test: fast/borders/hidpi-rounded-border-on-subpixel-position.html
2822
2823         * rendering/RenderBoxModelObject.cpp:
2824         (WebCore::RenderBoxModelObject::paintBorder):
2825
2826 2014-04-08  Jon Lee  <jonlee@apple.com>
2827
2828         Turn MSE on by default
2829         https://bugs.webkit.org/show_bug.cgi?id=131313
2830         <rdar://problem/16525223>
2831
2832         Reviewed by Jer Noble.
2833
2834         * Configurations/FeatureDefines.xcconfig:
2835         * page/Settings.in: Add MEDIA_SOURCE conditional.
2836
2837 2014-04-08  Anders Carlsson  <andersca@apple.com>
2838
2839         Remove an unused parameter from loadResource.
2840
2841         Reviewed by Darin Adler.
2842
2843         Since the CachedResourceRequest has the charset in it, we don't need to pass it separately to loadRequest.
2844
2845         * loader/cache/CachedResourceLoader.cpp:
2846         (WebCore::CachedResourceLoader::requestResource):
2847         (WebCore::CachedResourceLoader::loadResource):
2848         * loader/cache/CachedResourceLoader.h:
2849
2850 2014-04-08  Ryuan Choi  <ryuan.choi@samsung.com>
2851
2852         Unreviewed EFL build fix attempt since r166956
2853
2854         * page/efl/DragControllerEfl.cpp: Rename Clipboard to DataTransfer.
2855         (WebCore::DragController::declareAndWriteDragImage):
2856
2857 2014-04-08  Simon Fraser  <simon.fraser@apple.com>
2858
2859         REGRESSION (r155998): Elements render at very low resolution with some 3d transforms
2860         https://bugs.webkit.org/show_bug.cgi?id=131412
2861         <rdar://problem/16525044>
2862
2863         Reviewed by Tim Horton.
2864         
2865         In r155998 we started to compute a root-relative transform in order to choose
2866         a good contentsScale to avoid blurring on scaling.
2867         
2868         However, the code failed to update this transform when passing over
2869         GraphicsLayerCAs with no uncommitted changes, which caused us to choose
2870         an incorrect contentsScale sometimes, resulting in blurriness.
2871         
2872         Fix by updating the root-relative transform on layers with no uncommitted
2873         changes.
2874
2875         Test: compositing/contents-scale/incremental-change.html
2876
2877         * platform/graphics/ca/GraphicsLayerCA.cpp:
2878         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2879
2880 2014-04-08  Anders Carlsson  <andersca@apple.com>
2881
2882         Don't call CGPathAddPath with invalid CGAffineTransform objects
2883         https://bugs.webkit.org/show_bug.cgi?id=131413
2884         <rdar://problem/16399645>
2885
2886         Reviewed by Darin Adler.
2887
2888         Covered by existing tests.
2889
2890         * platform/graphics/cg/PathCG.cpp:
2891         (WebCore::Path::addPath):
2892         Don't try to add the path if the affine transform isn't invertible.
2893
2894         * platform/graphics/transforms/AffineTransform.cpp:
2895         (WebCore::AffineTransform::isInvertible):
2896         Handle infinite and NaN determinants.
2897
2898         (WebCore::AffineTransform::inverse):
2899         Handle infinite and NaN determinants.
2900
2901 2014-04-08  Brian J. Burg  <burg@cs.washington.edu>
2902
2903         Web Replay: memoize nondeterministic attributes of the Screen interface
2904         https://bugs.webkit.org/show_bug.cgi?id=131339
2905
2906         Reviewed by Timothy Hatcher.
2907
2908         The values from the screen interface are nondeterministic. Since we can't
2909         change the physical screen dimensions, instead memoize values of attributes.
2910
2911         Test: ManualTests/inspector/replay-window-screen.html
2912
2913         * page/Screen.idl: Add Nondeterministic attribute.
2914
2915 2014-04-08  Beth Dakin  <bdakin@apple.com>
2916
2917         https://bugs.webkit.org/show_bug.cgi?id=131408
2918         Scrollbars layers don't dynamically update when device scale factor changes
2919         -and corresponding-
2920         <rdar://problem/16503875>
2921
2922         Reviewed by Tim Horton.
2923
2924         The scrollbar layers are not children of the RenderView's layer, so they were 
2925         completely skipped over by this function before. We need to start this higher up 
2926         the tree in the rootGraphicsLayer(), which will typically return the 
2927         m_overflowControlsHostLayer.
2928         * rendering/RenderLayerCompositor.cpp:
2929         (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged):
2930
2931 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
2932
2933         HTMLConverter::aggregatedAttributesForAncestors should cache intermediate results
2934         https://bugs.webkit.org/show_bug.cgi?id=131400
2935
2936         Reviewed by Sam Weinig.
2937
2938         Instead of accumulating attributes from a character node to the highest ancestor,
2939         recursively call aggregatedAttributesForElementAndItsAncestors so that aggregated
2940         attributes are cached on each ancestor to eliminate the old O(n^2) behavior.
2941
2942         * editing/cocoa/HTMLConverter.mm:
2943         (HTMLConverter::aggregatedAttributesForAncestors):
2944         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors): Extracted from aggregatedAttributesForAncestors.
2945
2946 2014-04-08  Jinwoo Song  <jinwoo7.song@samsung.com>
2947
2948         Unreviewed CMake build fix after r166965.
2949
2950         * UseJSC.cmake: Rename JSClipboardCustom.cpp to JSDataTransferCustom.cpp.
2951
2952 2014-04-08  Enrica Casucci  <enrica@apple.com>
2953
2954         Unreviewed iOS build fix.
2955
2956         Return false instead of nil in a function that returns BOOL.
2957
2958         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2959         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2960
2961 2014-04-08  Brady Eidson  <beidson@apple.com>
2962
2963         Non-empty ranges misdetected as empty ranges, avoiding telephone number detection.
2964         <rdar://problem/16553441> and https://bugs.webkit.org/show_bug.cgi?id=131397 
2965
2966         Reviewed by Tim Horton.
2967
2968         No new tests (Only affects a currently untested Mac-only WK2 feature)
2969
2970         * editing/Editor.cpp:
2971         (WebCore::Editor::scanSelectionForTelephoneNumbers): Fix detection of empty ranges so we don’t
2972           early return erroneously.
2973
2974 2014-04-08  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2975
2976         [SVG] Fix CSS transform handling when zoomed
2977         https://bugs.webkit.org/show_bug.cgi?id=125836
2978
2979         Reviewed by Tim Horton.
2980
2981         Tests: svg/zoom/page/zoom-css-transforms-expected.svg
2982                svg/zoom/page/zoom-css-transforms.svg
2983
2984         Adjusts CSS transforms when used in SVG to account for unexpected
2985         translation scale. Backport from Chromium #174910.
2986
2987         * svg/SVGGraphicsElement.cpp:
2988         (WebCore::SVGGraphicsElement::animatedLocalTransform):
2989
2990 2014-04-08  Hans Muller  <hmuller@adobe.com>
2991
2992         [CSS Shapes] large corner radius combined with 0 radius does not wrap properly
2993         https://bugs.webkit.org/show_bug.cgi?id=129739
2994
2995         Reviewed by Bem Jones-Bey.
2996
2997         Corrected special case handling for shape-outside border-box values with border-radius
2998         values that greater than or equal to the box's height.
2999
3000         Tests: fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
3001                fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002.html
3002
3003         * rendering/shapes/BoxShape.cpp:
3004         (WebCore::BoxShape::getExcludedIntervals):
3005
3006 2014-04-08  Alexey Proskuryakov  <ap@apple.com>
3007
3008         Rename Clipboard to DataTransfer
3009         https://bugs.webkit.org/show_bug.cgi?id=131371
3010
3011         Reviewed by Anders Carlsson.
3012
3013         This is the name used in HTML5, and it's much better than the confusing Clipboard one.
3014
3015         Renamed related enums too, and made DataTransferAccessPolicy an enum class.
3016
3017         * CMakeLists.txt:
3018         * Configurations/WebCore.xcconfig:
3019         * DerivedSources.cpp:
3020         * DerivedSources.make:
3021         * WebCore.exp.in:
3022         * WebCore.vcxproj/WebCore.vcxproj:
3023         * WebCore.vcxproj/WebCore.vcxproj.filters:
3024         * WebCore.xcodeproj/project.pbxproj:
3025         * bindings/js/JSBindingsAllInOne.cpp:
3026         * bindings/js/JSClipboardCustom.cpp: Removed.
3027         * bindings/js/JSDataTransferCustom.cpp: Copied from Source/WebCore/bindings/js/JSClipboardCustom.cpp.
3028         (WebCore::JSDataTransfer::types):
3029         (WebCore::JSClipboard::types): Deleted.
3030         * bindings/js/JSEventCustom.cpp:
3031         * dom/Clipboard.cpp: Removed.
3032         * dom/Clipboard.h: Removed.
3033         * dom/Clipboard.idl: Removed.
3034         * dom/ClipboardAccessPolicy.h: Removed.
3035         * dom/ClipboardEvent.cpp:
3036         (WebCore::ClipboardEvent::ClipboardEvent):
3037         * dom/ClipboardEvent.h:
3038         (WebCore::ClipboardEvent::create):
3039         (WebCore::ClipboardEvent::clipboard): Deleted.
3040         * dom/ClipboardMac.mm: Removed.
3041         * dom/DOMAllInOne.cpp:
3042         * dom/DataTransfer.cpp: Copied from Source/WebCore/dom/Clipboard.cpp.
3043         (WebCore::DataTransfer::DataTransfer):
3044         (WebCore::DataTransfer::createForCopyAndPaste):
3045         (WebCore::DataTransfer::~DataTransfer):
3046         (WebCore::DataTransfer::setAccessPolicy):
3047         (WebCore::DataTransfer::canReadTypes):
3048         (WebCore::DataTransfer::canReadData):
3049         (WebCore::DataTransfer::canWriteData):
3050         (WebCore::DataTransfer::clearData):
3051         (WebCore::DataTransfer::getData):
3052         (WebCore::DataTransfer::setData):
3053         (WebCore::DataTransfer::types):
3054         (WebCore::DataTransfer::files):
3055         (WebCore::DataTransfer::dropEffect):
3056         (WebCore::DataTransfer::setDropEffect):
3057         (WebCore::DataTransfer::effectAllowed):
3058         (WebCore::DataTransfer::setEffectAllowed):
3059         (WebCore::DataTransfer::setDragImage):
3060         (WebCore::DataTransfer::createForDragAndDrop):
3061         (WebCore::DataTransfer::canSetDragImage):
3062         (WebCore::DataTransfer::updateDragImage):
3063         (WebCore::DataTransfer::createDragImage):
3064         (WebCore::DragImageLoader::DragImageLoader):
3065         (WebCore::DragImageLoader::imageChanged):
3066         (WebCore::DataTransfer::sourceOperation):
3067         (WebCore::DataTransfer::destinationOperation):
3068         (WebCore::DataTransfer::setSourceOperation):
3069         (WebCore::DataTransfer::setDestinationOperation):
3070         (WebCore::Clipboard::Clipboard): Deleted.
3071         (WebCore::Clipboard::createForCopyAndPaste): Deleted.
3072         (WebCore::Clipboard::~Clipboard): Deleted.
3073         (WebCore::Clipboard::setAccessPolicy): Deleted.
3074         (WebCore::Clipboard::canReadTypes): Deleted.
3075         (WebCore::Clipboard::canReadData): Deleted.
3076         (WebCore::Clipboard::canWriteData): Deleted.
3077         (WebCore::Clipboard::clearData): Deleted.
3078         (WebCore::Clipboard::getData): Deleted.
3079         (WebCore::Clipboard::setData): Deleted.
3080         (WebCore::Clipboard::types): Deleted.
3081         (WebCore::Clipboard::files): Deleted.
3082         (WebCore::Clipboard::dropEffect): Deleted.
3083         (WebCore::Clipboard::setDropEffect): Deleted.
3084         (WebCore::Clipboard::effectAllowed): Deleted.
3085         (WebCore::Clipboard::setEffectAllowed): Deleted.
3086         (WebCore::Clipboard::setDragImage): Deleted.
3087         (WebCore::Clipboard::createForDragAndDrop): Deleted.
3088         (WebCore::Clipboard::canSetDragImage): Deleted.
3089         (WebCore::Clipboard::updateDragImage): Deleted.
3090         (WebCore::Clipboard::createDragImage): Deleted.
3091         (WebCore::Clipboard::sourceOperation): Deleted.
3092         (WebCore::Clipboard::destinationOperation): Deleted.
3093         (WebCore::Clipboard::setSourceOperation): Deleted.
3094         (WebCore::Clipboard::setDestinationOperation): Deleted.
3095         * dom/DataTransfer.h: Copied from Source/WebCore/dom/Clipboard.h.
3096         * dom/DataTransfer.idl: Copied from Source/WebCore/dom/Clipboard.idl.
3097         * dom/DataTransferAccessPolicy.h: Copied from Source/WebCore/dom/ClipboardAccessPolicy.h.
3098         * dom/DataTransferItemList.h:
3099         * dom/DataTransferMac.mm: Copied from Source/WebCore/dom/ClipboardMac.mm.
3100         (WebCore::DataTransfer::createDragImage):
3101         (WebCore::Clipboard::createDragImage): Deleted.
3102         * dom/Event.h:
3103         (WebCore::Event::clipboardData):
3104         (WebCore::Event::internalDataTransfer):
3105         (WebCore::Event::clipboard): Deleted.
3106         * dom/Event.idl:
3107         * dom/MouseEvent.cpp:
3108         (WebCore::MouseEvent::create):
3109         (WebCore::MouseEvent::MouseEvent):
3110         (WebCore::MouseEvent::initMouseEvent):
3111         * dom/MouseEvent.h:
3112         (WebCore::MouseEvent::dataTransfer):
3113         * dom/MouseEvent.idl:
3114         * dom/WheelEvent.cpp:
3115         * editing/Editor.cpp:
3116         (WebCore::Editor::canDHTMLCut):
3117         (WebCore::Editor::canDHTMLCopy):
3118         (WebCore::Editor::canDHTMLPaste):
3119         (WebCore::Editor::tryDHTMLCopy):
3120         (WebCore::Editor::tryDHTMLCut):
3121         (WebCore::Editor::tryDHTMLPaste):
3122         (WebCore::Editor::dispatchCPPEvent):
3123         (WebCore::Editor::performCutOrCopy):
3124         (WebCore::Editor::selectedTextForDataTransfer):
3125         (WebCore::Editor::selectedTextForClipboard): Deleted.
3126         * editing/Editor.h:
3127         * editing/ios/EditorIOS.mm:
3128         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
3129         * editing/mac/EditorMac.mm:
3130         (WebCore::Editor::takeFindStringFromSelection):
3131         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
3132         * loader/EmptyClients.h:
3133         * page/DragClient.h:
3134         * page/DragController.cpp:
3135         (WebCore::DragController::dragExited):
3136         (WebCore::DragController::performDrag):
3137         (WebCore::DragController::tryDHTMLDrag):
3138         (WebCore::DragController::startDrag):
3139         (WebCore::DragController::doImageDrag):
3140         (WebCore::DragController::doSystemDrag):
3141         * page/DragController.h:
3142         * page/DragState.h:
3143         * page/EventHandler.cpp:
3144         (WebCore::EventHandler::dispatchDragEvent):
3145         (WebCore::hasFileOfType):
3146         (WebCore::hasStringOfType):
3147         (WebCore::hasDropZoneType):
3148         (WebCore::findDropZone):
3149         (WebCore::EventHandler::updateDragAndDrop):
3150         (WebCore::EventHandler::cancelDragAndDrop):
3151         (WebCore::EventHandler::performDragAndDrop):
3152         (WebCore::EventHandler::freeDataTransfer):
3153         (WebCore::EventHandler::dragSourceEndedAt):
3154         (WebCore::EventHandler::dispatchDragSrcEvent):
3155         (WebCore::EventHandler::handleDrag):
3156         (WebCore::EventHandler::freeClipboard): Deleted.
3157         * page/EventHandler.h:
3158         * page/efl/EventHandlerEfl.cpp:
3159         (WebCore::EventHandler::createDraggingDataTransfer):
3160         (WebCore::EventHandler::createDraggingClipboard): Deleted.
3161         * page/gtk/DragControllerGtk.cpp:
3162         (WebCore::DragController::declareAndWriteDragImage):
3163         * page/gtk/EventHandlerGtk.cpp:
3164         (WebCore::EventHandler::createDraggingDataTransfer):
3165         (WebCore::EventHandler::createDraggingClipboard): Deleted.
3166         * page/mac/DragControllerMac.mm:
3167         (WebCore::DragController::declareAndWriteDragImage):
3168         * page/mac/EventHandlerMac.mm:
3169         (WebCore::EventHandler::createDraggingDataTransfer):
3170         (WebCore::EventHandler::createDraggingClipboard): Deleted.
3171         * page/win/DragControllerWin.cpp:
3172         (WebCore::DragController::declareAndWriteDragImage):
3173         * page/win/EventHandlerWin.cpp:
3174         (WebCore::EventHandler::createDraggingataTransfer):
3175         (WebCore::EventHandler::createDraggingClipboard): Deleted.
3176         * platform/Pasteboard.h:
3177         * platform/gtk/PasteboardGtk.cpp:
3178         (WebCore::Pasteboard::writeSelection):
3179         * platform/mac/PasteboardMac.mm:
3180         * platform/win/PasteboardWin.cpp:
3181         (WebCore::Pasteboard::writeRangeToDataObject):
3182         (WebCore::Pasteboard::writeSelection):
3183
3184 2014-04-08  Jer Noble  <jer.noble@apple.com>
3185
3186         Unreviewed iOS build fix. Pass 0 instead of nil to the options parameter of addObserver:forKeyPath:options:context.
3187
3188         * platform/graphics/ios/TextTrackRepresentationIOS.mm:
3189         (-[WebCoreTextTrackRepresentationIOSHelper setParent:]):
3190
3191 2014-04-08  Antti Koivisto  <antti@apple.com>
3192
3193         Remove exposedRect from TileController
3194         https://bugs.webkit.org/show_bug.cgi?id=131378
3195
3196         Reviewed by Simon Fraser.
3197
3198         Having two separate visible rectangles is confusing. We should compute one on higher level.
3199
3200         * page/FrameView.cpp:
3201         (WebCore::FrameView::setExposedRect):
3202         
3203             Push exposed rect to tile controller by doing a layer flush (like the changed visible rect is normally passed).
3204
3205         * platform/graphics/TiledBacking.h:
3206         * platform/graphics/ca/mac/TileController.h:
3207         * platform/graphics/ca/mac/TileController.mm:
3208         
3209             Remove exposedRect and just use visibleRect.
3210
3211         (WebCore::TileController::TileController):
3212         (WebCore::TileController::setTiledScrollingIndicatorPosition):
3213         
3214             Update the scrolling indicator position.
3215
3216         (WebCore::TileController::updateTileCoverageMap):
3217         (WebCore::TileController::setExposedRect): Deleted.
3218         * platform/graphics/ca/mac/TileGrid.h:
3219         * platform/graphics/ca/mac/TileGrid.mm:
3220         (WebCore::TileGrid::tilesWouldChangeForVisibleRect):
3221         (WebCore::TileGrid::revalidateTiles):
3222         (WebCore::TileGrid::scaledExposedRect): Deleted.
3223         * rendering/RenderLayerBacking.cpp:
3224         (WebCore::RenderLayerBacking::RenderLayerBacking):
3225         
3226             No need to push exposedRect anymore.
3227
3228         * rendering/RenderLayerCompositor.cpp:
3229         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3230         
3231             Integrate exposed rect to visible rect when flushing layers.
3232
3233 2014-04-08  Andreas Kling  <akling@apple.com>
3234
3235         [Mac] Always do a full GC when simulating memory pressure.
3236         <https://webkit.org/b/129790>
3237
3238         To get more consistent accounting on automated memory testers,
3239         add a synchronous GC as part of the simulated memory pressure event.
3240
3241         Reviewed by Geoffrey Garen.
3242
3243         * platform/mac/MemoryPressureHandlerMac.mm:
3244         (WebCore::MemoryPressureHandler::install):
3245
3246 2014-04-08  Jer Noble  <jer.noble@apple.com>
3247
3248         Unreviewed iOS build fix. Pass 0 instead of nil to setRate: when pausing.
3249
3250         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3251         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
3252
3253 2014-04-08  Mark Lam  <mark.lam@apple.com>
3254
3255         Refactor to make JSMainThreadExecState's constructor and destructor private.
3256         <https://webkit.org/b/131372>
3257
3258         Reviewed by Mark Hahnenberg.
3259
3260         This is in preparation for subsequent patches to ensure that we don't
3261         exit the VM with an exception still pending.
3262
3263         No new tests required.  This is only a refactor of existing behavior.
3264
3265         * bindings/js/JSDOMGlobalObjectTask.cpp:
3266         * bindings/js/JSMainThreadExecState.h:
3267         (WebCore::JSMainThreadExecState::runTask):
3268
3269 2014-04-07  Jer Noble  <jer.noble@apple.com>
3270
3271         [WK2][iOS] Consecutive videos in full screen display only black
3272         https://bugs.webkit.org/show_bug.cgi?id=131316
3273
3274         Reviewed by Eric Carlson.
3275
3276         Update the MediaPlayer's full screen attributes whenever the underlying engine changes,
3277         not just when the engine is initially created. Also, clear the videoLayer out of the
3278         fullscreen layer when destroying the videoLayer.
3279
3280         * html/HTMLMediaElement.cpp:
3281         (WebCore::HTMLMediaElement::parseAttribute):
3282         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3283         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
3284
3285 2014-04-08  Morten Stenshorne  <mstensho@opera.com>
3286
3287         [New Multicolumn] Child top margin sometimes ignored for column balancing
3288         https://bugs.webkit.org/show_bug.cgi?id=122754
3289
3290         Reviewed by David Hyatt.
3291
3292         We need to set zero page logical height in LayoutState when column
3293         height is unknown (when the columns haven't yet been
3294         balanced). There's code that assumes that non-zero page height means
3295         that page height is known. Lying about this makes the pagination code
3296         believe that every top margin is adjacent to a column break, which
3297         makes it eat and ignore all top margins.
3298
3299         This should be cleaned up, but it's easier to wait until the old
3300         multicol code has been removed.
3301
3302         Tests: fast/multicol/break-in-scrollable.html
3303                fast/multicol/newmulticol/leading-and-trailing-margin.html
3304                fast/multicol/newmulticol/leading-margin.html
3305
3306         * rendering/LayoutState.cpp:
3307         (WebCore::LayoutState::LayoutState):
3308         * rendering/RenderBlockFlow.cpp:
3309         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
3310         * rendering/RenderFlowThread.h:
3311         * rendering/RenderMultiColumnFlowThread.cpp:
3312         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
3313         * rendering/RenderMultiColumnFlowThread.h:
3314
3315 2014-04-07  Dean Jackson  <dino@apple.com>
3316
3317         Allow elements to register for changes in page scale
3318         https://bugs.webkit.org/show_bug.cgi?id=131319
3319
3320         Reviewed by Eric Carlson.
3321
3322         Some parts of WebCore need to react to changes in the page
3323         scale factor, such as resizing when the user zooms. A followup
3324         patch will enable this for media controls - this simply lays
3325         the groundwork.
3326
3327         At the moment we only allow HTMLMediaElements to register, but if
3328         necessary this could be expanded in the future.
3329
3330         * dom/Document.cpp: New methods to keep a list of HTMLMediaElements that
3331         are interested in updates.
3332         (WebCore::Document::registerForPageScaleFactorChangedCallbacks):
3333         (WebCore::Document::unregisterForPageScaleFactorChangedCallbacks):
3334         (WebCore::Document::pageScaleFactorChanged):
3335         * dom/Document.h:
3336         * html/HTMLMediaElement.cpp:
3337         (WebCore::HTMLMediaElement::HTMLMediaElement):
3338         (WebCore::HTMLMediaElement::registerWithDocument): Add ourselves to the
3339         the document's pageScale callback.
3340         (WebCore::HTMLMediaElement::unregisterWithDocument): Remove ourselves from the
3341         the document's pageScale callback.
3342         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Add/remove ourselves to/from
3343         the callback if necessary.
3344         (WebCore::HTMLMediaElement::pageScaleFactorChanged): The callback function. Empty for now.
3345         * html/HTMLMediaElement.h:
3346         (WebCore::HTMLMediaElement::mediaControlsDependOnPageScaleFactor): Accessor.
3347         * page/Page.cpp:
3348         (WebCore::Page::setPageScaleFactor): Tell all documents that the user has zoomed.
3349
3350 2014-04-08  peavo@outlook.com  <peavo@outlook.com>
3351
3352         [WinCairo] Compile error in TextureMapper.h
3353         https://bugs.webkit.org/show_bug.cgi?id=131360
3354
3355         Reviewed by Brent Fulgham.
3356
3357         The TextureMapper class has pure virtual methods, and cannot be instantiated.
3358
3359         * platform/graphics/texmap/TextureMapper.h:
3360         (WebCore::TextureMapper::platformCreateAccelerated):
3361
3362 2014-04-08  Zalan Bujtas  <zalan@apple.com>
3363
3364         Subpixel rendering: Slow paint path for inlines should snap to device pixels.
3365         https://bugs.webkit.org/show_bug.cgi?id=131259
3366
3367         Reviewed by Simon Fraser.
3368
3369         InlineTextBox::paint needs to round to the same device pixel position as SimpleLineLayout does.
3370
3371         Test: fast/inline/hidpi-slow-path-text-on-subpixel-position.html
3372
3373         * rendering/InlineTextBox.cpp:
3374         (WebCore::InlineTextBox::paint):
3375         * rendering/TextPainter.h: Cleanup. No reason to have them as references here.
3376
3377 2014-04-07  Brent Fulgham  <bfulgham@apple.com>
3378
3379         Keep 'webkitClosedCaptionsVisible' API in sync with captions display preferences
3380         https://bugs.webkit.org/show_bug.cgi?id=131344
3381
3382         Reviewed by Eric Carlson.
3383
3384         * html/HTMLMediaElement.cpp:
3385         (WebCore::HTMLMediaElement::configureTextTrackGroup) If we decide that captions should
3386         be active (due to user preferences) make sure the 'webkitClosedCaptionsVisible' state
3387         is turned on.
3388
3389 2014-04-08  Zalan Bujtas  <zalan@apple.com>
3390
3391         Subpixel rendering: Paint the filter effect result image on device pixel position.
3392         https://bugs.webkit.org/show_bug.cgi?id=131255
3393
3394         Reviewed by Simon Fraser.
3395
3396         This patch moves filter effect images from integral to device pixel position. However,
3397         result images are still integral based.
3398
3399         Test: css3/filters/hidpi-filter-is-on-subpixel-position.html
3400
3401         * rendering/FilterEffectRenderer.cpp:
3402         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
3403
3404 2014-04-08  Zalan Bujtas  <zalan@apple.com>
3405
3406         Subpixel rendering: Make border images device pixel aware.
3407         https://bugs.webkit.org/show_bug.cgi?id=131209
3408
3409         Reviewed by Simon Fraser.
3410
3411         Snap border-image size and position to device pixels. It works both on generated and bitmap images.
3412
3413         Test: fast/borders/hidpi-border-image-gradient-on-subpixels.html
3414
3415         * rendering/RenderBoxModelObject.cpp:
3416         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3417
3418 2014-04-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3419
3420         [SOUP] Control cookie management according ResourceRequest.allowCookies()
3421         https://bugs.webkit.org/show_bug.cgi?id=131026
3422
3423         Reviewed by Sergio Villar Senin.
3424
3425         Added per soup-message disabling of cookie jar manager when related ResourceRequest does not allow cookies (e.g. some cross-origin requests).
3426
3427         Patch is covered by unskipped test http/tests/xmlhttprequest/cross-origin-cookie-storage.html.
3428
3429         * platform/network/soup/ResourceRequestSoup.cpp:
3430         (WebCore::ResourceRequest::updateSoupMessageMembers): Added disabling of cookie jar manager if cookies are not allowed.
3431
3432 2014-04-08  Sergio Villar Senin  <svillar@igalia.com>
3433
3434         [CSS Grid Layout] Handle min/max height in the grid element
3435         https://bugs.webkit.org/show_bug.cgi?id=131302
3436
3437         Reviewed by Darin Adler.
3438
3439         Removed a FIXME in the code as we're already handling min/max
3440         height in the code. Added a couple of test cases to improve the
3441         test coverage.
3442
3443         Merged from Blink r161876 by <jchaffraix@chromium.org>
3444
3445         Tests: fast/css-grid-layout/flex-content-sized-columns-resize.html
3446                fast/css-grid-layout/grid-element-min-max-height.html
3447
3448         * rendering/RenderGrid.cpp:
3449         (WebCore::RenderGrid::layoutGridItems):
3450
3451 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
3452
3453         [CSSRegions] Remove unused RenderBox::clearRenderBoxRegionInfo
3454         https://bugs.webkit.org/show_bug.cgi?id=131352
3455
3456         Reviewed by Andrei Bucur.
3457
3458         No new tests, code clean-up.
3459
3460         * rendering/RenderBox.cpp:
3461         (WebCore::RenderBox::clearRenderBoxRegionInfo): Deleted.
3462         * rendering/RenderBox.h:
3463
3464 2014-04-08  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3465
3466         Buildfix after r166917
3467         https://bugs.webkit.org/show_bug.cgi?id=131351
3468
3469         Reviewed by Andrei Bucur.
3470
3471         * accessibility/AccessibilityNodeObject.cpp:
3472         (WebCore::accessibleNameForNode):
3473
3474 2014-04-08  Darin Adler  <darin@apple.com>