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