[New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-17  David Hyatt  <hyatt@apple.com>
2
3         [New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
4         https://bugs.webkit.org/show_bug.cgi?id=131740
5
6         Reviewed by Enrica Casucci.
7         
8         I took the opportunity to clean this code up while adding support for the new columns.
9         columnNumberForOffset only applied for paginated RenderViews and was really about
10         pages and not columns. It also only returns an actual page number if the columns are
11         block progressed (e.g., right-to-left vertical Japanese books).
12         
13         Therefore I renamed columnNumberForOffset to pageNumberForBlockProgressionOffset and
14         moved it to RenderView.
15         
16         I also renamed the member variable of SelectionRect to be pageNumber instead of
17         columnNumber in order to make it more obvious that this isn't about columns per se
18         (since the fact that we implemented RenderView's pagination mode using columns is an
19         implementation detail).
20
21         * dom/Range.cpp:
22         (WebCore::coalesceSelectionRects):
23         (WebCore::Range::collectSelectionRects):
24         * platform/ios/SelectionRect.h:
25         (WebCore::SelectionRect::pageNumber):
26         (WebCore::SelectionRect::columnNumber): Deleted.
27         * rendering/RenderImage.cpp:
28         (WebCore::RenderImage::collectSelectionRects):
29         * rendering/RenderObject.cpp:
30         (WebCore::RenderObject::collectSelectionRects):
31         (WebCore::RenderObject::columnNumberForOffset): Deleted.
32         * rendering/RenderObject.h:
33         * rendering/RenderText.cpp:
34         (WebCore::RenderText::collectSelectionRects):
35         * rendering/RenderView.cpp:
36         (WebCore::RenderView::pageNumberForBlockProgressionOffset):
37         * rendering/RenderView.h:
38
39 2014-04-16  Brent Fulgham  <bfulgham@apple.com>
40
41         [Win] A few final cleanups to the DataObject classes.
42         https://bugs.webkit.org/show_bug.cgi?id=131784
43
44         Reviewed by Anders Carlsson.
45
46         * platform/win/WCDataObject.cpp:
47         (WebCore::WCDataObject::clearData): Use 'last()' method.
48
49 2014-04-15  Jer Noble  <jer.noble@apple.com>
50
51         Fullscreen media controls are unusable in pagination mode
52         https://bugs.webkit.org/show_bug.cgi?id=131705
53
54         Reviewed by Darin Adler.
55
56         When pagination mode is enabled, the full screen media will (depending on the width of the
57         pagination columns) overflow its column, and hit testing will be clipped to the column. In extreme
58         cases, where the column width < 0.5 * media element width, the media controls will be entirely
59         unclickable.
60
61         Rather than making the RenderFullScreen a child of the full screen element's parent's renderer,
62         make it a child of the RenderView, putting it outside of the columns entirely. Always create and
63         insert the fullscreenRenderer's placeholder, using it as the remembered insertion point for the
64         fullscreen element's renderer when we exit full screen.
65
66         Drive-by fix: don't wrap the full screen element's renderer in webkitWillEnterFullScreenForElement();
67         it will just be re-wrapped in createRendererIfNeeded().
68
69         * dom/Document.cpp:
70         (WebCore::Document::webkitWillEnterFullScreenForElement): Don't wrap the full screen element's renderer.
71         (WebCore::Document::setFullScreenRenderer): Call setPlaceholderStyle.
72         * rendering/RenderFullScreen.cpp:
73         (WebCore::RenderFullScreenPlaceholder::willBeDestroyed): Call clearPlaceholder.
74         (WebCore::RenderFullScreen::wrapRenderer): Make fullscreenRenderer a child of the view().
75         (WebCore::RenderFullScreen::unwrapRenderer): Return the children to the parent of the placeholder().
76         (WebCore::RenderFullScreen::clearPlaceholder): Renamed from setPlaceholder().
77         (WebCore::RenderFullScreen::ensurePlaceholder): Added. 
78         (WebCore::RenderFullScreen::setPlaceholderStyle): Renamed from createPlaceholder().
79         (WebCore::RenderFullScreen::setPlaceholder): Deleted.
80         (WebCore::RenderFullScreen::createPlaceholder): Deleted.
81         * rendering/RenderFullScreen.h:
82
83 2014-04-16  Jer Noble  <jer.noble@apple.com>
84
85         [MSE] Multiple initialization segments with same codecs in tracks fail validation.
86         https://bugs.webkit.org/show_bug.cgi?id=131768
87
88         Additional initialization segments added to the same SourceBuffer with the same
89         codec values will fail validation. Update the validation check to add the correct
90         codec information for the initial segment, and check against the correct codecs during
91         the validation step.
92
93         Additionally, after validation, if successful update the Audio, Video, and TextTracks
94         for the SourceBuffer with the updated initialization segment information.
95
96         Reviewed by Eric Carlson.
97
98         Test: media/media-source/media-source-multiple-initialization-segments.html
99
100         * Modules/mediasource/SourceBuffer.cpp:
101         (WebCore::SourceBuffer::appendBufferTimerFired): m_source may have been cleared
102             as a result of the append, so check it before using.
103         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Call streamEndedWithError
104             instead of endOfStream as the latter is safe to call within an update.
105         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto.
106             Update the track lists if validation succeeds.
107         (WebCore::SourceBuffer::validateInitializationSegment): Switch the audio and video
108             codec checks.
109
110         Add the ability for Audio, Video, and InbandTextTracks to replace their private tracks:
111         * html/track/AudioTrack.cpp:
112         (WebCore::AudioTrack::AudioTrack): Call updateKindFromPrivate().
113         (WebCore::AudioTrack::setPrivate):
114         (WebCore::AudioTrack::updateKindFromPrivate): Split out from constructor.
115         * html/track/AudioTrack.h:
116         * html/track/InbandTextTrack.cpp:
117         (WebCore::InbandTextTrack::InbandTextTrack): Call updateKindFromPrivate().
118         (WebCore::InbandTextTrack::setPrivate):
119         (WebCore::InbandTextTrack::setMode): Split up into setModeInternal().
120         (WebCore::InbandTextTrack::setModeInternal): Broke out from setMode().
121         (WebCore::InbandTextTrack::updateKindFromPrivate): Split out from constructor.
122         * html/track/InbandTextTrack.h:
123         * html/track/TextTrack.h:
124         (WebCore::TextTrack::isInband): Added, returns false.
125         * html/track/VideoTrack.cpp:
126         (WebCore::VideoTrack::VideoTrack): Call updateKindFromPrivate().
127         (WebCore::VideoTrack::setPrivate):
128         (WebCore::VideoTrack::updateKindFromPrivate):  Split out from constructor.
129         * html/track/VideoTrack.h:
130
131 2014-04-17  David Hyatt  <hyatt@apple.com>
132
133         [New Multicolumn] Column sets below spanners don't repaint properly.
134         https://bugs.webkit.org/show_bug.cgi?id=131778
135
136         Reviewed by Beth Dakin.
137
138         Added fast/repaint/spanner-with-margins.html.
139
140         * rendering/RenderBox.cpp:
141         (WebCore::RenderBox::computeRectForRepaint):
142         Turn off some code that was running for in-flow RenderFlowThreads that made no sense.
143         I'm not convinced the code is right for other types of RenderFlowThreads either,
144         but will leave that to the named flow thread experts. :)
145
146 2014-04-17  Koji Ishii  <kojishi@gmail.com>
147
148         Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
149         https://bugs.webkit.org/show_bug.cgi?id=131175
150
151         Reviewed by Darin Adler.
152
153         Tests: html5lib/resources/ruby.dat
154                html5lib/resources/tests19.dat
155
156         This patch makes WebKit HTML parser to match to the tag omission rules of HTML5 CR Feb 2014:
157         http://www.w3.org/TR/2014/CR-html5-20140204/syntax.html#syntax-tag-omission
158         with the support for two new elements (rb, rtc) which were also defined in the spec:
159         http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rb-element
160         http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rtc-element
161         to better support use cases presented by W3C I18N WG:
162         http://www.w3.org/TR/ruby-use-cases/
163
164         * html/HTMLTagNames.in: rb and rtc added as HTMLElement interfaces.
165         * html/parser/HTMLConstructionSite.cpp:
166         (WebCore::hasImpliedEndTag): the spec says rb and rtc have implied end tags.
167         * html/parser/HTMLTreeBuilder.cpp:
168         (WebCore::HTMLTreeBuilder::processStartTagForInBody): rb and rtc added. rt excludes rtc from its implied end tags.
169
170 2014-04-17  Darin Adler  <darin@apple.com>
171
172         Try to fix EFL and GTK builds.
173
174         * workers/WorkerGlobalScope.idl: Touch file to make it rebuild, assuming that
175         module dependencies aren't working right with CMake. Tweaked formatting quite a
176         bit while I was in here.
177
178 2014-04-17  David Hyatt  <hyatt@apple.com>
179
180         [New Multicolumn] REGRESSION: Column set styles don't update when zooming etc.
181         https://bugs.webkit.org/show_bug.cgi?id=131777
182
183         Reviewed by Enrica Casucci.
184
185         Added fast/multicol/zoom-test.html
186
187         * rendering/RenderBlockFlow.cpp:
188         (WebCore::RenderBlockFlow::styleDidChange):
189         Put back in the code that propagates new styles to the flow thread and column sets
190         when styles change. This propagation was removed when the column span code landed.
191         This patch puts it back in but qualifies the types of objects that get styles
192         propagated to avoid accidentally propagating the wrong style to column spans.
193
194 2014-04-17  Darin Adler  <darin@apple.com>
195
196         Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
197         https://bugs.webkit.org/show_bug.cgi?id=131785
198         rdar://problem/16003108
199
200         Reviewed by Brady Eidson.
201
202         * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
203
204         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Use the new conditional
205         instead of the old one.
206         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Ditto.
207         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Ditto.
208
209 2014-04-17  Dan Bernstein  <mitz@apple.com>
210
211         WebCore part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
212         https://bugs.webkit.org/show_bug.cgi?id=131783
213
214         Reviewed by Tim Horton.
215
216         * loader/NavigationAction.cpp:
217         (WebCore::NavigationAction::NavigationAction): Initialize m_processingUserGesture to
218         ScriptController::processingUserGesture() at the time the NavigationAction is constructed.
219         * loader/NavigationAction.h:
220         Added boolean member variable m_processionUserGesture
221         (WebCore::NavigationAction::processingUserGesture): Added this getter.
222
223 2014-04-17  Ion Rosca  <rosca@adobe.com>
224
225         [CSS Blending] Isolation descendant dependent flags are not updated correctly
226         https://bugs.webkit.org/show_bug.cgi?id=130892
227
228         Reviewed by Dean Jackson.
229
230         The isolation descendant dependent flag (m_hasUnisolatedBlendingDescendants)
231         will help us to determine if a layer should isolate blending descendants or not.
232         The m_hasUnisolatedBlendingDescendants flag should be set for layers that have blending descendant layers
233         not isolated by descendant stacking contexts.
234         An element isolatesBlending() if it has this flag set and creates stacking context.
235
236         Tests: css3/compositing/blend-mode-isolation-flags-append-non-stacking-context-blending.html
237                css3/compositing/blend-mode-isolation-flags-append-stacking-context-blending.html
238                css3/compositing/blend-mode-isolation-flags-remove-non-stacking-context-blending.html
239                css3/compositing/blend-mode-isolation-flags-remove-stacking-context-blending.html
240                css3/compositing/blend-mode-isolation-flags-turn-off-blending-no-isolation.html
241                css3/compositing/blend-mode-isolation-flags-turn-off-blending.html
242                css3/compositing/blend-mode-isolation-flags-turn-off-stacking-context.html
243                css3/compositing/blend-mode-isolation-flags-turn-on-blending.html
244                css3/compositing/blend-mode-isolation-flags-turn-on-stacking-context.html
245
246         * rendering/RenderLayer.cpp:
247         (WebCore::RenderLayer::RenderLayer):
248         (WebCore::RenderLayer::updateBlendMode):
249         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
250             When a layer has blending and it hasn't had it before, we set the isolation
251         flag for all its ancestors up to the first layer creating stacking context.
252         I removed the isComposited() check here. Isolation flags should be correct regardless
253         of compositing state. Moreover, if this method is called from styleChanged(),
254         the compositing state might not be accurate, it's going to be recalculated afterwards.  
255         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
256             When a layer doesn't have blending, but it used to have it before, we mark
257         the isolation flag as dirty for all its ancestors up to the first layer
258         creating stacking context. The isolation flags will be recalculated by
259         RenderLayer::updateDescendantDependentFlags.
260         (WebCore::RenderLayer::updateDescendantDependentFlags):
261             Evaluates if the layer has unisolated blending descendants by traversing
262         the layer subtree.
263         (WebCore::RenderLayer::addChild):
264             When adding a subtree that has blending or has some unisolated descendants,
265         we set the flag for all the ancestors, up to the stacking context layer.
266         (WebCore::RenderLayer::removeChild):
267             When removing a subtree that had blending or had some unisolated descendants,
268         we dirty the flag so that it could be reevaluated.
269         (WebCore::RenderLayer::calculateClipRects):
270         (WebCore::RenderLayer::updateTransform):
271         * rendering/RenderLayer.h:
272             Rename m_hasBlendedElementInChildStackingContext => m_hasUnisolatedBlendingDescendants
273         and m_hasBlendedElementInChildStackingContextStatusDirty => m_hasUnisolatedBlendingDescendantsStatusDirty,
274         * rendering/RenderLayerCompositor.cpp:
275         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
276             Add an assert to make sure that if m_hasUnisolatedCompositedBlendingDescendants is true,
277         then m_hasUnisolatedBlendingDescendants is true as well.
278
279 2014-04-17  Tim Horton  <timothy_horton@apple.com>
280
281         Uninline blend(Color, Color) to get AnimationUtilities out of Color.h
282         https://bugs.webkit.org/show_bug.cgi?id=131781
283
284         Reviewed by Simon Fraser.
285
286         * platform/graphics/Color.cpp:
287         (WebCore::blend):
288         Un-inline.
289
290         * platform/graphics/Color.h:
291         No more AnimationUtilities.
292
293 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
294
295         Fix the build after r167412
296
297         * platform/ScrollView.cpp:
298         (WebCore::ScrollView::updateScrollbars):
299
300 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
301
302         [iOS][WK2] Fix annoying scrolling bugs
303         https://bugs.webkit.org/show_bug.cgi?id=131722
304
305         Reviewed by Simon Fraser.
306
307         * platform/ScrollView.cpp:
308         (WebCore::ScrollView::updateScrollbars):
309         Since ScrollingStateScrollingNode::setRequestedScrollPosition() was added, we see ScrollView::updateScrollbars()
310         keep changing the scroll position to incorrect values.
311
312         On iOS, the scrollbars are handled by the native UI, the code just compute incorrect scroll position. On WebKit1,
313         the code does not run because there is a platformWidget().
314
315         Just #ifdef the whole useless code.
316
317 2014-04-16  Alexandru Chiculita  <achicu@adobe.com>
318
319         Improve performance of the RenderLayerCompositor::OverlapMap
320         https://bugs.webkit.org/show_bug.cgi?id=115063
321
322         Reviewed by Simon Fraser.
323
324         No new tests, no new functionality or behavior.
325
326         Do not use the OverlapMap in RenderLayerCompositor::computeCompositingRequirements if the layer already
327         has a 3D transform. This way we can avoid a potential expensive lookups when we know for sure the layer
328         is already supposed to be composited. 
329
330         Also, added a bounding box of the overlap map, so that it can catch cases when the new layer is not overlapping
331         any of the previous layers. This is pretty common when having composited layers laid out in a vertical/horizontal list.
332
333
334         * rendering/RenderLayerCompositor.cpp:
335         (OverlapMapContainer):
336         (WebCore::OverlapMapContainer::add):
337         (WebCore::OverlapMapContainer::overlapsLayers):
338         (WebCore::OverlapMapContainer::unite):
339         (WebCore):
340         (WebCore::RenderLayerCompositor::OverlapMap::add):
341         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
342         (WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer):
343         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
344         (RenderLayerCompositor::OverlapMap):
345         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
346
347 2014-04-16  Brian J. Burg  <burg@cs.washington.edu>
348
349         Web Replay: memoize fallback time values for document.lastModified
350         https://bugs.webkit.org/show_bug.cgi?id=131318
351
352         Reviewed by Joseph Pecoraro.
353
354         If a document's Last-Modified header can't be found or used, then 
355         document.lastModified is derived from the current system time or
356         from filesystem data, which is obviously nondeterministic.
357
358         It's better to handle this inside Document::lastModified rather than using
359         MemoizedDOMResult, because only the fallback case is nondeterministic.
360
361         Test: http/tests/inspector/replay/document-last-modified-fallback-value.html
362
363         The test is skipped for now, as it will be very flaky without the
364         functionality introduced by bugs 130728 and 129391.
365
366         * dom/Document.cpp:
367         (WebCore::Document::lastModified): Save or reuse memoized fallback value.
368         * replay/WebInputs.json: Add input DocumentLastModifiedDate.
369
370 2014-04-16  David Hyatt  <hyatt@apple.com>
371
372         [New Multicolumn] Selection gets confused when the mouse is in the column gaps.
373         https://bugs.webkit.org/show_bug.cgi?id=131739
374
375         Reviewed by Enrica Casucci.
376
377         * rendering/RenderBlock.cpp:
378         (WebCore::RenderBlock::selectionGaps):
379         Make sure not to paint selection gaps. This matches the old multi-column behavior. Even though
380         selection gaps *nearly* work with the new multi-column code, I am disabling them so that we
381         can turn them on without visual regressions.
382         
383         (WebCore::isChildHitTestCandidate):
384         Don't allow in-flow RenderFlowThreads to be descended into from positionForPoint. We always want
385         to look only at the spanners and at the sets.
386
387         * rendering/RenderMultiColumnFlowThread.cpp:
388         (WebCore::RenderMultiColumnFlowThread::nodeAtPoint):
389         * rendering/RenderMultiColumnFlowThread.h:
390         Override nodeAtPoint to disallow the RenderMultiColumnFlowThread from being considered for hit
391         testing when no DOM node is found. It's better to just let RenderBlock's positionForPoint run
392         to drill back down into the appropriate column set.
393
394         * rendering/RenderMultiColumnSet.cpp:
395         (WebCore::RenderMultiColumnSet::positionForPoint):
396         Implement positionForPoint for RenderMultiColumnSets. This is a straight-up port of the
397         old multi-column code's adjustPointToColumnContents function.
398
399         * rendering/RenderMultiColumnSet.h:
400         Add override of positionForPoint.
401
402 2014-04-16  Dean Jackson  <dino@apple.com>
403
404         MediaDocument on iOS should be full page
405         https://bugs.webkit.org/show_bug.cgi?id=131774
406
407         Reviewed by Jer Noble.
408
409         A MediaDocument on iOS has two problems. It can't rely
410         on intrinsic size, since it doesn't load the content until
411         a user gesture. Secondly, on a small screen you want the
412         media to fill the page.
413
414         Add width/height 100% for iOS documents.
415
416         Test: platform/iphone-simulator/media/media-document-controls-size.html
417
418         * html/MediaDocument.cpp:
419         (WebCore::MediaDocumentParser::createDocumentStructure):
420
421 2014-04-16  Roger Fong  <roger_fong@apple.com>
422
423         Add a way for layout tests to determine whether or not a plugin is snapshotted.
424         https://bugs.webkit.org/show_bug.cgi?id=131650.
425         <rdar://problem/16615528>
426
427         Reviewed by Dean Jackson.
428
429         * testing/Internals.cpp:
430         (WebCore::Internals::isPluginSnapshotted):
431         * testing/Internals.h:
432         * testing/Internals.idl:
433
434 2014-04-16  Zoltan Horvath  <zoltan@webkit.org>
435
436         Vanish unnecessary includes from Shapes.{h|cpp}
437         https://bugs.webkit.org/show_bug.cgi?id=131762
438
439         Reviewed by Andreas Kling.
440
441         No new tests, no behavior change.
442
443         * rendering/shapes/BoxShape.h:
444         * rendering/shapes/Shape.cpp:
445         * rendering/shapes/Shape.h:
446         * rendering/shapes/ShapeOutsideInfo.h:
447
448 2014-04-16  Andreas Kling  <akling@apple.com>
449
450         Revert direct caching of tagName and nodeName from r167383.
451
452         Ryosuke tells me this is not entirely safe, will need to rethink.
453
454         * dom/Element.idl:
455         * dom/Node.idl:
456
457 2014-04-16  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
458
459         Improve security mitigation added in webkit r94001.
460         We missed the case where attachLine was called when we already had an inline box wrapper.
461         https://bugs.webkit.org/show_bug.cgi?id=127285
462
463         Reviewed by Brent Fulgham.
464
465         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=150697&view=revision
466
467         * rendering/RenderBox.cpp:
468         (WebCore::RenderBox::positionLineBox):
469         * rendering/RenderBox.h:
470         (WebCore::RenderBox::setInlineBoxWrapper):
471
472 2014-04-16  Bem Jones-Bey  <bjonesbe@adobe.com>
473
474         Fix CodeGenerator.pm to only write files if the generated content has changed
475         https://bugs.webkit.org/show_bug.cgi?id=131756
476
477         Reviewed by Sam Weinig.
478
479         To improve build speed, don't touch generated files unless the newly
480         generated content is actually different.
481
482         * bindings/scripts/CodeGenerator.pm:
483         (UpdateFile):
484
485 2014-04-16  Andreas Kling  <akling@apple.com>
486
487         Add a way to cache never-changing IDL attributes in the wrapper.
488         <https://webkit.org/b/131759>
489
490         Some IDL attributes will always return the same value when queried
491         on an object, so let's have a way to avoid calling into C++ code
492         every time they are queried.
493
494         This patch adds a custom IDL thingy called "ReturnsCacheableValue"
495         which causes the code generator to emit code to cache the returned
496         value directly in the JS wrapper object.
497
498         Reviewed by Oliver Hunt.
499
500         * bindings/scripts/IDLAttributes.txt:
501         * bindings/scripts/CodeGeneratorJS.pm:
502         (GenerateImplementation):
503
504             Add ReturnsCacheableValue custom attribute.
505
506         * dom/Element.idl:
507         * dom/Node.idl:
508
509             Annotate some attributes that return fully cacheable values.
510
511         * bindings/scripts/test/*:
512
513             Rebaseline.
514
515 2014-04-16  Noel Gordon  <noel.gordon@gmail.com>
516
517         Progressive JPEG outputScanlines() calls should handle failure
518         https://bugs.webkit.org/show_bug.cgi?id=116701
519
520         Reviewed by Brent Fulgham.
521
522         outputScanlines() can fail and delete |this|. Copy the decoder pointer
523         member and use that copy to detect and handle the failure case.
524
525         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
526         (WebCore::JPEGImageReader::decode):
527
528 2014-04-16  Robert Sipka  <sipka@inf.u-szeged.hu>
529
530         [curl] Add WEB_TIMING support
531         https://bugs.webkit.org/show_bug.cgi?id=127555
532
533         Reviewed by Brent Fulgham.
534
535         Access timing information related to navigation.
536
537         * platform/network/curl/ResourceHandleManager.cpp:
538         (WebCore::milisecondsSinceRequest):
539         (WebCore::calculateWebTimingInformations):
540         (WebCore::sockoptfunction):
541         (WebCore::headerCallback):
542         (WebCore::ResourceHandleManager::downloadTimerCallback):
543         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
544         (WebCore::ResourceHandleManager::initializeHandle):
545
546 2014-04-16  Zoltan Horvath  <zoltan@webkit.org>
547
548         Cleanup header includes in ShapeOutsideInfo.h
549         https://bugs.webkit.org/show_bug.cgi?id=131750
550
551         Reviewed by Antti Koivisto.
552
553         Make the build faster by removing unnecessary header includes.
554
555         No new tests, no behavior change.
556
557         * rendering/shapes/ShapeOutsideInfo.h:
558
559 2014-04-16  Simon Fraser  <simon.fraser@apple.com>
560
561         Fix the iOS build.
562
563         * platform/graphics/cg/BitmapImageCG.cpp:
564         (WebCore::BitmapImage::draw):
565
566 2014-04-16  Alexey Proskuryakov  <ap@apple.com>
567
568         DataTransfer should cache its FileList
569         https://bugs.webkit.org/show_bug.cgi?id=131694
570
571         Reviewed by Darin Adler.
572
573         Test: fast/events/data-transfer-files-attribute-identity.html
574
575         * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readTerminal):
576         Switched to a new FileList constructor, CloneDeserializer doesn't really need to modify
577         the FileList with append().
578
579         * dom/DataTransfer.h:
580         * dom/DataTransfer.cpp:
581         (WebCore::DataTransfer::types): Added a FIXME.
582         (WebCore::DataTransfer::files): Changed to reuse a cached FileList. It's currently
583         easy, because we don't support DataTransferItemList. Once we do, making any changes
584         through it will also require updating the FileList in a way that doesn't replace
585         File objects for unchanged files.
586
587         * fileapi/FileList.h:
588         (WebCore::FileList::create):
589         (WebCore::FileList::isEmpty):
590         (WebCore::FileList::FileList):
591         (WebCore::FileList::append):
592         (WebCore::FileList::clear):
593         Made non-const functions private, because neither DataTransfer nor FileInputType
594         expect the list to be modified without their knowledge. Added a new Vector based
595         constructor so that a FileList could be created without the use of append().
596
597         * html/FileInputType.cpp: (WebCore::FileInputType::createFileList): Simplified
598         the code a little bit. FileInputType still needs to modify the list for clear(),
599         but doesn't need to add to it dynamically - unlike with DataTransfer, it's expected
600         to create a new FileList when it's modified.
601
602 2014-04-15  Brent Fulgham  <bfulgham@apple.com>
603
604         [Win] Eliminate use of deleteAllValues in Windows Files
605         https://bugs.webkit.org/show_bug.cgi?id=131631
606
607         Reviewed by Darin Adler.
608
609         Update to use std::unique_ptr for object lifetime. Get rid of
610         deleteAllValues now that it is no loner needed. Use ranged for
611         loops where possible.
612
613         * platform/win/WCDataObject.cpp:
614         (WebCore::WCEnumFormatEtc::WCEnumFormatEtc):
615         (WebCore::WCDataObject::~WCDataObject):
616         (WebCore::WCDataObject::GetData):
617         (WebCore::WCDataObject::QueryGetData):
618         (WebCore::WCDataObject::SetData):
619         (WebCore::WCDataObject::clearData):
620         * platform/win/WCDataObject.h:
621
622 2014-04-16  Chris Fleizach  <cfleizach@apple.com>
623
624         AX: Accessing a table cell with an invalid column header crashes
625         https://bugs.webkit.org/show_bug.cgi?id=131719
626
627         Reviewed by Darin Adler.
628
629         If no tableCell is available as a column/row header, then do not continue processing.
630
631         Test: accessibility/table-missing-column-header-crash.html
632
633         * accessibility/AccessibilityTableCell.cpp:
634         (WebCore::AccessibilityTableCell::columnHeaders):
635         (WebCore::AccessibilityTableCell::rowHeaders):
636
637 2014-04-16  Brendan Long  <b.long@cablelabs.com>
638
639         [GTK] Fix unused parameter warnings
640         https://bugs.webkit.org/show_bug.cgi?id=131721
641
642         Reviewed by Darin Adler.
643
644         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
645         (WebCore::toJS): Remove unused 'exec' parameter.
646
647 2014-04-16  Simon Fraser  <simon.fraser@apple.com>
648
649         Convert the boolean param of Image::startAnimation() to an enum
650         https://bugs.webkit.org/show_bug.cgi?id=131742
651
652         Reviewed by Tim Horton.
653
654         Use an enum to make the code more readable.
655
656         * platform/graphics/BitmapImage.cpp:
657         (WebCore::BitmapImage::startAnimation):
658         * platform/graphics/BitmapImage.h:
659         * platform/graphics/Image.cpp:
660         (WebCore::Image::drawTiled):
661         * platform/graphics/Image.h:
662         (WebCore::Image::startAnimation):
663         * svg/graphics/SVGImage.cpp:
664         (WebCore::SVGImage::startAnimation):
665         * svg/graphics/SVGImage.h:
666
667 2014-04-16  David Hyatt  <hyatt@apple.com>
668
669         Make sure to skip the RenderMultiColumnFlowThread when resolving percentage heights inside columns against
670         containing blocks. The flow thread's auto height should not interfere if a fixed height is specified on
671         an ancestor.
672
673         https://bugs.webkit.org/show_bug.cgi?id=131741
674
675         Reviewed by Simon Fraser.
676
677         Added fast/multicol/percent-height.html.
678
679         * rendering/RenderBox.cpp:
680         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
681         Add an isInFlowRenderFlowThread check so that we skip those blocks and don't consider them at all
682         when resolving percentage heights.
683
684 2014-04-16  Daewoong Jang  <daewoong.jang@navercorp.com>
685
686         [WinCairo][cURL] Build fix for WinCairo build with USE(CURL).
687         https://bugs.webkit.org/show_bug.cgi?id=131614
688
689         Reviewed by Brent Fulgham.
690
691         Build fix, no new tests needed.
692
693         * platform/network/curl/CurlCacheEntry.cpp:
694         (WebCore::CurlCacheEntry::loadResponseHeaders):
695         * platform/network/curl/CurlCacheManager.cpp:
696         (WebCore::CurlCacheManager::loadIndex):
697         * platform/network/soup/ResourceError.h:
698         * platform/network/soup/SocketStreamHandle.h:
699
700 2014-04-16  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
701
702         ASSERTION FAILED: x2 >= x1 in WebCore::RenderObject::drawLineForBoxSide
703         https://bugs.webkit.org/show_bug.cgi?id=127835
704
705         In some cases when a negative margin and a positive padding are applied
706         together to the right and/or left side of the box, the logical width of
707         the borders can be set to a negative value, making the assertion fire.
708         The fix checks if the width or height of the box is negative, and if so,
709         it will not display the borders and shadows of the box.
710
711         Reviewed by Darin Adler.
712
713         Test: fast/css/padding-margin-negative-border.html
714
715         * rendering/RenderBoxModelObject.cpp:
716         (WebCore::RenderBoxModelObject::paintBorder):
717
718 2014-04-16  Jer Noble  <jer.noble@apple.com>
719
720         [MSE] Seeks into buffered ranges will never complete.
721         https://bugs.webkit.org/show_bug.cgi?id=131717
722
723         Reviewed by Eric Carlson.
724
725         Test: media/media-source/media-source-seek-complete.html
726
727         Run the SourceBuffer Monitoring step after initiating a seek.
728
729         * Modules/mediasource/SourceBuffer.cpp:
730         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
731
732 2014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
733
734         [EFL] Fix problems with the pixel dump.
735         https://bugs.webkit.org/show_bug.cgi?id=131265
736
737         Reviewed by Gyuyoung Kim.
738
739         Painting and compositing paths of WebKit-EFL were totally modified from r166768.
740         However pixel dump codes still call deprecated functions like ewk_view_paint(),
741         which causes that nothing is drawn.
742
743         This patch adds new member functions to AcceleratedCompositingContext to support pixel dump.
744         One of new functions is AcceleratedCompositingContext::extractImageData(),
745         which replaces deprecated function calls. Besides the extractImageData() is invoked by
746         ewk_view_screenshot_contents_get() in order to take the visible content displayed on the EFL webview.
747
748         * platform/graphics/cairo/CairoUtilities.cpp:
749         (WebCore::flipImageSurfaceVertically): Flip pixel data of given cairo_surface_t vertically up/down.
750         Whereas Cairo uses the top-left corner as being 0,0 of the coordinate system,
751         OpenGL uses the bottom-left corner being 0,0.
752         So we need to vertically flip resultant images taken by glReadPixels().
753         * platform/graphics/cairo/CairoUtilities.h:
754
755 2014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
756
757         Make page overlay functionality working on coordinated graphics.
758         https://bugs.webkit.org/show_bug.cgi?id=131425
759
760         Reviewed by Darin Adler.
761
762         Page overlay functionality did not work on coordinated graphics since r166975.
763         This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
764         and makes CoordinatedLayerTreeHost use PageOverlayController.
765
766         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
767         (WebCore::CompositingCoordinator::setRootCompositingLayer):
768         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
769         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
770
771 2014-04-10  Roger Fong  <roger_fong@apple.com>
772
773         Snapshotted plugins may need to be restarted if style properties are changed after initial load of plugin.
774         https://bugs.webkit.org/show_bug.cgi?id=131553.
775         <rdar://problem/15443375>
776
777         Reviewed by Timothy Horton.
778
779         Test: plugins/snapshotting/set-plugin-size-to-tiny.html
780
781         When updating embedded objects during our post layout checks, check for certain style changes
782         that may result in the plugin needing to be restarted.
783
784         * html/HTMLPlugInImageElement.h: 
785         Add m_plugInDimensionsSpecified field to keep track of whether or not dimensions on the plugin’s renderer have been specified.
786         * html/HTMLPlugInImageElement.cpp:
787         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
788         Initialize m_plugInDimensionsSpecified.
789         (WebCore::isSmallerThanTinySizingThreshold):
790         Refactoring, move check for whether or not plugin is smaller than the tiny plugin size threshold to this method.
791         (WebCore::HTMLPlugInImageElement::isTopLevelFullPage): 
792         Refactoring, move check for whether or not plugin is top level full page to this method.
793         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): 
794         Use refactored checks here as well to determine whether or not we need to restart the snapshotted plugin.
795         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use refactored checks.
796         If plugin dimensions were specified, set m_plugInDimensionsSpecified to true.
797
798 2014-04-15  Andreas Kling  <akling@apple.com>
799
800         [iOS WebKit2] Listen for system memory pressure notifications.
801         <https://webkit.org/b/131653>
802         <rdar://problem/16208123>
803
804         Reviewed by Antti Koivisto.
805
806         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
807         (WebCore::MemoryPressureHandler::install):
808
809             Use the right invocation to summon the memory pressure handler.
810
811         (WebCore::MemoryPressureHandler::install):
812         (WebCore::MemoryPressureHandler::uninstall):
813         (WebCore::MemoryPressureHandler::holdOff):
814         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
815
816             Make stubbed out functions !PLATFORM(COCOA)
817
818 2014-04-14  Morten Stenshorne  <mstensho@opera.com>
819
820         [New Multicolumn] Add support for column-span:all
821         https://bugs.webkit.org/show_bug.cgi?id=129330
822
823         Reviewed by Dave Hyatt.
824
825         Column spanners are implemented as siblings of RenderMultiColumnSet
826         objects (i.e. the regions for the column rows). This means that they
827         are pulled out from the flow thread tree where they would otherwise
828         live. This causes some complexity, most of which is contained within
829         the multicol code.
830
831         A placeholder is put in the flow thread tree where the spanner's
832         renderer would otherwise live. This is needed in order make sure that
833         we interrupt line layout before after the spanner. We also need this
834         to be able to switch from one multicol set to the next.
835
836         Some extra logic is required when dynamically inserting and removing
837         flow thread descendants now, because we need to figure out if the
838         renderer added should trigger creation of new multi column sets. If
839         a spanner is inserted in the middle of a multi column set, we need to
840         detect this, split the set and put the spanner in the middle.
841
842         Wrote a bunch of tests. A few of the tests were copied from existing
843         (old-impl) tests and put in a separate directory. That directory can
844         be wiped when we turn on the new multicol implementation by default.
845
846         Tests: fast/multicol/newmulticol/adjacent-spanners.html
847                fast/multicol/newmulticol/block-becomes-spanner.html
848                fast/multicol/newmulticol/change-spanner-display.html
849                fast/multicol/newmulticol/change-spanner-parent-display.html
850                fast/multicol/newmulticol/compare-with-old-impl/anonymous-block-split-crash.html
851                fast/multicol/newmulticol/compare-with-old-impl/before-child-anonymous-column-block.html
852                fast/multicol/newmulticol/compare-with-old-impl/clone-before-after-content-crash.html
853                fast/multicol/newmulticol/compare-with-old-impl/clone-block-children-inline-mismatch-crash.html
854                fast/multicol/newmulticol/compare-with-old-impl/clone-flexbox.html
855                fast/multicol/newmulticol/compare-with-old-impl/clone-summary.html
856                fast/multicol/newmulticol/compare-with-old-impl/column-span-inside-multicol-webkit-box.html
857                fast/multicol/newmulticol/compare-with-old-impl/continuation-crash.html
858                fast/multicol/newmulticol/compare-with-old-impl/double-merge-anonymous-block-crash.html
859                fast/multicol/newmulticol/compare-with-old-impl/empty-anonymous-block-split-crash.html
860                fast/multicol/newmulticol/compare-with-old-impl/float-not-removed-crash.html
861                fast/multicol/newmulticol/compare-with-old-impl/list-multi-column-crash.html
862                fast/multicol/newmulticol/compare-with-old-impl/positioned-child-not-removed-crash.html
863                fast/multicol/newmulticol/compare-with-old-impl/positioned-objects-not-removed-crash.html
864                fast/multicol/newmulticol/compare-with-old-impl/recursive-split-flow-crash.html
865                fast/multicol/newmulticol/compare-with-old-impl/removal-of-multicol-span-crash.html
866                fast/multicol/newmulticol/compare-with-old-impl/remove-child-split-flow-crash.html
867                fast/multicol/newmulticol/compare-with-old-impl/runin-continuation-crash.html
868                fast/multicol/newmulticol/compare-with-old-impl/span-as-immediate-child-complex-splitting.html
869                fast/multicol/newmulticol/compare-with-old-impl/span-as-nested-inline-block-child.html
870                fast/multicol/newmulticol/compare-with-old-impl/split-flow-anonymous-wrapper-crash.html
871                fast/multicol/newmulticol/compare-with-old-impl/split-inline-wrong-post-block-crash.html
872                fast/multicol/newmulticol/compare-with-old-impl/table-multi-column-crash.html
873                fast/multicol/newmulticol/compare-with-old-impl/textbox-not-removed-crash.html
874                fast/multicol/newmulticol/compare-with-old-impl/update-after-content-before-child-crash.html
875                fast/multicol/newmulticol/insert-row-content1.html
876                fast/multicol/newmulticol/insert-row-content2.html
877                fast/multicol/newmulticol/insert-row-content3.html
878                fast/multicol/newmulticol/insert-row-content4.html
879                fast/multicol/newmulticol/insert-row-content5.html
880                fast/multicol/newmulticol/insert-row-content6.html
881                fast/multicol/newmulticol/insert-row-content7.html
882                fast/multicol/newmulticol/insert-row-content8.html
883                fast/multicol/newmulticol/insert-row-content9.html
884                fast/multicol/newmulticol/insert-spanner-child1.html
885                fast/multicol/newmulticol/insert-spanner-child2.html
886                fast/multicol/newmulticol/insert-spanner-child3.html
887                fast/multicol/newmulticol/insert-spanner1.html
888                fast/multicol/newmulticol/insert-spanner2.html
889                fast/multicol/newmulticol/insert-spanner3.html
890                fast/multicol/newmulticol/insert-spanner4.html
891                fast/multicol/newmulticol/insert-spanner5.html
892                fast/multicol/newmulticol/insert-spanner6.html
893                fast/multicol/newmulticol/insert-spanner7.html
894                fast/multicol/newmulticol/insert-spanner8.html
895                fast/multicol/newmulticol/multicol-with-spanner-becomes-regular-block.html
896                fast/multicol/newmulticol/remove-row-content1.html
897                fast/multicol/newmulticol/remove-row-content2.html
898                fast/multicol/newmulticol/remove-row-content3.html
899                fast/multicol/newmulticol/remove-row-content4.html
900                fast/multicol/newmulticol/remove-row-content5.html
901                fast/multicol/newmulticol/remove-row-content6.html
902                fast/multicol/newmulticol/remove-row-content7.html
903                fast/multicol/newmulticol/remove-row-content8.html
904                fast/multicol/newmulticol/remove-row-content9.html
905                fast/multicol/newmulticol/remove-spanner1.html
906                fast/multicol/newmulticol/remove-spanner2.html
907                fast/multicol/newmulticol/remove-spanner3.html
908                fast/multicol/newmulticol/remove-spanner4.html
909                fast/multicol/newmulticol/remove-spanner5.html
910                fast/multicol/newmulticol/remove-spanner6.html
911                fast/multicol/newmulticol/sole-spanner.html
912                fast/multicol/newmulticol/span-between-text.html
913                fast/multicol/newmulticol/spanner-becomes-regular-block.html
914                fast/multicol/newmulticol/spanner-first.html
915                fast/multicol/newmulticol/spanner-img.html
916                fast/multicol/newmulticol/spanner-inline-block.html
917                fast/multicol/newmulticol/spanner-last.html
918                fast/multicol/newmulticol/spanner-nested-dynamic.html
919                fast/multicol/newmulticol/spanner-nested.html
920                fast/multicol/newmulticol/spanner-pseudo-after1.html
921                fast/multicol/newmulticol/spanner-pseudo-after2.html
922                fast/multicol/newmulticol/spanner-pseudo-after3.html
923                fast/multicol/newmulticol/spanner-pseudo-after4.html
924                fast/multicol/newmulticol/spanner-pseudo-before-after1.html
925                fast/multicol/newmulticol/spanner-pseudo-before-after2.html
926                fast/multicol/newmulticol/spanner-pseudo-before-after3.html
927                fast/multicol/newmulticol/spanner-pseudo-before-after4.html
928                fast/multicol/newmulticol/spanner-pseudo-before1.html
929                fast/multicol/newmulticol/spanner-pseudo-before2.html
930                fast/multicol/newmulticol/spanner-pseudo-before3.html
931                fast/multicol/newmulticol/spanner-pseudo-before4.html
932                fast/multicol/newmulticol/spanner-table.html
933                fast/multicol/newmulticol/spanner-with-margin.html
934                fast/multicol/newmulticol/spanner1.html
935                fast/multicol/newmulticol/spanner2.html
936                fast/multicol/newmulticol/spanner3.html
937                fast/multicol/newmulticol/spanner4.html
938                fast/multicol/newmulticol/spanner5.html
939                fast/multicol/newmulticol/spanner6.html
940                fast/multicol/newmulticol/spanner7.html
941                fast/multicol/newmulticol/spanner8.html
942                fast/multicol/newmulticol/spanner9.html
943                fast/multicol/newmulticol/trailing-margin-with-spanner.html
944                fast/multicol/newmulticol/trailing-margin-with-spanner2.html
945
946         * CMakeLists.txt:
947         * WebCore.vcxproj/WebCore.vcxproj:
948         * WebCore.vcxproj/WebCore.vcxproj.filters:
949         * rendering/RenderBlock.cpp:
950         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
951         Disable the old anonymous multicol container and spanner anonymous
952         block generation machinery when the new multicol implementation is
953         enabled.
954         * rendering/RenderBlockFlow.cpp:
955         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
956         (WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
957         (WebCore::RenderBlockFlow::layoutBlockChild): Need to notify the
958         flow thread when a descendant's final position is known. Spanner
959         placeholders need to know where to terminate the column set that
960         it follows.
961         (WebCore::RenderBlockFlow::styleDidChange): Remove old code that
962         isn't needed anymore. The renderers in question (flow thread and
963         column sets) set display:block on themselves already. This code
964         caused problems for spanners, which got all their style wiped.
965         (WebCore::RenderBlockFlow::setMultiColumnFlowThread): If setting
966         the flow thread to nullptr, there's no need to create the "rare
967         data" structure.
968         (WebCore::RenderBlockFlow::relayoutForPagination):
969         (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
970         (WebCore::RenderBlockFlow::addChild): beforeChild is retrieved via
971         the DOM. If it is a spanner, we need to locate the placeholder
972         here, because that's the correct location to insert siblings,
973         DOM-wise.
974         (WebCore::RenderBlockFlow::removeChild): The multicol flow thread
975         needs to know when children disappear.
976         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
977         Don't modify the height back and forth when calculating the
978         multicol container's final height, as that messes up balancing.
979         (WebCore::RenderBlockFlow::insertedIntoTree): Deleted.
980         (WebCore::RenderBlockFlow::willBeDestroyed): Deleted.
981         (WebCore::RenderBlockFlow::styleWillChange): Deleted.
982         (WebCore::RenderBlockFlow::lineAtIndex): Deleted.
983         * rendering/RenderBlockFlow.h:
984         * rendering/RenderElement.cpp:
985         (WebCore::RenderElement::insertedIntoTree): Set up an element's
986         layer before notifying the flow thread. The multicol flow thread
987         may decide to move the element (if it's a spanner), which may
988         involve re-insertion of layers.  Calling
989         RenderObject::insertedIntoTree() last instead of first also better
990         matches the order we used to have prior to the introduction of
991         RenderElement, FWIW.
992         * rendering/RenderFlowThread.cpp:
993         (WebCore::RenderFlowThread::layout):
994         (WebCore::RenderFlowThread::removeRegionFromThread): Deleted.
995         (WebCore::RenderFlowThread::invalidateRegions): Deleted.
996         * rendering/RenderFlowThread.h:
997         * rendering/RenderMultiColumnFlowThread.cpp:
998         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
999         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): When
1000         a flow thread descendant is inserted, the multicol flow thread
1001         needs to be notified.
1002         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
1003         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
1004         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
1005         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
1006         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
1007         (WebCore::RenderMultiColumnFlowThread::layout):
1008         (WebCore::RenderMultiColumnFlowThread::findSetRendering):
1009         (WebCore::RenderMultiColumnFlowThread::populate):
1010         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
1011         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
1012         (WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree):
1013         Need to detach column sets here, since they have pointers to their
1014         flow thread.
1015         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
1016         (WebCore::isValidColumnSpanner):
1017         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1018         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
1019         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
1020         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
1021         Nothing to be done here for the time being. Column sets are now
1022         created during box creation. We are going to need to add some code
1023         here again once multicol properly supports nested fragmentation
1024         contexts (and you get adjacent column rows because of that).
1025         (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
1026         During layout, don't trust the region interval tree, as that one
1027         depends on the resulting layout.
1028         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox): With
1029         a convenience method to get the last column set, and column sets
1030         now being created during normal box creation, this young method
1031         needs an overhaul.
1032         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
1033         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
1034         * rendering/RenderMultiColumnFlowThread.h:
1035         * rendering/RenderMultiColumnSet.cpp:
1036         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
1037         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
1038         (WebCore::RenderMultiColumnSet::firstRendererInFlowThread):
1039         (WebCore::RenderMultiColumnSet::lastRendererInFlowThread):
1040         (WebCore::precedesRenderer):
1041         (WebCore::RenderMultiColumnSet::containsRendererInFlowThread):
1042         (WebCore::RenderMultiColumnSet::setLogicalTopInFlowThread):
1043         (WebCore::RenderMultiColumnSet::setLogicalBottomInFlowThread):
1044         (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
1045         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
1046         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
1047         (WebCore::RenderMultiColumnSet::addForcedBreak):
1048         (WebCore::RenderMultiColumnSet::recalculateColumnHeight):
1049         Previously only needed if columns were to be balanced, now it's
1050         also needed when not balancing.
1051         (WebCore::RenderMultiColumnSet::recordSpaceShortage): Some layout
1052         elements actually have 0 height. Skip them, since they're not
1053         taking us anywhere.
1054         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
1055         (WebCore::RenderMultiColumnSet::requiresBalancing): Column sets
1056         now have individual balancing needs. If they precede a spanner,
1057         they must always be balanced. For the last column set, see if
1058         height is unspecified or column-fill is 'balance' (like before).
1059         (WebCore::RenderMultiColumnSet::prepareForLayout):
1060         (WebCore::RenderMultiColumnSet::beginFlow):
1061         (WebCore::RenderMultiColumnSet::endFlow):
1062         (WebCore::RenderMultiColumnSet::layout):
1063         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
1064         (WebCore::RenderMultiColumnSet::columnRectAt):
1065         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1066         (WebCore::RenderMultiColumnSet::paintColumnRules):
1067         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting):
1068         (WebCore::RenderMultiColumnSet::collectLayerFragments):
1069         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1070         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight): Deleted.
1071         (WebCore::RenderMultiColumnSet::findRunWithTallestColumns): Deleted.
1072         (WebCore::RenderMultiColumnSet::clearForcedBreaks): Deleted.
1073         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent): Deleted.
1074         * rendering/RenderMultiColumnSet.h:
1075         * rendering/RenderMultiColumnSpannerPlaceholder.cpp: Added.
1076         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
1077         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
1078         (WebCore::RenderMultiColumnSpannerPlaceholder::renderName):
1079         * rendering/RenderMultiColumnSpannerPlaceholder.h: Added.
1080         * rendering/RenderObject.cpp:
1081         (WebCore::RenderObject::insertedIntoTree): Need to notify the
1082         multicol flow thread when descendants are inserted. That may
1083         trigger insertion of column sets, or, in the case of spanners,
1084         they need to be moved out from the flow thread.
1085         * rendering/RenderObject.h:
1086         (WebCore::RenderObject::isRenderMultiColumnSpannerPlaceholder):
1087         (WebCore::RenderObject::isAnonymousBlock): Exclude column sets
1088         here, so that they don't get involved in anonymous block merging
1089         and other kinds of fun.
1090         * rendering/RenderRegion.h:
1091         * rendering/RenderRegionSet.h:
1092
1093 2014-04-15  Simon Fraser  <simon.fraser@apple.com>
1094
1095         LayerTreeAsTextBehavior should be in the WebCore namespace
1096         https://bugs.webkit.org/show_bug.cgi?id=131683
1097
1098         Reviewed by Andrei Bucur.
1099
1100         Move LayerTreeAsTextBehavior and the bit flags into the WebCore namespace.
1101
1102         * platform/graphics/GraphicsLayer.cpp:
1103         (showGraphicsLayerTree):
1104         * platform/graphics/GraphicsLayer.h:
1105
1106 2014-04-15  Benjamin Poulain  <bpoulain@apple.com>
1107
1108         ViewportConfiguration handles userZoom incorrectly
1109         https://bugs.webkit.org/show_bug.cgi?id=131657
1110
1111         Reviewed by Darin Adler.
1112
1113         * page/ViewportConfiguration.cpp:
1114         (WebCore::viewportArgumentUserZoomIsSet):
1115         (WebCore::ViewportConfiguration::updateConfiguration):
1116         The other viewport values must be strictly positive, userZoom is always either zero, one or minus one.
1117         As a result, the value zero was never set.
1118
1119 2014-04-15  Simon Fraser  <simon.fraser@apple.com>
1120
1121         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
1122         https://bugs.webkit.org/show_bug.cgi?id=131665
1123
1124         Reviewed by Tim Horton.
1125
1126         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
1127         was triggering a compositing layer flush when called with a null rootLayer, which happens
1128         for pages going into the page cache. This would trigger a layer flush that would clobber
1129         the root layer for the visible page, resulting in missing content.
1130         
1131         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
1132         was being added to (and then removed from) every single compositing layers.
1133         
1134         Fix both these by changing to a pull model, where RenderLayerCompositor requests
1135         the overlay layer via ChromeClient, and gets it at the end of every flush,
1136         adding to the children of the root layer.
1137
1138         * WebCore.exp.in:
1139         * page/ChromeClient.h:
1140         (WebCore::ChromeClient::documentOverlayLayerForFrame):
1141         * rendering/RenderLayerCompositor.cpp:
1142         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1143         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Put visibleRect
1144         into a variable for ease of debugging.
1145         (WebCore::RenderLayerCompositor::updateCompositingLayers): Asser
1146         that we're not in the page cache (this would have caught the bug).
1147         (WebCore::RenderLayerCompositor::appendOverlayLayers):
1148         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1149         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer): Deleted.
1150         * rendering/RenderLayerCompositor.h:
1151
1152 2014-04-15  Commit Queue  <commit-queue@webkit.org>
1153
1154         Unreviewed, rolling out r167199 and r167251.
1155         https://bugs.webkit.org/show_bug.cgi?id=131678
1156
1157         Caused a DYEBench regression and does not seem to improve perf
1158         on relevant websites (Requested by rniwa on #webkit).
1159
1160         Reverted changesets:
1161
1162         "Rewrite Function.bind as a builtin"
1163         https://bugs.webkit.org/show_bug.cgi?id=131083
1164         http://trac.webkit.org/changeset/167199
1165
1166         "Update test result"
1167         http://trac.webkit.org/changeset/167251
1168
1169 2014-04-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1170
1171         Remove unnecessary null checking in NavigatorContentUtils
1172         https://bugs.webkit.org/show_bug.cgi?id=131652
1173
1174         Reviewed by Darin Adler.
1175
1176         Some functions have checked if document is null. However, document is always not
1177         null when frame is existed.
1178
1179         No new tests, no behavior changes.
1180
1181         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1182         (WebCore::NavigatorContentUtils::registerProtocolHandler):
1183         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
1184         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
1185
1186 2014-04-15  Commit Queue  <commit-queue@webkit.org>
1187
1188         Unreviewed, rolling out r167298.
1189         https://bugs.webkit.org/show_bug.cgi?id=131670
1190
1191         Broke CSS filters (17 test crashes) (Requested by ap on
1192         #webkit).
1193
1194         Reverted changeset:
1195
1196         "[iOS WK2] Pages often blank on first load if page loaded by
1197         typing the URL"
1198         https://bugs.webkit.org/show_bug.cgi?id=131665
1199         http://trac.webkit.org/changeset/167298
1200
1201 2014-04-14  Pratik Solanki  <psolanki@apple.com>
1202
1203         Unreviewed. Attempt to fix Windows build after r167277.
1204
1205         * page/FrameView.cpp:
1206         (WebCore::FrameView::willPaintContents):
1207
1208 2014-04-14  Commit Queue  <commit-queue@webkit.org>
1209
1210         Unreviewed, rolling out r167261.
1211         https://bugs.webkit.org/show_bug.cgi?id=131667
1212
1213         broke many navigation tests (Requested by ap on #webkit).
1214
1215         Reverted changeset:
1216
1217         "Web Replay: memoize fallback time values for
1218         document.lastModified"
1219         https://bugs.webkit.org/show_bug.cgi?id=131318
1220         http://trac.webkit.org/changeset/167261
1221
1222 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1223
1224         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
1225         https://bugs.webkit.org/show_bug.cgi?id=131665
1226
1227         Reviewed by Tim Horton.
1228
1229         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
1230         was triggering a compositing layer flush when called with a null rootLayer, which happens
1231         for pages going into the page cache. This would trigger a layer flush that would clobber
1232         the root layer for the visible page, resulting in missing content.
1233         
1234         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
1235         was being added to (and then removed from) every single compositing layers.
1236         
1237         Fix both these by changing to a pull model, where RenderLayerCompositor requests
1238         the overlay layer via ChromeClient, and gets it at the end of every flush,
1239         adding to the children of the root layer.
1240
1241         * WebCore.exp.in:
1242         * page/ChromeClient.h:
1243         (WebCore::ChromeClient::documentOverlayLayerForFrame):
1244         * rendering/RenderLayerCompositor.cpp:
1245         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1246         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Put visibleRect
1247         into a variable for ease of debugging.
1248         (WebCore::RenderLayerCompositor::updateCompositingLayers): Asser
1249         that we're not in the page cache (this would have caught the bug).
1250         (WebCore::RenderLayerCompositor::appendOverlayLayers):
1251         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1252         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer): Deleted.
1253         * rendering/RenderLayerCompositor.h:
1254
1255 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
1256
1257         Assertion failure under FEImage::determineAbsolutePaintRect()
1258
1259         <https://bugs.webkit.org/show_bug.cgi?id=131660>
1260         <rdar://problem/15669294>
1261
1262         This patch merges Chromium r149536 (see
1263         <https://chromiumcodereview.appspot.com/14701012>), which moves
1264         m_absoluteTransform out of SVGFilter and into the base Filter class, so
1265         that it isn't necessary to cast a Filter to SVGFilter to get the
1266         absolute transform.
1267
1268         Reviewed by Geoffrey Garen.
1269
1270         Test: svg/filters/feImage-filter-assertion.html
1271
1272         * platform/graphics/filters/Filter.h:
1273         (WebCore::Filter::Filter):
1274         Changed to take the absolute transform.
1275         (WebCore::Filter::absoluteTransform):
1276         Moved from SVGFilter.
1277         (WebCore::Filter::mapAbsolutePointToLocalPoint):
1278         Ditto.
1279
1280         * rendering/FilterEffectRenderer.cpp:
1281         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1282         Pass a default AffineTransform() to the Filter base class.
1283
1284         * svg/graphics/filters/SVGFEImage.cpp:
1285         (WebCore::FEImage::determineAbsolutePaintRect):
1286         Use the Filter without casting it to SVGFilter.
1287         (WebCore::FEImage::platformApplySoftware):
1288         Ditto.
1289
1290         * svg/graphics/filters/SVGFilter.cpp:
1291         (WebCore::SVGFilter::SVGFilter):
1292         Pass the transform to the base class, and remove initialization of a
1293         removed member var.
1294
1295         * svg/graphics/filters/SVGFilter.h:
1296         Member var moved to Filter.h.
1297
1298 2014-04-14  Darin Adler  <darin@apple.com>
1299
1300         REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
1301         https://bugs.webkit.org/show_bug.cgi?id=126322
1302
1303         Reviewed by Ryosuke Niwa.
1304
1305         One additional tweak to the fix for the bug above.
1306         Fixes crash in editing/editability/ignored-content.html test.
1307
1308         * html/HTMLObjectElement.cpp:
1309         (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to
1310         HTMLElement::canContainRangeEndPoint, bypassing HTMLPlugInElement override
1311         that always returns false. Without this change, this function was always
1312         returning false.
1313
1314 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1315
1316         Crash in TileController::tileRevalidationTimerFired
1317         https://bugs.webkit.org/show_bug.cgi?id=131656
1318         <rdar://problem/16583166>
1319
1320         Reviewed by Sam Weinig.
1321
1322         It's possible for the TileController revalidation timer to fire after
1323         the GraphicsLayer has been destroyed, so the PlatformCALayer no longer
1324         has an owningGraphicsLayer.
1325         
1326         Bail from the timer callback if owningGraphicsLayer() is null.
1327         
1328         Also some drive-by 0 -> nullptr changes.
1329
1330         * platform/graphics/ca/GraphicsLayerCA.cpp:
1331         (WebCore::GraphicsLayerCA::willBeDestroyed):
1332         * platform/graphics/ca/PlatformCALayer.cpp:
1333         (WebCore::PlatformCALayer::~PlatformCALayer):
1334         * platform/graphics/ca/mac/TileController.mm:
1335         (WebCore::TileController::tileRevalidationTimerFired):
1336
1337 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
1338
1339         [CSS Shapes] Remove some leftover shape-inside code
1340         https://bugs.webkit.org/show_bug.cgi?id=131641
1341
1342         Reviewed by Dean Jackson.
1343
1344         I discovered that some code had been leftover from the shape-inside
1345         removal. This removes that leftover code.
1346
1347         No new tests, no behavior change.
1348
1349         * platform/text/BidiResolver.h:
1350         * rendering/BidiRun.cpp:
1351         (WebCore::BidiRun::BidiRun):
1352         * rendering/RenderBlockFlow.h:
1353         * rendering/RenderBlockLineLayout.cpp:
1354         (WebCore::RenderBlockFlow::createLineBoxes):
1355         (WebCore::RenderBlockFlow::constructLine):
1356         (WebCore::computeExpansionForJustifiedText):
1357         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1358
1359 2014-04-14  Jer Noble  <jer.noble@apple.com>
1360
1361         [MSE][Mac] video.currentTime is sometimes negative.
1362         https://bugs.webkit.org/show_bug.cgi?id=131644
1363
1364         Reviewed by Eric Carlson.
1365
1366         AVSampleBufferRenderSynchronizer will occasionally return slightly negative values
1367         when beginning playback. Clamp the return value to 0.
1368
1369         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1370         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
1371
1372 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
1373
1374         [CSSExclusions] Remove FIXME referencing closed bug
1375         https://bugs.webkit.org/show_bug.cgi?id=131645
1376
1377         Reviewed by Dean Jackson.
1378
1379         This is silly, but the comment is really confusing as it's entirely
1380         wrong now.
1381
1382         No new tests, no behavior change.
1383
1384         * rendering/style/RenderStyle.cpp:
1385         (WebCore::RenderStyle::changeRequiresRepaint):
1386
1387 2014-04-14  Andreas Kling  <akling@apple.com>
1388
1389         Build fixage.
1390
1391         * page/FrameView.cpp:
1392
1393 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
1394
1395         Assertion failure !node || node->isElementNode() in
1396         WebCore::RenderBlock::inlineElementContinuation
1397   
1398         https://bugs.webkit.org/show_bug.cgi?id=108829
1399         <rdar://problem/13666405>
1400   
1401         I can't reproduce this assertion failure, but there seems to be an
1402         invalid assumption in RenderBlock::inlineElementContinuation() that
1403         anything with the "isInline()" bit set is a RenderInline.
1404         
1405         No new test because the test case in the bug does not repro for me.
1406
1407         Reviewed by Brent Fulgham.
1408
1409         * rendering/RenderBlock.cpp:
1410         (WebCore::RenderBlock::inlineElementContinuation):
1411         Dave Hyatt says that this function should only return RenderInline
1412         objects (not non-RenderInline inline objects), so update the checks
1413         from isInline() to isRenderInline() before casting with
1414         toRenderInline().
1415
1416         * rendering/RenderInline.cpp:
1417         (WebCore::RenderInline::inlineElementContinuation):
1418         Ditto.
1419
1420 2014-04-14  Andreas Kling  <akling@apple.com>
1421
1422         Do more things under memory pressure on non-iOS platforms.
1423         <https://webkit.org/b/131625>
1424
1425         Reviewed by Antti Koivisto.
1426
1427         Rename hasReceivedMemoryPressure() to isUnderMemoryPressure() and
1428         make it use std::atomic<bool> instead of OSAtomic primitives.
1429
1430         Unmask most of the PLATFORM(IOS) blocks so all platforms can take
1431         advantage of optimizations done while under pressure. Note that
1432         isUnderMemoryPressure() will still always return false on platforms
1433         other than iOS/WK1, but this will change soon.
1434
1435         * history/PageCache.cpp:
1436         (WebCore::PageCache::canCache):
1437         * loader/FrameLoader.cpp:
1438         (WebCore::FrameLoader::commitProvisionalLoad):
1439         * page/FrameView.cpp:
1440         (WebCore::FrameView::willPaintContents):
1441         (WebCore::FrameView::didPaintContents):
1442         * platform/MemoryPressureHandler.cpp:
1443         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1444         * platform/MemoryPressureHandler.h:
1445         (WebCore::MemoryPressureHandler::isUnderMemoryPressure):
1446         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1447         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1448         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1449         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1450         (WebCore::MemoryPressureHandler::hasReceivedMemoryPressure): Deleted.
1451         * platform/graphics/FontCache.cpp:
1452         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
1453         * platform/ios/LegacyTileCache.mm:
1454         (WebCore::LegacyTileCache::createTilesInActiveGrid):
1455         * platform/ios/LegacyTileGrid.mm:
1456         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
1457         * platform/ios/LegacyTileLayerPool.mm:
1458         (WebCore::LegacyTileLayerPool::addLayer):
1459         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
1460         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
1461
1462 2014-04-14  Beth Dakin  <bdakin@apple.com>
1463
1464         RenderLayerCompositor's m_layerForOverhangAreas should be offset by the 
1465         topContentInset
1466         https://bugs.webkit.org/show_bug.cgi?id=131632
1467         -and corresponding-
1468         <rdar://problem/16609602>
1469
1470         Reviewed by Tim Horton.
1471
1472         Offset m_layerForOverhangAreas by the topContentInset. 
1473         * rendering/RenderLayerCompositor.cpp:
1474         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1475
1476 2014-04-14  Alexey Proskuryakov  <ap@apple.com>
1477
1478         Eliminate CachedFrame::m_mousePressNode
1479         https://bugs.webkit.org/show_bug.cgi?id=131626
1480
1481         Reviewed by Brady Eidson.
1482
1483         I couldn't find any observable effect of this change.
1484
1485         * history/CachedFrame.cpp:
1486         (WebCore::CachedFrameBase::CachedFrameBase):
1487         (WebCore::CachedFrameBase::restore):
1488         (WebCore::CachedFrame::clear):
1489         * history/CachedFrame.h:
1490         (WebCore::CachedFrame::documentLoader):
1491         (WebCore::CachedFrame::mousePressNode): Deleted.
1492         Eliminated m_mousePressNode, accessor, and code that reached out to EventHandler.
1493
1494         * page/EventHandler.cpp:
1495         (WebCore::EventHandler::mousePressNode): Deleted.
1496         (WebCore::EventHandler::setMousePressNode): Deleted.
1497         * page/EventHandler.h:
1498         (WebCore::EventHandler::setMousePressed): Deleted. This function was already unused.
1499
1500 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1501
1502         Run filter animations in the UI process with UI-side compositing
1503         https://bugs.webkit.org/show_bug.cgi?id=131199
1504         <rdar://problem/16479487>
1505
1506         Reviewed by Sam Weinig.
1507
1508         Add FilterOperation::clone() which is used during decoding.
1509         Export some things.
1510
1511         * WebCore.exp.in:
1512         * platform/graphics/filters/FilterOperation.h:
1513
1514 2014-04-14  Jer Noble  <jer.noble@apple.com>
1515
1516         Use after free in WebCore::CachedResourceHandleBase::~CachedResourceHandleBase / WebCore::removeDetachedChildrenInContainer
1517         https://bugs.webkit.org/show_bug.cgi?id=131169
1518
1519         Reviewed by Eric Carlson.
1520
1521         Invalidate the WebCoreAVFResourceLoader owned by MediaPlayerPrivateAVFoundationObjC
1522         in its destructor, to prevent a private function being called in response to the
1523         WebCoreAVFResourceLoader being stopped.
1524
1525         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1526         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
1527         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
1528         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1529         (WebCore::WebCoreAVFResourceLoader::invalidate):
1530
1531 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
1532
1533         [WK2 iOS] Scrolling to anchor links is broken
1534         https://bugs.webkit.org/show_bug.cgi?id=131618
1535         <rdar://problem/16599144>
1536
1537         Reviewed by Tim Horton.
1538
1539         Have ScrollingTreeScrollingNode pass RequestedScrollPosition updates
1540         to the scrolling tree, so that the scrolling tree can have custom behavior
1541         for them if necessary.
1542
1543         * page/scrolling/ScrollingTree.h:
1544         (WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
1545         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1546         (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
1547         * page/scrolling/ScrollingTreeScrollingNode.h:
1548
1549 2014-04-14  Brian J. Burg  <burg@cs.washington.edu>
1550
1551         Web Replay: memoize fallback time values for document.lastModified
1552         https://bugs.webkit.org/show_bug.cgi?id=131318
1553
1554         Reviewed by Joseph Pecoraro.
1555
1556         If a document's Last-Modified header can't be found or used, then 
1557         document.lastModified is derived from the current system time or
1558         from filesystem data, which is obviously nondeterministic.
1559
1560         It's better to handle this inside Document::lastModified rather than using
1561         MemoizedDOMResult, because only the fallback case is nondeterministic.
1562
1563         Test: http/tests/inspector/replay/document-last-modified-fallback-value.html
1564
1565         * dom/Document.cpp:
1566         (WebCore::Document::lastModified): Save or reuse memoized fallback value.
1567         * replay/WebInputs.json: Add input DocumentLastModifiedDate.
1568
1569 2014-04-12  Antti Koivisto  <antti@apple.com>
1570
1571         Keep secondary tile grid for zoomed-out scale
1572         https://bugs.webkit.org/show_bug.cgi?id=131586
1573
1574         Reviewed by Darin Adler.
1575
1576         * platform/graphics/ca/GraphicsLayerCA.cpp:
1577         (WebCore::GraphicsLayerCA::updateContentsScale):
1578         
1579             Don't repaint tiled backing with setNeedsDisplay, it invalidates itself correctly in setContentsScale.
1580             Update custom child layers when tiled backing scale changes.
1581
1582         * platform/graphics/ca/mac/TileController.h:
1583         * platform/graphics/ca/mac/TileController.mm:
1584         (WebCore::TileController::TileController):
1585         (WebCore::TileController::setNeedsDisplay):
1586         
1587             Drop the whole zoomed-out grid on full repaint.
1588
1589         (WebCore::TileController::setNeedsDisplayInRect):
1590             
1591             Drop changed zoomed-out tiles. A more sophisticated strategy is possible.
1592
1593         (WebCore::TileController::setContentsScale):
1594         
1595             Swap the zoomed-out grid in and out as needed.
1596             Repaint the active grid after scale change so the client does not have to.
1597
1598         (WebCore::TileController::contentsScale):
1599         
1600             Get the content scale from the tile grid so it is not kept in two places.
1601
1602         (WebCore::TileController::zoomedOutContentsScale):
1603         (WebCore::TileController::setZoomedOutContentsScale):
1604         
1605             Drop the zoomed-out grid if it no longer matches the zoomed-out scale.
1606
1607         (WebCore::TileController::tileRevalidationTimerFired):
1608         (WebCore::TileController::retainedTileBackingStoreMemory):
1609         (WebCore::TileController::containerLayers):
1610         
1611             Return both zoomed-out tiles and the active tiles. Active tiles are on top.
1612
1613         (WebCore::TileController::numberOfUnparentedTiles):
1614         (WebCore::TileController::removeUnparentedTilesNow):
1615         * platform/graphics/ca/mac/TileGrid.h:
1616         * platform/graphics/ca/mac/TileGrid.mm:
1617         (WebCore::TileGrid::dropTilesInRect):
1618         
1619             Add a function for dropping tiles.
1620
1621         (WebCore::TileGrid::revalidateTiles):
1622
1623 2014-04-14  Oliver Hunt  <oliver@apple.com>
1624
1625         Update test result
1626
1627         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1628         (WebCore::JSTestNondeterministicConstructor::finishCreation):
1629
1630 2014-04-14  Dirk Schulze  <krit@webkit.org>
1631
1632         Optimize Canvas fill and drawImage with SourceIn, DestinationIn, SourceOut, and DestinationAtop using transparencyLayer.
1633         https://bugs.webkit.org/show_bug.cgi?id=79659
1634
1635         Reviewed by Darin Adler.
1636
1637         Optimize fill() and fillRect() operations in Canvas on composited contexts by
1638         10 to 20 times on CG.
1639
1640         Replacing the ImageBuffer code by transparency layers allows the
1641         graphics library to optimize the drawing.
1642
1643         Doing the same for drawImage() would give performance regressions.
1644
1645         An inline function will create a transparency layer for CG. Cairo graphics
1646         does not composite correctly when a transparency layer gets created. 
1647         The inline function is just a NOOP for Cairo.
1648
1649         This fixes bug 131303 as well.
1650
1651         Added performance tests with r167124 already.
1652
1653         * html/canvas/CanvasRenderingContext2D.cpp:
1654         (WebCore::CanvasRenderingContext2D::fillInternal):
1655         (WebCore::CanvasRenderingContext2D::strokeInternal):
1656         (WebCore::CanvasRenderingContext2D::beginCompositeLayer):
1657         (WebCore::CanvasRenderingContext2D::endCompositeLayer):
1658         (WebCore::CanvasRenderingContext2D::fillRect):
1659         (WebCore::CanvasRenderingContext2D::strokeRect):
1660         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1661         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill): Deleted.
1662         * html/canvas/CanvasRenderingContext2D.h:
1663
1664 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1665
1666         Lots of compositing test failures after r167152
1667         https://bugs.webkit.org/show_bug.cgi?id=131574
1668
1669         Reviewed by Darin Adler.
1670
1671         * platform/graphics/GraphicsLayer.cpp:
1672         (WebCore::dumpChildren):
1673         (WebCore::GraphicsLayer::dumpProperties):
1674         Make child-dumping recursive so that we can easily skip layers up to any depth.
1675
1676 2014-04-14  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1677
1678         Fix incorrect indentations in CodeGeneratorJS.pm introduced in r165521
1679         https://bugs.webkit.org/show_bug.cgi?id=131613
1680
1681         Reviewed by Csaba Osztrogonác.
1682
1683         * bindings/scripts/CodeGeneratorJS.pm:
1684         (GenerateImplementation):
1685         Fixed 5-space indentation.
1686         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1687         Updated the tests accordingly.
1688
1689 2014-04-14  Manuel Rego Casasnovas  <rego@igalia.com>
1690
1691         [JSC] CSSStyleDeclaration report incorrect descriptor
1692         https://bugs.webkit.org/show_bug.cgi?id=89697
1693
1694         Reviewed by Benjamin Poulain.
1695
1696         Change descriptor of CSSStyleDeclaration properties in order to have
1697         writable and enumerable attributes set to true. Configurable is kept to
1698         false since the property is not deleteable.
1699
1700         Test: fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html
1701
1702         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1703         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate): Only set
1704         DontDelete attribute when creating the descriptor for
1705         CSSStyleDeclaration properties.
1706
1707 2014-04-14  Benjamin Poulain  <benjamin@webkit.org>
1708
1709         [JSC] Improve the call site of string comparison in some hot path
1710         https://bugs.webkit.org/show_bug.cgi?id=131605
1711
1712         Reviewed by Darin Adler.
1713
1714         * dom/NodeRareData.h:
1715         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
1716         We should use the right comparison operation depending on the Hash Traits.
1717
1718 2014-04-14  Andreas Kling  <akling@apple.com>
1719
1720         Merge MemoryPressureHandler{Mac,IOS}.mm
1721         <https://webkit.org/b/131603>
1722
1723         Join the iOS and Mac platform implementations of MemoryPressureHandler
1724         under the shared Cocoa banner. Each platform still has its own quirky
1725         behavior, but this puts them in the same file so we can start sharing.
1726
1727         Reviewed by Darin Adler.
1728
1729         * WebCore.xcodeproj/project.pbxproj:
1730         * platform/cocoa/MemoryPressureHandlerCocoa.mm: Renamed from Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm.
1731         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1732         (WebCore::MemoryPressureHandler::install):
1733         (WebCore::MemoryPressureHandler::uninstall):
1734         (WebCore::MemoryPressureHandler::holdOff):
1735         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1736         (WebCore::respondToMemoryPressureCallback):
1737         (WebCore::MemoryPressureHandler::installMemoryReleaseBlock):
1738         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1739         (WebCore::MemoryPressureHandler::hasReceivedMemoryPressure):
1740         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1741         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
1742         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1743         * platform/ios/MemoryPressureHandlerIOS.mm: Removed.
1744
1745 2014-04-14  Benjamin Poulain  <benjamin@webkit.org>
1746
1747         CSS JIT: compile the :nth-child() pseudo class
1748         https://bugs.webkit.org/show_bug.cgi?id=131602
1749
1750         Reviewed by Andreas Kling.
1751
1752         Tests: fast/selectors/nth-child-bounds.html
1753                fast/selectors/nth-child-with-backtracking.html
1754
1755         Compile the :nth-child() pseudo class function + some related clean up.
1756
1757         * css/CSSSelector.cpp:
1758         (WebCore::CSSSelector::nthA):
1759         (WebCore::CSSSelector::nthB):
1760         Expose the parsed value of an+b filters. Those values are used to compile
1761         the selector.
1762
1763         (WebCore::CSSSelector::RareData::parseNth):
1764         While working on the patch, I discovered some severe issues with the parsing of large
1765         values of a and/or b. The problem comes from the way the CSS parser handle the values:
1766         the values are parsed as a double then converted to an AtomicString for CSSSelector.
1767
1768         There are many problems related to large values but we never got bug reports because
1769         they are very uncommon. Fixing those problem would require changing the parser.
1770
1771         Here, CSSSelector::RareData::parseNth() is hardened a little bit to avoid absurd values
1772         of a and b.
1773
1774         * css/CSSSelector.h:
1775         * cssjit/RegisterAllocator.h:
1776         It looks like I forgot RDX in the list of register. Add it now since it is required
1777         for SelectorCodeGenerator::modulo().
1778
1779         * cssjit/SelectorCompiler.cpp:
1780         (WebCore::SelectorCompiler::addPseudoType):
1781         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1782         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
1783         (WebCore::SelectorCompiler::SelectorCodeGenerator::moduloIsZero):
1784         There is no modulo() operation exposed on the macro assemblers. This is a basic
1785         implementation on top of idiv for x86_64.
1786
1787         Since idiv works exclusively with RAX and RDX, most of the code is about getting
1788         those registers efficiently.
1789
1790         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1791         (WebCore::SelectorCompiler::setElementChildIndex):
1792         (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle):
1793         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1794         This is pretty much a straightforward implementation of :nth-child().
1795         The first part counts the number of previous elements.
1796         The second part updates the tree if this is style resolution.
1797         The last part compares the number of previous siblings to an+b to find if the filter matches.
1798
1799         The only part that diverges from SelectorChecker is how childIndex is used. Instead of testing it
1800         at every iteration, only the first iteration handle the cache.
1801
1802         * dom/ElementRareData.h:
1803         (WebCore::ElementRareData::childIndexMemoryOffset):
1804         * dom/Node.h:
1805         (WebCore::Node::rareDataMemoryOffset):
1806         (WebCore::Node::flagHasRareData):
1807         * rendering/style/RenderStyle.h:
1808
1809 2014-04-14  Tim Horton  <timothy_horton@apple.com>
1810
1811         Support setting a background color on page overlays
1812         https://bugs.webkit.org/show_bug.cgi?id=131600
1813
1814         Reviewed by Darin Adler.
1815
1816         * rendering/RenderLayerCompositor.cpp:
1817         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer):
1818         Mark the compositing tree as needing a rebuild when we get a new document-relative
1819         overlay layer; otherwise we were depending on something else coming along and
1820         requiring a rebuild, which didn't always happen.
1821
1822 2014-04-14  Mihnea Ovidenie  <mihnea@adobe.com>
1823
1824         [CSS Regions] Hit testing doesn't work in video
1825         https://bugs.webkit.org/show_bug.cgi?id=131485
1826
1827         Reviewed by Andrei Bucur.
1828
1829         When hit testing flow thread layer through the region layer,
1830         we have to pass the depth sorting information and take that
1831         into account for the situation in which an ancestor of the region
1832         has preserve-3d transform style.
1833
1834         Test: fast/regions/hit-test-region-preserve3d-container.html
1835
1836         * rendering/RenderLayer.cpp:
1837         (WebCore::RenderLayer::hitTestLayer):
1838         (WebCore::RenderLayer::hitTestFlowThreadIfRegionForFragments):
1839         * rendering/RenderLayer.h:
1840
1841 2014-04-13  Darin Adler  <darin@apple.com>
1842
1843         userVisibleString should not try to "encode" host names
1844         https://bugs.webkit.org/show_bug.cgi?id=131587
1845         rdar://problem/14686849
1846
1847         Reviewed by Alexey Proskuryakov.
1848
1849         * WebCore.exp.in: Updated for WebCoreNSURLExtras argument type changes.
1850
1851         * platform/mac/WebCoreNSURLExtras.h: Removed unneeded code to make this
1852         Objective-C++ header compile in plain C++ files, which we never need to do.
1853         Added missing argument name, baseURL, and changed mysterious CFIndex arguments
1854         to the correct type, CFURLComponentType.
1855
1856         * platform/mac/WebCoreNSURLExtras.mm:
1857         (WebCore::isLookalikeCharacter): Removed the inline keyword from this, and added
1858         more lookalike characters from the Mozilla list referenced here.
1859         (WebCore::URLByTruncatingOneCharacterBeforeComponent): Updated argument type.
1860         (WebCore::dataForURLComponentType): Ditto.
1861         (WebCore::userVisibleString): Only call mapHostNames if host name decoding is
1862         needed; no encoding here.
1863
1864 2014-04-13  Darin Adler  <darin@apple.com>
1865
1866         REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
1867         https://bugs.webkit.org/show_bug.cgi?id=126322
1868
1869         Reviewed by Ryosuke Niwa.
1870
1871         * dom/Element.cpp:
1872         (WebCore::Element::canContainRangeEndPoint): Now returns false when the role of the element
1873         is "img". This is the same rule that's hard-coded in isRenderReplacedElement for the same
1874         reason. Need more test coverage to make sure this role feature works consistently.
1875
1876         * dom/Element.h: Made canContainRangeEndPoint no longer inline since it's not just a
1877         return statement any more.
1878
1879         * dom/Position.cpp:
1880         (WebCore::Position::isCandidate): Took out code that calls isRendererReplacedElement
1881         that was added in r158617; not needed now that we updated canContainRangeEndPoint.
1882
1883         * dom/Range.cpp:
1884         (WebCore::Range::firstNode): Removed code here that called isRendererReplacedElement.
1885         This was the wrong level to be adding editing logic, and there's a FIXME here to that
1886         effect, which we are now deleting. This was the change that broke Find.
1887
1888         * editing/TextIterator.cpp: Added a comment about the redundancy between the
1889         isRendererReplacedElement and editingIgnoresContent functions.
1890
1891         * html/HTMLHRElement.cpp:
1892         (WebCore::HTMLHRElement::canContainRangeEndPoint): Call through to base class instead
1893         of just returning true when we have child nodes. Lets Element::canContainRangeEndPoint
1894         do its thing.
1895         * html/HTMLHRElement.h: Ditto.
1896
1897         * html/HTMLObjectElement.cpp:
1898         (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to base class instead
1899         of just returning true when we have fallback content. Lets Element::canContainRangeEndPoint
1900         do its thing.
1901         * html/HTMLObjectElement.h: Ditto.
1902
1903         * testing/Internals.cpp:
1904         (WebCore::Internals::countMatchesForText): Set the limit to 1000 instead of infinite.
1905
1906 2014-04-12  Darin Adler  <darin@apple.com>
1907
1908         Use unique_ptr for FillLayer::m_next
1909         https://bugs.webkit.org/show_bug.cgi?id=75222
1910
1911         Reviewed by Dan Bernstein.
1912
1913         * css/DeprecatedStyleBuilder.cpp:
1914         (WebCore::ApplyPropertyFillLayer::applyInheritValue):
1915         Renamed currChild to just child and prevChild to previousChild.
1916         Changed code to pass ownership of the new FillLayer immediately.
1917         Changed some loops to be for loops.
1918         (WebCore::ApplyPropertyFillLayer::applyInitialValue): Ditto.
1919         (WebCore::ApplyPropertyFillLayer::applyValue): Ditto.
1920
1921         * rendering/RenderBox.cpp:
1922         (WebCore::RenderBox::backgroundHasOpaqueTopLayer): Use reference
1923         instead of pointer.
1924         (WebCore::RenderBox::paintFillLayers): Ditto.
1925         * rendering/RenderBoxModelObject.cpp:
1926         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
1927
1928         * rendering/style/FillLayer.cpp:
1929         (WebCore::FillLayer::FillLayer): Removed m_next initializer since it is now an
1930         OwnPtr and initializes automatically. In a couple other places, changed m_next
1931         initializer to use make_unique.
1932         (WebCore::FillLayer::~FillLayer): Wrote loop for deletion of m_next.
1933         (WebCore::FillLayer::operator=): Removed unneeded explicit deletion of m_next.
1934         (WebCore::FillLayer::cullEmptyLayers): Ditto.
1935         (WebCore::clipMax): Marked inline.
1936         (WebCore::FillLayer::computeClipMax): Rewrote to use a loop instead of recursion.
1937         (WebCore::FillLayer::containsImage): Ditto.
1938         (WebCore::FillLayer::imagesAreLoaded): Ditto.
1939         (WebCore::FillLayer::hasOpaqueImage): Rewrote to use && instead of multiple if.
1940         (WebCore::FillLayer::hasImage): Rewrote to use a loop instead of recursion.
1941         (WebCore::FillLayer::hasFixedImage): Ditto.
1942
1943         * rendering/style/FillLayer.h: Changed m_next to be a unique_ptr.
1944
1945 2014-04-13  Andy Estes  <aestes@apple.com>
1946
1947         [QuickLook] Move file system-related code into WebKit
1948         https://bugs.webkit.org/show_bug.cgi?id=131597
1949
1950         Reviewed by Dan Bernstein.
1951
1952         QuickLookHandle should not be responsible for saving a copy of the
1953         original document to disk as it might be running in a process that
1954         either can't write to disk or can only write into a sandboxed
1955         container. To account for this, we need to separate the concern of
1956         quick look conversion from that of original document saving so that
1957         each activity can run in the appropriate process.
1958
1959         Created a new interface between WebCore and WebKit by adding a client
1960         (QuickLookHandleClient) to QuickLookHandle which is notified of incoming
1961         bytes. A new function on FrameLoaderClient tells WebKit when a new
1962         QuickLookHandle is created, giving WebKit the opportunity to register a
1963         handle client. Moved the existing file system-related code as well as
1964         code only needed by WebKit1 in QuickLookHandle into a new WebKit1
1965         QuickLookHandleClient subclass.
1966
1967         * WebCore.exp.in:
1968         * WebCore.xcodeproj/project.pbxproj: Made QuickLookHandleClient.h Private.
1969         * loader/FrameLoaderClient.h:
1970         (WebCore::FrameLoaderClient::didCreateQuickLookHandle): Added.
1971         * loader/ResourceLoader.cpp:
1972         (WebCore::ResourceLoader::didCreateQuickLookHandle): Called FrameLoaderClient::didCreateQuickLookHandle().
1973         * loader/ResourceLoader.h:
1974         * platform/network/ResourceHandle.h: Made m_quickLook a unique_ptr.
1975         (WebCore::ResourceHandle::setQuickLookHandle): Changed to take a unique_ptr.
1976         * platform/network/ResourceHandleClient.h:
1977         (WebCore::ResourceHandleClient::didCreateQuickLookHandle): Added.
1978         * platform/network/ios/QuickLook.h: Added m_client, gave m_converter a stronger type, and made m_nsResponse a RetainPtr.
1979         (WebCore::QuickLookHandle::setClient): Added.
1980         (WebCore::QuickLookHandle::firstRequestURL): Added.
1981         (WebCore::QuickLookHandle::converter): Added.
1982         * platform/network/ios/QuickLook.mm:
1983         (WebCore::registerQLPreviewConverterIfNeeded):
1984         (WebCore::createTemporaryFileForQuickLook): Made non-static.
1985         (WebCore::emptyClient): Returned a shared empty QuickLookHandleClient.
1986         (WebCore::QuickLookHandle::QuickLookHandle): Removed file system and WebKit1-only code.
1987         (WebCore::QuickLookHandle::create): Changed to return a unique_ptr.
1988         (WebCore::QuickLookHandle::nsResponse):
1989         (WebCore::QuickLookHandle::didReceiveDataArray): Removed file system code and called QuickLookHandleClient::didReceiveDataArray() instead.
1990         (WebCore::QuickLookHandle::didReceiveData): Removed file system code and called QuickLookHandleClient::didReceiveData() instead.
1991         (WebCore::QuickLookHandle::didFinishLoading): Removed file system code and called QuickLookHandleClient::didFinishLoading() instead.
1992         (WebCore::QuickLookHandle::didFail): Removed file system and WebKit1-only code, calling QuickLookHandleClient::didFail() instead.
1993         (WebCore::QuickLookHandle::~QuickLookHandle): Removed file system and WebKit1-only code. Cleared our reference to m_client.
1994         (WebCore::QuickLookHandle::previewFileName): Retrieved from m_converter.
1995         (WebCore::QuickLookHandle::previewRequestURL): Ditto.
1996         * platform/network/ios/QuickLookHandleClient.h: Added.
1997         (WebCore::QuickLookHandleClient::~QuickLookHandleClient):
1998         (WebCore::QuickLookHandleClient::didReceiveDataArray):
1999         (WebCore::QuickLookHandleClient::didReceiveData):
2000         (WebCore::QuickLookHandleClient::didFinishLoading):
2001         (WebCore::QuickLookHandleClient::didFail):
2002
2003 2014-04-10  Pratik Solanki  <psolanki@apple.com>
2004
2005         Move early return out of dispatch_async() block so we can return from willSendRequest quickly
2006         https://bugs.webkit.org/show_bug.cgi?id=131478
2007         <rdar://problem/16575535>
2008
2009         Reviewed by Alexey Proskuryakov.
2010
2011         Do a quick check to see if we need to synthesize the redirect response on the dispatch queue
2012         and return from willSendRequest callback quickly instead of always doing an effectively synchronous
2013         call to the main thread. We can't call synthesizeRedirectResponseIfNecessary on the dispatch
2014         queue since that accesses the ResourceRequest.
2015
2016         No new tests because no change in functionality.
2017
2018         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
2019         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2020         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): Save the
2021         request scheme to use later for early return from willSendRequest.
2022         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
2023
2024 2014-04-08  Oliver Hunt  <oliver@apple.com>
2025
2026         Rewrite Function.bind as a builtin
2027         https://bugs.webkit.org/show_bug.cgi?id=131083
2028
2029         Reviewed by Geoffrey Garen.
2030
2031         Switch WebCore to use the helper functions when defining the
2032         prototype properties on DOM constructors, and update bindings
2033         tests accordingly.
2034
2035         * bindings/js/JSImageConstructor.cpp:
2036         (WebCore::JSImageConstructor::finishCreation):
2037         * bindings/scripts/CodeGeneratorJS.pm:
2038         (GenerateConstructorHelperMethods):
2039         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2040         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2041         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2042         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2043         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2044         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2045         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2046         (WebCore::JSTestEventTargetConstructor::finishCreation):
2047         * bindings/scripts/test/JS/JSTestException.cpp:
2048         (WebCore::JSTestExceptionConstructor::finishCreation):
2049         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2050         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2051         * bindings/scripts/test/JS/JSTestInterface.cpp:
2052         (WebCore::JSTestInterfaceConstructor::finishCreation):
2053         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2054         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2055         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2056         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2057         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2058         * bindings/scripts/test/JS/JSTestNode.cpp:
2059         (WebCore::JSTestNodeConstructor::finishCreation):
2060         * bindings/scripts/test/JS/JSTestObj.cpp:
2061         (WebCore::JSTestObjConstructor::finishCreation):
2062         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2063         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2064         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2065         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2066         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2067         (WebCore::JSTestTypedefsConstructor::finishCreation):
2068         * bindings/scripts/test/JS/JSattribute.cpp:
2069         (WebCore::JSattributeConstructor::finishCreation):
2070         * bindings/scripts/test/JS/JSreadonly.cpp:
2071         (WebCore::JSreadonlyConstructor::finishCreation):
2072
2073 2014-04-13  Simon Fraser  <simon.fraser@apple.com>
2074
2075         [iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
2076         https://bugs.webkit.org/show_bug.cgi?id=131577
2077
2078         Reviewed by Tim Horton.
2079
2080         The call to scrollingCoordinator->frameViewRootLayerDidChange() was inside
2081         a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
2082         for WK2 we want to call this.
2083
2084         * loader/HistoryController.cpp:
2085         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2086
2087 2014-04-13  Zan Dobersek  <zdobersek@igalia.com>
2088
2089         Unreviewed build fix after r167196.
2090
2091         * platform/RemoteCommandListener.cpp:
2092         (WebCore::RemoteCommandListener::create): Fall back to using the new operator
2093         for allocating RemoteCommandListener object. Using std::make_unique() requires
2094         for the operator to be public, which doesn't work well with the static create()
2095         method.
2096
2097 2014-04-13  Zan Dobersek  <zdobersek@igalia.com>
2098
2099         Remove unnecessary uses of std::move() in return statements
2100         https://bugs.webkit.org/show_bug.cgi?id=131457
2101
2102         Reviewed by Darin Adler.
2103
2104         Don't use std::move() in return statements unless necessary as it inhibits
2105         named return value optimizations as performed by compilers.
2106
2107         * Modules/battery/BatteryManager.cpp:
2108         (WebCore::BatteryManager::create):
2109         * html/FormController.cpp:
2110         (WebCore::FormController::createSavedFormStateMap):
2111         * html/canvas/WebGLRenderingContext.cpp:
2112         (WebCore::WebGLRenderingContext::create):
2113         * platform/RemoteCommandListener.cpp:
2114         (WebCore::RemoteCommandListener::create):
2115         * platform/graphics/ca/GraphicsLayerCA.cpp:
2116         (WebCore::GraphicsLayer::create):
2117         * platform/ios/RemoteCommandListenerIOS.mm:
2118         (WebCore::RemoteCommandListener::create):
2119         * rendering/RenderGrid.cpp:
2120         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
2121         * rendering/RenderLayer.cpp:
2122         (WebCore::RenderLayer::setupFilters):
2123         * rendering/style/CounterDirectives.cpp:
2124         (WebCore::clone):
2125
2126 2014-04-13  Commit Queue  <commit-queue@webkit.org>
2127
2128         Unreviewed, rolling out r167168 and r167194.
2129         https://bugs.webkit.org/show_bug.cgi?id=131589
2130
2131         Caused massive ASSERTION failures on the GTK Debug bot
2132         (Requested by philn on #webkit).
2133
2134         Reverted changesets:
2135
2136         "[GTK] Add HighDPI support for non-accelerated compositing
2137         contents"
2138         https://bugs.webkit.org/show_bug.cgi?id=131562
2139         http://trac.webkit.org/changeset/167168
2140
2141         "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
2142         r167168."
2143         http://trac.webkit.org/changeset/167194
2144
2145 2014-04-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2146
2147         [GStreamer] No CORS support for media elements
2148         https://bugs.webkit.org/show_bug.cgi?id=99037
2149
2150         Reviewed by Philippe Normand.
2151
2152         Added CORS access control check to media sources when crossorigin attribute is set.
2153
2154         Added getter to CORS access control check status (used to compute whether the stream is tainted or not).
2155         Related test is http/tests/security/video-cross-origin-readback.html.
2156
2157         Disabled access to cross-origin streams that fail CORS check when crossorigin attribute is set.
2158         Related test is http/tests/security/video-cross-origin-accessfailure.html.
2159
2160         Tests: http/tests/security/video-cross-origin-accessfailure.html
2161                http/tests/security/video-cross-origin-accesssameorigin.html
2162
2163         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2164         (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck): Return whether media is cross-origin (tainted) or not by querying the gstreamer source layer.
2165         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added MediaPlayerPrivateGStreamer::didPassCORSAccessCheck declaration.
2166         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2167         (webKitWebSrcStart): Passed CORS mode parameter to the streaming client. In case of CORS check failure, stop the resource loading.
2168         (webKitSrcPassedCORSAccessCheck): Return whether CORS access control check was done and successful.
2169         (StreamingClient::handleResponseReceived): Take a parameter to assign the CORS access control check result.
2170         (CachedResourceStreamingClient::CachedResourceStreamingClient): Updated setting of the ResourceLoaderOptions according CORS mode.
2171         (CachedResourceStreamingClient::responseReceived): Check CORS and pass result to handleResponseReceived.
2172         (ResourceHandleStreamingClient::didReceiveResponse): No CORS check.
2173         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Added webKitSrcPassedCORSAccessCheck declaration.
2174
2175 2014-04-12  Darin Adler  <darin@apple.com>
2176
2177         REGRESSION (r166860): ASSERTION FAILED: !isCalculated() on fast/css/image-set-value-not-removed-crash.html
2178         https://bugs.webkit.org/show_bug.cgi?id=131480
2179
2180         Reviewed by Andreas Kling.
2181
2182         Fixes intermittent assertion failure in fast/css/image-set-value-not-removed-crash.html.
2183
2184         * css/CSSComputedStyleDeclaration.cpp:
2185         (WebCore::valueForImageSliceSide): Added. Helper used below in valueForNinePieceImageSlice.
2186         Handles calculated values by returning 0; incorrect but predictable.
2187         (WebCore::valueForNinePieceImageSlice): Updated to call valueForImageSliceSide.
2188         (WebCore::positionOffsetValue): Use nullptr.
2189         (WebCore::ComputedStyleExtractor::propertyValue): Updated to call positionOffsetValue
2190         by its new name. Removed "get" from the name.
2191         (WebCore::positionOffsetValue): Renamed from getPositionOffsetValue.
2192
2193         * platform/Length.h: Made isCalculated public.
2194
2195 2014-04-12  Andy Estes  <aestes@apple.com>
2196
2197         Fix the iOS build after r167183.
2198
2199         * platform/network/ResourceHandle.h:
2200         * platform/network/cf/ResourceHandleCFNet.cpp:
2201         (WebCore::ResourceHandle::schedule):
2202         (WebCore::ResourceHandle::unschedule):
2203
2204 2014-04-12  Andy Estes  <aestes@apple.com>
2205
2206         [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
2207         https://bugs.webkit.org/show_bug.cgi?id=131580
2208
2209         Reviewed by Darin Adler.
2210
2211         There's no need to bloat WebKit1's ResourceLoader with a pointer that
2212         only WebKit2's WebResourceLoader cares about.
2213
2214         * loader/ResourceLoader.h:
2215         (WebCore::ResourceLoader::quickLookHandle): Deleted.
2216         (WebCore::ResourceLoader::setQuickLookHandle): Deleted.
2217
2218 2014-04-12  Chris Fleizach  <cfleizach@apple.com>
2219
2220         AX: Cleanup AccessibilityObject::getAttribute
2221         https://bugs.webkit.org/show_bug.cgi?id=131555
2222
2223         Reviewed by Darin Adler.
2224
2225         No new functionality.
2226
2227         * accessibility/AccessibilityObject.cpp:
2228         (WebCore::AccessibilityObject::getAttribute):
2229
2230 2014-04-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2231
2232         [SOUP] Libsoup internal credential setting should be controlled by loader decision
2233         https://bugs.webkit.org/show_bug.cgi?id=130963
2234
2235         Reviewed by Darin Adler.
2236
2237         Disabled libsoup internal authentication manager for messages for which no credential is available and no stored credentials should be used.
2238         Updated synchronous loader to return whether using credentials or not according StoredCredential loader option parameter.
2239         Unskipped test http/tests/xmlhttprequest/cross-origin-no-authorization.html covers the patch.
2240
2241         * platform/network/ResourceHandleInternal.h:
2242         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Added m_useAuthenticationManager boolean to control whether disable authentication manager or not.
2243         * platform/network/soup/ResourceHandleSoup.cpp:
2244         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Added m_storedCredentials member.
2245         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage): Return true if stored credentials are allowed.
2246         (WebCore::applyAuthenticationToRequest): Set m_useAuthenticationManager value to disable authentication manager if cannot use stored credentials and ResourceHandleInternal has no username and password.
2247         (WebCore::createSoupMessageForHandleAndRequest): Disable authentication mananger according m_useAuthenticationManager value.
2248         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Added StoredCredentials loader option to the sync loader constructor.
2249
2250 2014-04-11  Darin Adler  <darin@apple.com>
2251
2252         Some small loader refinements and refactoring
2253         https://bugs.webkit.org/show_bug.cgi?id=131541
2254
2255         Reviewed by Alexey Proskuryakov.
2256
2257         Cut down on use of ResourceLoader::handle, which always returns null when
2258         using a network process. Also streamlined conditionals and did some other
2259         small refactoring.
2260
2261         * loader/DocumentLoader.h: Use references rather than pointers for SchedulePair.
2262
2263         * loader/ResourceLoader.cpp:
2264         (WebCore::ResourceLoader::didChangePriority): Use m_handle instead of handle(),
2265         since we'd like to delete handle() entirely soon.
2266         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Ditto.
2267         (WebCore::ResourceLoader::schedule): Added.
2268         (WebCore::ResourceLoader::unschedule): Ditto.
2269         * loader/ResourceLoader.h: Rearranged header to eliminate nested conditionals.
2270         Added schedule and unschedule functions for Mac.
2271
2272         * loader/mac/DocumentLoaderMac.cpp:
2273         (WebCore::scheduleAll): Changed to take a reference and call ResourceLoader::schedule.
2274         (WebCore::unscheduleAll): Ditto.
2275         (WebCore::DocumentLoader::schedule): Ditto.
2276         (WebCore::DocumentLoader::unschedule): Ditto.
2277
2278         * page/mac/PageMac.cpp:
2279         (WebCore::Page::addSchedulePair): Pass a reference rather than a pointer to schedule.
2280         (WebCore::Page::removeSchedulePair): Ditto.
2281
2282         * platform/network/ResourceHandle.h: Did a bit of reformatting and reorganizing of
2283         conditionals.
2284
2285         * platform/network/ResourceHandleInternal.h: Removed a tiny bit of unneeded declaration.
2286
2287         * platform/network/mac/ResourceHandleMac.mm:
2288         (WebCore::ResourceHandle::schedule): Updated to take a reference rather than a pointer.
2289         (WebCore::ResourceHandle::unschedule): Ditto.
2290
2291 2014-04-11  Andreas Kling  <akling@apple.com>
2292
2293         Make NodeList.length inline-cacheable by JSC.
2294         <https://webkit.org/b/131579>
2295
2296         For objects with custom index or name getters, we have to make sure
2297         that builtin properties take precedence. We do this by scanning the
2298         ancestor chain for a suitable property slot before moving on to
2299         named items.
2300
2301         With this patch, we now mark such builtins as cacheable. This is
2302         safe since the whole point of doing this before processing named
2303         items is to ensure the same slot is returned consistently.
2304
2305         Reviewed by Benjamin Poulain.
2306
2307         * bindings/scripts/CodeGeneratorJS.pm:
2308         (GenerateGetOwnPropertySlotBody):
2309
2310 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2311
2312         Lots of compositing test failures after r167152
2313         https://bugs.webkit.org/show_bug.cgi?id=131574
2314
2315         Reviewed by Simon Fraser.
2316
2317         * platform/graphics/GraphicsLayer.cpp:
2318         (WebCore::GraphicsLayer::dumpProperties):
2319         We were asking the parent's client whether the child should be dumped,
2320         but really the child's client is the one who should decide.
2321
2322 2014-04-11  Benjamin Poulain  <bpoulain@apple.com>
2323
2324         ViewportConfiguration::layoutWidth() compute the width incorrectly when initial-scale+width do not fit in view
2325         https://bugs.webkit.org/show_bug.cgi?id=131575
2326
2327         Reviewed by Enrica Casucci.
2328
2329         I made a mistake when writing the new viewport code: ViewportConfiguration::layoutWidth() uses m_contentSize in one place.
2330         That make no sense, contentSize depends on the layout width.
2331
2332         * page/ViewportConfiguration.cpp:
2333         (WebCore::ViewportConfiguration::layoutWidth):
2334
2335 2014-04-11  Andreas Kling  <akling@apple.com>
2336
2337         Remove "numeric index getter" stuff from bindings code generator.
2338         <https://webkit.org/b/131565>
2339
2340         This was used for an earlier generation of typed arrays. Now that JSC
2341         has native typed array support, we're not using this functionality and
2342         can just remove it.
2343
2344         Reviewed by Geoffrey Garen.
2345
2346         * bindings/scripts/CodeGeneratorJS.pm:
2347         (GenerateGetOwnPropertySlotBody):
2348         (HasComplexGetOwnProperty):
2349         (InterfaceRequiresAttributesOnInstance):
2350         (InstanceOverridesGetOwnPropertySlot):
2351         (GenerateHeader):
2352         (GenerateImplementation):
2353
2354 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
2355
2356         Web Replay: consolidate decoding macros used in SerializationMethods
2357         https://bugs.webkit.org/show_bug.cgi?id=131564
2358
2359         Reviewed by Timothy Hatcher.
2360
2361         We can use EncodingTraits<T>::DecodedType to create a local variable
2362         with the appropriate decoded type, rather than special casing.
2363
2364         * replay/SerializationMethods.cpp:
2365         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
2366         (JSC::EncodingTraits<KeypressCommand>::decodeValue):
2367         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
2368         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue):
2369         (JSC::EncodingTraits<PlatformWheelEvent>::decodeValue):
2370         (JSC::EncodingTraits<PluginData>::decodeValue):
2371
2372 2014-04-11  Beth Dakin  <bdakin@apple.com>
2373
2374         Need WK2 API to disable rubber-banding
2375         https://bugs.webkit.org/show_bug.cgi?id=131567
2376
2377         Reviewed by Simon Fraser.
2378
2379         Page will now store a vertical and horizontal ScrollElasticity in case the API has 
2380         been called before the FrameView even exists.
2381
2382         New Page functions.
2383         * WebCore.exp.in:
2384
2385         Use Page’s cached ScrollElasticity.
2386         * page/FrameView.cpp:
2387         (WebCore::FrameView::FrameView):
2388
2389         If there is already a FrameView, then assign it the new ScrollElasticity.
2390         * page/Page.cpp:
2391         (WebCore::Page::Page):
2392         (WebCore::Page::setVerticalScrollElasticity):
2393         (WebCore::Page::setHorizontalScrollElasticity):
2394         * page/Page.h:
2395         (WebCore::Page::verticalScrollElasticity):
2396         (WebCore::Page::horizontalScrollElasticity):
2397
2398 2014-04-11  Martin Robinson  <mrobinson@igalia.com>
2399
2400         REGRESSION(167145): Many media tests fail
2401         https://bugs.webkit.org/show_bug.cgi?id=131569
2402
2403         Reviewed by Brent Fulgham.
2404
2405         * PlatformGTK.cmake: Add the localized strings file to the list of user agent scripts.
2406         * platform/gtk/RenderThemeGtk.cpp:
2407         (WebCore::RenderThemeGtk::mediaControlsScript): Include the localized strings file in the script body.
2408
2409 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2410
2411         [iOS WebKit2] Find-in-page indicator
2412         https://bugs.webkit.org/show_bug.cgi?id=131510
2413         <rdar://problem/16547777>
2414
2415         Reviewed by Simon Fraser and Enrica Casucci.
2416
2417         * editing/Editor.cpp:
2418         (WebCore::Editor::findString):
2419         * editing/FindOptions.h:
2420         Add a find option which prevents WebCore from revealing the selection
2421         after selecting a successful find match.
2422
2423 2014-04-11  Owen Taylor  <otaylor@redhat.com>
2424
2425         [GTK] Add HighDPI support for non-accelerated compositing contents
2426         https://bugs.webkit.org/show_bug.cgi?id=131562
2427
2428         Reviewed by Martin Robinson.
2429
2430         No new tests. This will be tested once we have the proper dependencies in the WebKit testing
2431         JHBuild.
2432
2433         * platform/cairo/WidgetBackingStore.h:
2434         (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
2435         * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
2436         * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
2437         * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
2438         * platform/graphics/cairo/CairoUtilities.h:
2439         * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
2440         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
2441         * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
2442
2443 2014-04-11  Jon Honeycutt  <jhoneycutt@apple.com>
2444
2445         Assertion failure changing select element size during focus event
2446         dispatch
2447         <https://bugs.webkit.org/show_bug.cgi?id=131566>
2448         <rdar://problem/16400735>
2449
2450         Reviewed by Andy Estes.
2451
2452         Test: fast/forms/select-change-size-during-focus.html
2453
2454         * html/HTMLSelectElement.cpp:
2455         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2456         Adopt the fix from Chromium r171216; check that the renderer is still
2457         of the expected type, and return early if it is not.
2458
2459 2014-04-11  Bem Jones-Bey  <bjonesbe@adobe.com>
2460
2461         Clear sibling floats while splitting inline flow
2462         https://bugs.webkit.org/show_bug.cgi?id=130905
2463
2464         Reviewed by David Hyatt.
2465
2466         This is a port of a Blink patch by kenrb@chromium.org.
2467         (https://src.chromium.org/viewvc/blink?revision=169658&view=revision)
2468
2469         During RenderInline::splitFlow(), floats are cleared on an anonymous
2470         containingBlock() for the inline being split. This is a problem if
2471         siblings of the block contain references to the same floats, since the
2472         float removal code in markSiblingsWithFloatsForLayout() will not later
2473         find them.
2474
2475         This change also affects RenderBlock::splitFlow() and
2476         RenderBoxModelObject::moveChildrenTo, since those are called in
2477         similar situations as RenderInline::splitFlow().
2478
2479         Test: fast/block/float/split-inline-sibling-of-float-crash.html
2480
2481         * rendering/RenderBlockFlow.cpp:
2482         (WebCore::RenderBlockFlow::removeFloatingObjects): Add call to
2483             markSiblingsWithFloatsForLayout() before removing floats.
2484
2485 2014-04-11  Gavin Barraclough  <baraclough@apple.com>
2486
2487         Rollout - Rewrite Function.bind as a builtin
2488         https://bugs.webkit.org/show_bug.cgi?id=131083
2489
2490         Unreviewed.
2491
2492         Rolling out r167020 while investigating a performance regression.
2493
2494         * bindings/js/JSImageConstructor.cpp:
2495         (WebCore::JSImageConstructor::finishCreation):
2496         * bindings/scripts/CodeGeneratorJS.pm:
2497         (GenerateConstructorHelperMethods):
2498         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2499         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2500         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2501         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2502         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2503         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2504         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2505         (WebCore::JSTestEventTargetConstructor::finishCreation):
2506         * bindings/scripts/test/JS/JSTestException.cpp:
2507         (WebCore::JSTestExceptionConstructor::finishCreation):
2508         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2509         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2510         * bindings/scripts/test/JS/JSTestInterface.cpp:
2511         (WebCore::JSTestInterfaceConstructor::finishCreation):
2512         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2513         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2514         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2515         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2516         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2517         * bindings/scripts/test/JS/JSTestNode.cpp:
2518         (WebCore::JSTestNodeConstructor::finishCreation):
2519         * bindings/scripts/test/JS/JSTestObj.cpp:
2520         (WebCore::JSTestObjConstructor::finishCreation):
2521         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2522         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2523         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2524         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2525         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2526         (WebCore::JSTestTypedefsConstructor::finishCreation):
2527         * bindings/scripts/test/JS/JSattribute.cpp:
2528         (WebCore::JSattributeConstructor::finishCreation):
2529         * bindings/scripts/test/JS/JSreadonly.cpp:
2530         (WebCore::JSreadonlyConstructor::finishCreation):
2531
2532 2014-04-11  Myles C. Maxfield  <mmaxfield@apple.com>
2533
2534         Build Fix after r167151.
2535
2536         Unreviewed.
2537
2538         * editing/AlternativeTextController.cpp:
2539         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2540
2541 2014-04-10  Jer Noble  <jer.noble@apple.com>
2542
2543         [EME][Mac] Using KeySession.update([renew]) should trigger KeyMessage event instead of NeedKey event
2544         https://bugs.webkit.org/show_bug.cgi?id=131527
2545
2546         Reviewed by Eric Carlson.
2547
2548         Rather than triggering a needKey() event, necessatating the creation
2549         of an entirely new MediaKeySession, cause a new key request to be
2550         created by sending the same initData back into the AVSampleDataParser.
2551
2552         Also, do some drive-by clean up suggested by Darin in the review for
2553         r166509.
2554
2555         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2556         (WebCore::isEqual): Support an alloc-free equality check between
2557             Uint8Array and static strings.
2558         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2559
2560 2014-04-11  David Kilzer  <ddkilzer@apple.com>
2561
2562         Build fix (r167151): Do not dereference Node::document() before passing to Range::create()
2563         <https://webkit.org/b/131475>
2564
2565         Fixes the following build failure:
2566
2567             WebCore/editing/AlternativeTextController.cpp:275:71: error: indirection requires pointer operand ('WebCore::Document' invalid)
2568                 int paragraphStartIndex = TextIterator::rangeLength(Range::create(*rootNode.document(), &rootNode, 0, paragraphRangeContainingCorrection.get()->startContainer(), paragraphRangeContainingCorrection.get()->startOffset()).get());
2569                                                                                   ^~~~~~~~~~~~~~~~~~~~
2570
2571         * editing/AlternativeTextController.cpp:
2572         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2573         Remove unneeded '*' operator since Node::document() returns a
2574         Document& and Range::create() accepts a Document& for its first
2575         argument.
2576
2577 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
2578
2579         Web Replay: memoize nondeterministic attributes of the Navigator interface
2580         https://bugs.webkit.org/show_bug.cgi?id=131340
2581
2582         Reviewed by Timothy Hatcher.
2583
2584         Most attributes of window.navigator do not change very often, but they
2585         could be easily changed by the user or embedder. So, memoize attribute values.
2586
2587         This change does not include navigator.mimeTypes and navigator.plugins,
2588         which will be handled at a different level. <https://webkit.org/b/131341>
2589
2590         Test: ManualTests/inspector/replay-window-navigator-basic.html
2591
2592         * page/Navigator.idl: Add Nondeterministic attribute.
2593
2594 2014-04-10  Jer Noble  <jer.noble@apple.com>
2595
2596         [iOS][WK2] Videos should animate into and out of fullscreen.
2597         https://bugs.webkit.org/show_bug.cgi?id=131497
2598
2599         Reviewed by Simon Fraser.
2600
2601         Use AVPlayerViewController's new enterFullScreenWithCompletionHandler: and exitFullScreenWithCompletionHandler:
2602         methods to animate into and out of full screen. To do so, use the provided initialFrame and finalFrame screen
2603         rects to correctly place the AVPlayerViewController's view before entering or exiting fullscreen.
2604
2605         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2606         (-[WebVideoFullscreenController enterFullscreen:]): Pass the media element's screen rect.
2607         (-[WebVideoFullscreenController exitFullscreen]): Ditto.
2608         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2609         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2610         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Renamed from shouldDismissWithReason.
2611         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Use the new AVKit APIs.
2612         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Ditto.
2613         * WebCore.exp.in: Modify the exported symbols for enter and exitFullscreen.
2614
2615 2014-04-11  Tim Horton  <timothy_horton@apple.com>
2616
2617         Support document-relative and custom-frame page overlays
2618         https://bugs.webkit.org/show_bug.cgi?id=131560
2619         <rdar://problem/16595556>
2620
2621         Reviewed by Simon Fraser.
2622
2623         * WebCore.exp.in:
2624         * rendering/RenderLayerCompositor.cpp:
2625         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2626         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2627         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer):
2628         * rendering/RenderLayerCompositor.h:
2629         Add the concept of a document overlay layer, which is plugged in as the
2630         last child of the root content layer. Expose it to WebKit2.
2631
2632 2014-04-09  Myles C. Maxfield  <mmaxfield@apple.com>
2633
2634         Autocorrection causes ASSERT when replacing alternative string
2635         https://bugs.webkit.org/show_bug.cgi?id=131475
2636
2637         Reviewed by Ryosuke Niwa.
2638
2639         In AlternativeTextController::applyAlternativeTextToRange(), we attempt to create
2640         a Range that crosses from outside of a shadow root to inside of one. Instead,
2641         we should keep the Range entirely within the shadow root.
2642
2643         Test: ManualTests/autocorrection/autocorrection-accept-crash.html
2644
2645         * editing/AlternativeTextController.cpp:
2646         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2647
2648 2014-04-11  Hans Muller  <hmuller@adobe.com>
2649
2650         [CSS Shapes] shape-outside from image doesn't load properly
2651         https://bugs.webkit.org/show_bug.cgi?id=131491
2652
2653         Reviewed by Bem Jones-Bey.
2654
2655         Make RenderImage::imageChanged() call super if there's a shape-outside
2656         image because the shape-outside imageChanged() logic is in RenderBox.
2657
2658         Test: http/tests/css/shape-image-file.html
2659
2660         * rendering/RenderElement.h:
2661         (WebCore::RenderElement::hasShapeOutside):
2662         * rendering/RenderImage.cpp:
2663         (WebCore::RenderImage::imageChanged):
2664
2665 2014-04-11  Brady Eidson  <beidson@apple.com>
2666
2667         Aggregate multiple "respondToChangedSelection" calls to one scan for telephone numbers
2668         https://bugs.webkit.org/show_bug.cgi?id=131559
2669
2670         Reviewed by Gavin Barraclough.
2671
2672         No new tests (Perf-only change to an untested feature)
2673
2674         * editing/Editor.cpp:
2675         (WebCore::Editor::Editor):
2676         (WebCore::Editor::respondToChangedSelection): Start a one shot timer for scanSelectionForTelephoneNumbers
2677           instead of scanning synchronously.
2678         (WebCore::Editor::scanSelectionForTelephoneNumbers):
2679         * editing/Editor.h:
2680
2681 2014-04-11  Antti Koivisto  <antti@apple.com>
2682
2683         Try to fix windows build.
2684         
2685         * platform/graphics/ca/GraphicsLayerCA.h:
2686
2687 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
2688
2689         Unreviewed follow-up for r167145
2690
2691         * English.lproj/mediaControlsLocalizedStringsiOS.js:
2692         (mediaControlsLocalizedStringsiOS): Use smart-quote in
2693         message string.
2694
2695 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
2696
2697         Regression: media controls and status messages are no longer localized.
2698         https://bugs.webkit.org/show_bug.cgi?id=120956
2699
2700         Reviewed by Jer Noble.
2701
2702         * English.lproj/mediaControlsLocalizedStrings.js: Added.
2703         (mediaControlsLocalizedStrings): Moved from mediaControlsApple.js.
2704         * English.lproj/mediaControlsLocalizedStringsiOS.js: Added.
2705         (mediaControlsLocalizedStringsiOS): Moved from mediaControlsiOS.js.
2706         * Modules/mediacontrols/mediaControlsApple.js:
2707         (Controller.prototype.UIString): Get strings from external file.
2708         * Modules/mediacontrols/mediaControlsiOS.js:
2709         (ControllerIOS.prototype.UIString): Ditto.
2710         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Copy to Windows bundle.
2711         * WebCore.xcodeproj/project.pbxproj: Copy new files to bundle.
2712         * rendering/RenderThemeIOS.mm:
2713         (WebCore::RenderThemeIOS::mediaControlsScript): Load the locale-specific
2714         string resource when loading the media controls.
2715         * rendering/RenderThemeMac.mm:
2716         (WebCore::RenderThemeMac::mediaControlsScript): Ditto.
2717         * rendering/RenderThemeWin.cpp:
2718         (WebCore::RenderThemeWin::mediaControlsScript): Ditto.
2719
2720 2014-04-11  Brent Fulgham  <bfulgham@apple.com>
2721
2722         [Win] Build fix after r167138
2723
2724         * platform/graphics/ca/GraphicsLayerCA.h: The TileController is
2725         only available on Mac/Cocoa builds.
2726
2727 2014-04-11  Mark Lam  <mark.lam@apple.com>
2728
2729         JSMainThreadExecState::call() should clear exceptions before returning.
2730         <https://webkit.org/b/131530>
2731
2732         Reviewed by Geoffrey Garen.
2733
2734         Test: fast/dom/regress-131530.html
2735
2736         Previously, JSMainThreadExecState::call() did not clear any pending
2737         exceptions in the VM before returning.  On returning, the
2738         JSMainThreadExecState destructor may re-enter the VM to notify
2739         MutationObservers.  This may result in a crash because the VM expects
2740         exceptions to be cleared at entry.
2741
2742         We now change JSMainThreadExecState::call() to return the exception
2743         (if present) via an argument, and clear it from the VM before returning.
2744
2745         As part of this change, I updated various parts of the code base to use the
2746         new API as needed.
2747
2748         * bindings/js/JSCallbackData.cpp:
2749         (WebCore::JSCallbackData::invokeCallback):
2750         * bindings/js/JSCustomXPathNSResolver.cpp:
2751         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2752         * bindings/js/JSDOMGlobalObjectTask.cpp:
2753         - Assert that there's no unhandled exception after the Microtask returns.
2754           See comment for WebCore::JSMainThreadExecState::runTask below for more
2755           details.
2756
2757         * bindings/js/JSErrorHandler.cpp:
2758         (WebCore::JSErrorHandler::handleEvent):
2759         * bindings/js/JSEventListener.cpp:
2760         (WebCore::JSEventListener::handleEvent):
2761         * bindings/js/JSHTMLDocumentCustom.cpp:
2762         (WebCore::JSHTMLDocument::open):
2763         - Document.open() cannot be the first function on the JS stack.  Hence,
2764           there is no need to use JSMainThreadExecState to call into the VM, as
2765           this is only needed to catch the event of returning from the first
2766           function for the purpose of notifying MutationObservers.  Change to
2767           call JSC::call() directly.
2768
2769         * bindings/js/JSMainThreadExecState.cpp:
2770         (WebCore::functionCallHandlerFromAnyThread):
2771         * bindings/js/JSMainThreadExecState.h:
2772         (WebCore::JSMainThreadExecState::call):
2773         (WebCore::JSMainThreadExecState::evaluate):
2774         - Remove the explicitly acquisition of the JSLock here because we now
2775           acquire the JSLock as part of the JSMainThreadExecState instance.
2776         (WebCore::JSMainThreadExecState::runTask):
2777         - Added an assert to verify that the task does not return with an
2778           unhandled exception.  Currently, the only Microtask in use is for the
2779           Promise implementation, which will eat the exception before returning.
2780           This assertion is added here to verify that this contract does not
2781           inadvertantly change in the future.
2782         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
2783         - Now acquires the JSLock as well since by definition, we're only
2784           instantiating the JSMainThreadExecState because we're about to enter
2785           the VM.
2786
2787         * bindings/js/JSMutationCallback.cpp:
2788         (WebCore::JSMutationCallback::call):
2789         * bindings/js/JSNodeFilterCondition.cpp:
2790         (WebCore::JSNodeFilterCondition::acceptNode):
2791         - acceptNode() is only used in the TreeWalker and NodeIterator APIs which
2792           cannot be the first function on the JS stack.  Hence, we should call
2793           JSC::call() directly instead of going through JSMainThreadExecState.
2794
2795         * bindings/js/ScheduledAction.cpp:
2796         (WebCore::ScheduledAction::executeFunctionInContext):
2797         * bindings/objc/WebScriptObject.mm:
2798         (WebCore::addExceptionToConsole):
2799         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2800
2801 2014-04-11  Brian J. Burg  <burg@cs.washington.edu>
2802
2803         Web Replay: CodeGeneratorJS should guard includes of replay-related headers
2804         https://bugs.webkit.org/show_bug.cgi?id=131407
2805
2806         Reviewed by Timothy Hatcher.
2807
2808         This patch adds guards to headers that are only required by generated replay code
2809         that is itself guarded. Other ports probably haven't added the headers to their
2810         build files, so we don't want to emit the unused header includes.
2811
2812         This patch also converts generated uses of DEFINE_STATIC_LOCAL to NeverDestroyed<T>.
2813         Finally, a new bindings test was added to document changes to generated replay code.
2814
2815         Test: Source/WebCore/bindings/scripts/test/TestNondeterministic.idl
2816
2817         * bindings/scripts/CodeGeneratorJS.pm:
2818         (GenerateImplementation):
2819         (GenerateImplementationFunctionCall):
2820
2821         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp: Added.
2822         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h: Added.
2823         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.symbols: Added.
2824         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministicPrivate.h: Added.
2825         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added.
2826         * bindings/scripts/test/JS/JSTestNondeterministic.h: Added.
2827         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h: Added.
2828         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm: Added.
2829         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h: Added.
2830         * bindings/scripts/test/TestNondeterministic.idl: Added.
2831
2832 2014-04-11  Antti Koivisto  <antti@apple.com>
2833
2834         Pipe initial scale factor to TileController
2835         https://bugs.webkit.org/show_bug.cgi?id=131521
2836
2837         Reviewed by Tim Horton.
2838
2839         * WebCore.exp.in:
2840         * page/Page.cpp:
2841         (WebCore::Page::Page):
2842         (WebCore::Page::setZoomedOutPageScaleFactor):
2843         * page/Page.h:
2844         (WebCore::Page::zoomedOutPageScaleFactor):
2845         * platform/graphics/GraphicsLayerClient.h:
2846         (WebCore::GraphicsLayerClient::zoomedOutPageScaleFactor):
2847         * platform/graphics/TiledBacking.h:
2848         * platform/graphics/ca/GraphicsLayerCA.cpp:
2849         (WebCore::GraphicsLayerCA::updateContentsScale):
2850         * platform/graphics/ca/GraphicsLayerCA.h:
2851         * platform/graphics/ca/mac/TileController.h:
2852         * platform/graphics/ca/mac/TileController.mm:
2853         (WebCore::TileController::TileController):
2854         (WebCore::TileController::setContentsScale):
2855         (WebCore::TileController::setZoomedOutContentsScale):
2856         * rendering/RenderLayerBacking.cpp:
2857         (WebCore::RenderLayerBacking::zoomedOutPageScaleFactor):
2858         * rendering/RenderLayerBacking.h:
2859         * rendering/RenderLayerCompositor.cpp:
2860         (WebCore::RenderLayerCompositor::zoomedOutPageScaleFactor):
2861         * rendering/RenderLayerCompositor.h:
2862
2863 2014-04-10  Chris Fleizach  <cfleizach@apple.com>
2864
2865         Heap-use-after-free in WebCore::SpeechSynthesisUtterance::startTime
2866         https://bugs.webkit.org/show_bug.cgi?id=131482
2867
2868         Reviewed by David Kilzer.
2869
2870         Hold onto the utterance until it has time to fire, in case other references have been removed.
2871
2872         Merged from Blink r171077 by <dmazzoni@chromium.org>
2873
2874         Test: platform/mac/fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html
2875
2876         * Modules/speech/SpeechSynthesis.cpp:
2877         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2878
2879 2014-04-11  Zan Dobersek  <zdobersek@igalia.com>
2880
2881         Avoid Vector copies in RenderGrid::placeItemsOnGrid()
2882         https://bugs.webkit.org/show_bug.cgi?id=131452
2883
2884         Reviewed by Sergio Villar Senin.
2885
2886         * rendering/RenderGrid.cpp:
2887         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Take in a const reference to the
2888         Vector object. Make the for-loop that iterates through it range-based.
2889         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Ditto.
2890         * rendering/RenderGrid.h:
2891
2892 2014-04-11  Joseph Pecoraro  <pecoraro@apple.com>
2893
2894         Web Inspector: Remove shared PageScriptDebugServer, create per-Page
2895         https://bugs.webkit.org/show_bug.cgi?id=131523
2896
2897         Reviewed by Timothy Hatcher.
2898
2899         Having a shared PageScriptDebugServer was causing issues when we called
2900         JSC::Debugger::clearBreakpoints() closing one inspector while another
2901         is open for another WebCore::Page in the same process. Having the same
2902         JSC::Debugger underlying multiple InspectorDebuggerAgent instances
2903         means that when clearBreakpoints is called, the real JSC breakpoints
2904         underlying other InspectorDebuggerAgent's get removed. When those
2905         InspectorDebuggerAgents attempt to remove their breakpoints they
2906         encounter unexpected issues.
2907
2908         This entirely rebuilds PageScriptDebugServer to be per-Page instead
2909         of shared across all pages. So take this opportunity to move the
2910         file from WebCore/bindings/js to WebCore/inspector.
2911
2912         * CMakeLists.txt:
2913         * WebCore.vcxproj/WebCore.vcxproj:
2914         * WebCore.vcxproj/WebCore.vcxproj.filters:
2915         * WebCore.xcodeproj/project.pbxproj:
2916         * bindings/js/JSBindingsAllInOne.cpp:
2917         * bindings/js/PageScriptDebugServer.h: Removed.
2918         * inspector/InspectorAllInOne.cpp:
2919         Move PageScriptDebugServer.
2920
2921         * inspector/InspectorController.h:
2922         * inspector/InspectorController.cpp:
2923         (WebCore::InspectorController::InspectorController):
2924         Set the ScriptDebugServer directly on some other agents that
2925         were previously using the global debug server.
2926
2927         * inspector/InspectorProfilerAgent.h:
2928         (WebCore::InspectorProfilerAgent::scriptDebugServer):
2929         * inspector/InspectorProfilerAgent.cpp:
2930         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2931         (WebCore::InspectorProfilerAgent::setScriptDebugServer):
2932         (WebCore::InspectorProfilerAgent::start):
2933         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend): Deleted.
2934         * inspector/InspectorTimelineAgent.h:
2935         * inspector/InspectorTimelineAgent.cpp:
2936         (WebCore::InspectorTimelineAgent::start):
2937         (WebCore::InspectorTimelineAgent::stop):
2938         (WebCore::InspectorTimelineAgent::setPageScriptDebugServer):
2939         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2940         Refactor these two agents to take in a script debug server.
2941         The server is expected to be set during initialization and
2942         to always be valid (like debug server on RuntimeAgent).
2943
2944         * inspector/PageDebuggerAgent.h:
2945         * inspector/PageDebuggerAgent.cpp:
2946         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
2947         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
2948         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
2949         (WebCore::PageDebuggerAgent::scriptDebugServer):
2950         Have PageDebuggerAgent hold the PageScriptDebugServer.
2951         Update for the simplified interfaces.
2952
2953         * inspector/PageScriptDebugServer.h: Added.
2954         * inspector/PageScriptDebugServer.cpp: Renamed from Source/WebCore/bindings/js/PageScriptDebugServer.cpp.
2955         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
2956         (WebCore::PageScriptDebugServer::addListener):
2957         (WebCore::PageScriptDebugServer::removeListener):
2958         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2959         (WebCore::PageScriptDebugServer::didPause):
2960         (WebCore::PageScriptDebugServer::didContinue):
2961         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
2962         (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
2963         (WebCore::PageScriptDebugServer::isContentScript):
2964         (WebCore::PageScriptDebugServer::reportException):
2965         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
2966         Model after JSGlobalObjectScriptDebugServer, the PageScriptDebugServer
2967         holds a reference to a Page.
2968
2969 2014-04-11  Bear Travis  <betravis@adobe.com>
2970
2971         [CSS Shapes] inset args and radial args should serialize to the simplest form
2972         https://bugs.webkit.org/show_bug.cgi?id=129825
2973
2974         Reviewed by Dirk Schulze.
2975
2976         Modify inset serialization to omit components where possible. The insets simplify
2977         according to the margin shorthand, while the corner radii simplify according to
2978         the border-radius shorthand.
2979
2980         Modifying existing parsing tests.
2981
2982         * css/CSSBasicShapes.cpp:
2983         (WebCore::buildInsetRadii): Add the necessary radii, omitting components where possible.
2984         (WebCore::buildInsetString): Omit components where possible.
2985
2986 2014-04-11  Praveen R Jadhav  <praveen.j@samsung.com>
2987
2988         "playbackTime" parameter is not present in AudioProcessingEvent Interface as per W3C spec
2989         https://bugs.webkit.org/show_bug.cgi?id=105518
2990
2991         Reviewed by Jer Noble.
2992
2993         Attribute "playbackTime" in AudioProcessingEvent implemented to pass playback time of
2994         audiobuffer associated with ScriptProcessorNode of the context.
2995  
2996         Reference: https://codereview.chromium.org/210973002
2997
2998         Spec: http://www.w3.org/TR/webaudio/#AudioProcessingEvent
2999
3000         Test: webaudio/audioprocessingevent.html
3001
3002         * Modules/webaudio/AudioProcessingEvent.cpp:
3003         (WebCore::AudioProcessingEvent::create):
3004         (WebCore::AudioProcessingEvent::AudioProcessingEvent):
3005         * Modules/webaudio/AudioProcessingEvent.h:
3006         (WebCore::AudioProcessingEvent::playbackTime):
3007         * Modules/webaudio/AudioProcessingEvent.idl:
3008         * Modules/webaudio/ScriptProcessorNode.cpp:
3009         (WebCore::ScriptProcessorNode::fireProcessEvent):
3010
3011 2014-04-11  Zalan Bujtas  <zalan@apple.com>
3012
3013         Subpixel rendering: WK1: Trail of cruft in redraw during animations.
3014         https://bugs.webkit.org/show_bug.cgi?id=131525
3015
3016         Reviewed by Simon Fraser.
3017
3018         Use enclosing rect instead of snapping to make sure the repaint rect always
3019         covers the dirty area when painting is requested in a non-compositing RenderView.
3020         This only applies to WK1 as WK2 has compositing RenderView and the repainting 
3021         is managed by RenderLayerBacking.
3022
3023         This is a temporary solution until after ScrollView/FrameView/RenderView
3024         is transitioned to device pixels. (tracked here: webkit.org/b/131526).
3025
3026         Test: fast/repaint/hidpi-block-width-change-leaves-cruft.html
3027
3028         * rendering/RenderView.cpp:
3029         (WebCore::RenderView::repaintViewRectangle):
3030
3031 2014-04-10  Dean Jackson  <dino@apple.com>
3032
3033         WebGL: need error checking after texture uploads
3034         https://bugs.webkit.org/show_bug.cgi?id=62902
3035         rdar://problem/9640309
3036
3037         Reviewed by Brent Fulgham.
3038
3039         A followup to Darin's r167109. We need to also check for errors
3040         in the texImage2D case.
3041
3042         This is difficult to reproducibly test because it would require
3043         attempting to exhaust GPU memory.
3044
3045         * html/canvas/WebGLRenderingContext.cpp:
3046         (WebCore::WebGLRenderingContext::compressedTexImage2D): Check for errors by calling
3047         moveErrorsToSyntheticErrorList twice, once before and once after. If an error
3048         occurred, explicitly mark the texture as invalid.
3049         (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
3050         * html/canvas/WebGLTexture.cpp:
3051         (WebCore::WebGLTexture::markInvalid): If the LevelInfo exists for this
3052         mipmap level, then set the valid flag to false. There is a chance that
3053         a previous call to texImage2D succeeded for this level, but it's probably
3054         better to assume that is now invalid.
3055         * html/canvas/WebGLTexture.h: New markInvalid method.
3056
3057 2014-04-10  Darin Adler  <darin@apple.com>
3058
3059         WebGL: need error checking after texture and buffer uploads in some cases
3060         https://bugs.webkit.org/show_bug.cgi?id=62902
3061         rdar://problem/9640309
3062
3063         Reviewed by Dean Jackson.
3064
3065         Not clear how to write a test for this.
3066
3067         * html/canvas/WebGLBuffer.cpp:
3068         (WebCore::WebGLBuffer::disassociateBufferData): Added.
3069         * html/canvas/WebGLBuffer.h: Added disassociateBufferData.
3070
3071         * html/canvas/WebGLRenderingContext.cpp:
3072         (WebCore::WebGLRenderingContext::bufferData): Check for errors by calling
3073         moveErrorsToSyntheticErrorList twice, once before and once after. If an error
3074         occurred, call the WebGLBuffer so it doesn't think it has data.
3075         (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
3076
3077         * platform/graphics/GraphicsContext3D.h: Added moveErrorsToSyntheticErrorList.
3078
3079         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3080         (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList): Added. Calls
3081         glError and moves any errors to the synthetic error list.
3082         (WebCore::GraphicsContext3D::getError): Added call to moveErrorsToSyntheticErrorList
3083         to preserve error ordering.
3084         (WebCore::GraphicsContext3D::synthesizeGLError): Ditto.
3085
3086 2014-04-10  Enrica Casucci  <enrica@apple.com>
3087
3088         iOS build fix to deal with CoreText changes.
3089         
3090         Reviewed by Benjamin Poulain.
3091         
3092         This is a temporary fix until CT fixes the issue.
3093
3094         * rendering/RenderThemeIOS.mm:
3095
3096 2014-04-10  Commit Queue  <commit-queue@webkit.org>
3097
3098         Unreviewed, rolling out r167073.
3099         https://bugs.webkit.org/show_bug.cgi?id=131516
3100
3101         This patch caused crashes in video tests. (Requested by
3102         mrobinson on #webkit).
3103
3104         Reverted changeset:
3105
3106         "[GStreamer] No CORS support for media elements"
3107         https://bugs.webkit.org/show_bug.cgi?id=99037
3108         http://trac.webkit.org/changeset/167073
3109
3110 2014-04-10  Beth Dakin  <bdakin@apple.com>
3111
3112         Radio buttons are using the wrong sizes and margins
3113         https://bugs.webkit.org/show_bug.cgi?id=131503
3114
3115         Reviewed by Jer Noble.
3116
3117         This is a regression that I caused recently when I combined radio button and 
3118         checkbox code. 
3119         * platform/mac/ThemeMac.mm:
3120         (WebCore::paintToggleButton):
3121
3122 2014-04-08  Jon Honeycutt  <jhoneycutt@apple.com>
3123
3124         Assertion failure in WebCore::FlexBoxIterator::next()
3125         <https://bugs.webkit.org/show_bug.cgi?id=117176>
3126         <rdar://problem/14054549>
3127
3128         Code added in r115687 began removing anonymous wrappers when children
3129         become inline. However, there are some objects, like
3130         RenderDeprecatedFlexBox, whose children should always be blocks.
3131
3132         Reviewed by Tim Horton.
3133
3134         * rendering/RenderBlock.h:
3135         (WebCore::RenderBlock::canCollapseAnonymousBlockChild):
3136         Made public.
3137
3138         * rendering/RenderObject.cpp:
3139         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
3140         Return early if we can't collapse anonymous block children.
3141
3142 2014-04-07  Jon Honeycutt  <jhoneycutt@apple.com>
3143
3144         Assertion failure, !node || node->isElementNode(), in
3145         WebCore::RenderBlock::clone()
3146         <https://bugs.webkit.org/show_bug.cgi?id=110489>
3147         <rdar://problem/13666425>
3148
3149         Reviewed by Antti Koivisto.
3150
3151         We're ending up in RenderBlock::splitBlocks() with |this| ==
3152         |fromBlock|.  We then try to climb the ancestor block chain from
3153         this->parent() to |fromBlock|, but this->parent() is already above
3154         |fromBlock|, so we end up climbing up to the RenderView and trying to
3155         clone it, causing the assertion failure.
3156
3157         Adopt Chromium's mitigation for this from
3158         <https://codereview.chromium.org/13852041>. This is not intended as a
3159         fix for the underlying issue.
3160
3161         Also, fix another issue that occurs with this fuzzed test case that's
3162         not handled by the Chromium fix.
3163
3164         * rendering/RenderBlock.cpp:
3165         (WebCore::RenderBlock::splitBlocks):
3166         Ensure while we're in the loop that |curr| is a descendant of
3167         |fromBlock|. From the Chromium patch:
3168
3169             We need to check in every iteration of the loop because
3170             moveChildrenTo could have moved |curr|. This is a mitigation and
3171             not really a fix against a class of tree craziness.
3172
3173         Finally, before moving children from |fromBlock| to |toBlock|, ensure
3174         that the children are children of |fromBlock|. If we never entered the
3175         loop, they will be siblings of |fromBlock|, not children.
3176
3177 2014-04-10  Enrica Casucci  <enrica@apple.com>
3178
3179         Build fix after http://trac.webkit.org/changeset/167085.
3180
3181         Reviewed by Timothy Hatcher.
3182
3183         * plugins/PluginData.h:
3184
3185 2014-04-10  Zalan Bujtas  <zalan@apple.com>
3186
3187         Web Inspector: Breakpoint in gutter has clipped / broken border image.
3188         https://bugs.webkit.org/show_bug.cgi?id=131500
3189
3190         Reviewed by Joseph Pecoraro.
3191
3192         Typo in r166925.
3193
3194         Test: fast/borders/border-image-slice-missing-right.html
3195
3196         * rendering/RenderBoxModelObject.cpp:
3197         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3198
3199 2014-04-10  James Craig  <jcraig@apple.com>
3200
3201         Web Inspector: AXI: expose aria-busy state of current and ancestor nodes
3202         https://bugs.webkit.org/show_bug.cgi?id=130826
3203
3204         Reviewed by Timothy Hatcher.
3205
3206         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3207
3208         Expose if node is contained by any "busy" ancestor nodes, too.
3209
3210         * inspector/InspectorDOMAgent.cpp:
3211         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3212
3213 2014-04-10  Joseph Pecoraro  <pecoraro@apple.com>
3214
3215         Web Inspector: Remove unused ruler in overlay code
3216         https://bugs.webkit.org/show_bug.cgi?id=131507
3217
3218         Reviewed by Timothy Hatcher.
3219
3220         * inspector/InspectorDOMAgent.cpp:
3221         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
3222         * inspector/InspectorOverlay.cpp:
3223         (WebCore::buildObjectForHighlight):
3224         * inspector/InspectorOverlay.h:
3225         (WebCore::Highlight::Highlight):
3226         (WebCore::Highlight::setDataFromConfig):
3227         * inspector/InspectorOverlayPage.js:
3228         (_drawFragmentHighlight):
3229         (_drawRegionNumber): Deleted.
3230         (quadToPath): Deleted.
3231         (drawOutlinedQuad): Deleted.
3232         (pathCommand): Deleted.
3233         (drawPath): Deleted.
3234         (drawOutlinedQuadWithClip): Deleted.
3235         (quadEquals): Deleted.
3236         (drawGutter): Deleted.
3237         (drawNodeHighlight): Deleted.
3238         (drawQuadHighlight): Deleted.
3239         (setPlatform): Deleted.
3240         (dispatch): Deleted.
3241         (log): Deleted.
3242
3243 2014-04-10  Brian J. Burg  <burg@cs.washington.edu>
3244
3245         Web Replay: memoize plugin data for navigator.mimeTypes and navigator.plugins
3246         https://bugs.webkit.org/show_bug.cgi?id=131341
3247
3248         Reviewed by Timothy Hatcher.
3249
3250         Information about plugins and mime types is nondeterministic and can change
3251         at any time, whether by system events, browser settings changes, or
3252         triggered by script. To avoid interposing on all those code paths, just
3253         memoize the plugin data used by DOMPluginArray and DOMMimeTypeArray.
3254
3255         This is less efficient than controlling mutations to the underlying PluginData
3256         of a Page, but that can be done later if better plugin support is desired.
3257         The point of this change is to make analytics trackers deterministic across
3258         enabling/disabling of plugins.
3259
3260         Test: LayoutTests/inspector/window-navigator-plugins-memoized.hml
3261
3262         * plugins/DOMMimeTypeArray.cpp:
3263         (WebCore::DOMMimeTypeArray::getPluginData):
3264         * plugins/DOMPluginArray.cpp:
3265         (WebCore::DOMPluginArray::pluginData): Save or restore memoized plugin
3266         data during capture and replay, respectively.
3267
3268         * plugins/PluginData.h:
3269         (WebCore::PluginData::PluginData): Add a constructor that uses the
3270         provided plugin data rather than fetching live plugin data. This is
3271         marked protected so it's only used by a subclass specifically for
3272         deserialization.
3273
3274         * replay/SerializationMethods.cpp: Add encoder specializations.
3275         (JSC::EncodingTraits<MimeClassInfo>::encodeValue):
3276         (JSC::EncodingTraits<MimeClassInfo>::decodeValue):
3277         (JSC::EncodingTraits<PluginInfo>::encodeValue):
3278         (JSC::EncodingTraits<PluginInfo>::decodeValue):
3279         (JSC::EncodingTraits<PluginData>::encodeValue):
3280         (JSC::DeserializedPluginData::DeserializedPluginData): Add a custom
3281         subclass of PluginData that can be initialized from deserialized data.
3282         (JSC::EncodingTraits<PluginData>::decodeValue):
3283         * replay/SerializationMethods.h:
3284         * replay/WebInputs.json: Add new input FetchPluginData.
3285
3286 2014-04-10  Myles C. Maxfield  <mmaxfield@apple.com>
3287
3288         Remove "System Font" from character width calculations
3289         https://bugs.webkit.org/show_bug.cgi?id=131411
3290
3291         Reviewed by Tim Horton.
3292
3293         Covered by existing tests
3294
3295         * platform/graphics/Font.cpp:
3296         (WebCore::Font::hasValidAverageCharWidth):
3297
3298 2014-04-10  Bem Jones-Bey  <bjonesbe@adobe.com>
3299
3300         Invalid cast in WebCore::RenderLayer::setupClipPath
3301         https://bugs.webkit.org/show_bug.cgi?id=131368
3302
3303         Reviewed by Dirk Schulze.
3304
3305         Only attempt to clip to a box shape if the renderer being clipped is
3306         actually a box.
3307
3308         Test: css3/masking/clip-path-box-shape-on-inline-crash.html
3309
3310         * rendering/RenderLayer.cpp:
3311         (WebCore::RenderLayer::setupClipPath): Add isBox() check.
3312
3313 2014-04-10  Owen Taylor  <otaylor@redhat.com>
3314
3315         [GTK] Remove a comment that was incorrectly cut-and-pasted from WidgetBackingStoreCairo
3316         https://bugs.webkit.org/show_bug.cgi?id=131499
3317
3318         Reviewed by Martin Robinson.
3319
3320         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Remove a comment that was incorrectly copy and pasted
3321         from the Cairo implementation.
3322
3323 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
3324
3325         Eliminate DragSession structure
3326         https://bugs.webkit.org/show_bug.cgi?id=131465
3327
3328         Reviewed by Benjamin Poulain.
3329
3330         DragSession is really just a transient response to NSDragDestination delegate methods.
3331         The "session" name was quite misleading, and thankfully, we don't need a class for this
3332         bag of data at all.
3333
3334         * WebCore.xcodeproj/project.pbxproj:
3335         * page/DragController.cpp:
3336         (WebCore::DragController::DragController):
3337         (WebCore::DragController::dragEntered):
3338         (WebCore::DragController::dragUpdated):
3339         (WebCore::DragController::dragEnteredOrUpdated):
3340         (WebCore::DragController::tryDocumentDrag):
3341         * page/DragController.h:
3342         (WebCore::DragController::mouseIsOverFileInput):
3343         (WebCore::DragController::numberOfItemsToBeAccepted):
3344         * page/DragSession.h: Removed.
3345
3346 2014-04-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3347
3348         [GStreamer] No CORS support for media elements
3349         https://bugs.webkit.org/show_bug.cgi?id=99037
3350
3351         Reviewed by Philippe Normand.
3352
3353         Added CORS access control check to media sources when crossorigin attribute is set.
3354
3355         Added getter to CORS access control check status (used to compute whether the stream is tainted or not).
3356         Related test is http/tests/security/video-cross-origin-readback.html.
3357
3358         Disabled access to cross-origin streams that fail CORS check when crossorigin attribute is set.
3359         Related test is http/tests/security/video-cross-origin-accessfailure.html.
3360
3361         Tests: http/tests/security/video-cross-origin-accessfailure.html
3362                http/tests/security/video-cross-origin-accesssameorigin.html
3363
3364         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3365         (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck): Return whether media is cross-origin (tainted) or not by querying the gstreamer source layer.
3366         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added MediaPlayerPrivateGStreamer::didPassCORSAccessCheck declaration.
3367         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3368         (webKitWebSrcStart): Passed CORS mode parameter to the streaming client. In case of CORS check failure, stop the resource loading.
3369         (webKitSrcPassedCORSAccessCheck): Return whether CORS access control check was done and successful.
3370         (StreamingClient::handleResponseReceived): Take a parameter to assign the CORS access control check result.
3371         (CachedResourceStreamingClient::CachedResourceStreamingClient): Updated setting of the ResourceLoaderOptions according CORS mode.
3372         (CachedResourceStreamingClient::responseReceived): Check CORS and pass result to handleResponseReceived.
3373         (ResourceHandleStreamingClient::didReceiveResponse): No CORS check.
3374         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Added webKitSrcPassedCORSAccessCheck declaration.
3375
3376 2014-04-10  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3377
3378         Move UseJSC.cmake back to CMakeLists.txt
3379         https://bugs.webkit.org/show_bug.cgi?id=130834
3380
3381         Reviewed by Csaba Osztrogonác.
3382
3383         No new tests required.
3384
3385         * CMakeLists.txt:
3386         * UseJSC.cmake: Removed.
3387
3388 2014-04-09  Commit Queue  <commit-queue@webkit.org>
3389
3390         Unreviewed, rolling out r167046.
3391         https://bugs.webkit.org/show_bug.cgi?id=131479
3392
3393         Caused 300+ failures on Mavericks WK1 tester (Requested by ap
3394         on #webkit).
3395
3396         Reverted changeset:
3397
3398         "Remove "System Font" from whitelisted DRT fonts and char
3399         width calculations"
3400         https://bugs.webkit.org/show_bug.cgi?id=131411
3401         http://trac.webkit.org/changeset/167046
3402
3403 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
3404
3405         Fix build failure.
3406         https://bugs.webkit.org/show_bug.cgi?id=131473
3407
3408         Reviewed by Dan Bernstein.
3409
3410         Fix build failure.
3411
3412         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3413         (mediaSelectionOptions):
3414
3415 2014-04-09  Enrica Casucci  <enrica@apple.com>
3416
3417         Unreviewed build fix after http://trac.webkit.org/changeset/167045
3418
3419         The file contained an invalid character.
3420
3421