Update style asynchronously after style sheet load
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-01-24  Antti Koivisto  <antti@apple.com>
2
3         Update style asynchronously after style sheet load
4         https://bugs.webkit.org/show_bug.cgi?id=127563
5
6         Reviewed by Andreas Kling.
7         
8         Since we don't attach synchronously we don't need to recalc style synchronously either.
9
10         * dom/Document.cpp:
11         (WebCore::Document::didRemoveAllPendingStylesheet):
12
13 2014-01-24  Zalan Bujtas  <zalan@apple.com>
14
15         Subpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px extra margin on both left and right.
16         https://bugs.webkit.org/show_bug.cgi?id=125728
17
18         Reviewed by Simon Fraser.
19
20         Using the 0.5ex value to set checkbox/radio left and right margins is a long-standing
21         (khtml) behavior. While it indicates dynamic behavior, in order to get the margins changed,
22         the widget's font size needs to be set, which is rather rare for such input types.
23         It also results in odd layout, where the checkbox's indentation may seem to change randomly.
24
25         '<input style="font-size: 30px;" type="checkbox">foo' changes neither the checkbox
26         nor the text size, but it indents the line by about 15px.
27
28         Other browsers (FF, Opera with Presto) disagree and they set static margins values.
29         2px is the current default computed value.
30
31         * css/html.css:
32         (input[type="radio"], input[type="checkbox"]):
33
34 2014-01-24  Oliver Hunt  <oliver@apple.com>
35
36         Put functions need to take a base object and a this value, and perform type checks on |this|
37         https://bugs.webkit.org/show_bug.cgi?id=127594
38
39         Reviewed by Geoffrey Garen.
40
41         Update bindings generator to emit setters with correct type, and perform
42         type checks on |this|, instead of the baseObject.
43
44         Test: js/dom/dom-as-prototype-assignment-exception.html
45
46         * bindings/scripts/CodeGeneratorJS.pm:
47         (GenerateHeader):
48         (GenerateImplementation):
49         (GenerateHashTable):
50         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
51         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
52         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
53         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
54         * bindings/scripts/test/JS/JSTestException.cpp:
55         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
56         * bindings/scripts/test/JS/JSTestInterface.cpp:
57         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
58         (WebCore::setJSTestInterfaceImplementsStr2):
59         (WebCore::setJSTestInterfaceImplementsStr3):
60         (WebCore::setJSTestInterfaceImplementsNode):
61         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
62         (WebCore::setJSTestInterfaceSupplementalStr2):
63         (WebCore::setJSTestInterfaceSupplementalStr3):
64         (WebCore::setJSTestInterfaceSupplementalNode):
65         * bindings/scripts/test/JS/JSTestInterface.h:
66         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
67         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
68         * bindings/scripts/test/JS/JSTestNode.cpp:
69         * bindings/scripts/test/JS/JSTestObj.cpp:
70         (WebCore::setJSTestObjConstructorStaticStringAttr):
71         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
72         (WebCore::setJSTestObjEnumAttr):
73         (WebCore::setJSTestObjByteAttr):
74         (WebCore::setJSTestObjOctetAttr):
75         (WebCore::setJSTestObjShortAttr):
76         (WebCore::setJSTestObjUnsignedShortAttr):
77         (WebCore::setJSTestObjLongAttr):
78         (WebCore::setJSTestObjLongLongAttr):
79         (WebCore::setJSTestObjUnsignedLongLongAttr):
80         (WebCore::setJSTestObjStringAttr):
81         (WebCore::setJSTestObjTestObjAttr):
82         (WebCore::setJSTestObjXMLObjAttr):
83         (WebCore::setJSTestObjCreate):
84         (WebCore::setJSTestObjReflectedStringAttr):
85         (WebCore::setJSTestObjReflectedIntegralAttr):
86         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
87         (WebCore::setJSTestObjReflectedBooleanAttr):
88         (WebCore::setJSTestObjReflectedURLAttr):
89         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
90         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
91         (WebCore::setJSTestObjReflectedCustomURLAttr):
92         (WebCore::setJSTestObjTypedArrayAttr):
93         (WebCore::setJSTestObjAttrWithGetterException):
94         (WebCore::setJSTestObjAttrWithSetterException):
95         (WebCore::setJSTestObjStringAttrWithGetterException):
96         (WebCore::setJSTestObjStringAttrWithSetterException):
97         (WebCore::setJSTestObjCustomAttr):
98         (WebCore::setJSTestObjWithScriptStateAttribute):
99         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
100         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
101         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
102         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
103         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
104         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
105         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
106         (WebCore::setJSTestObjConditionalAttr1):
107         (WebCore::setJSTestObjConditionalAttr2):
108         (WebCore::setJSTestObjConditionalAttr3):
109         (WebCore::setJSTestObjConditionalAttr4Constructor):
110         (WebCore::setJSTestObjConditionalAttr5Constructor):
111         (WebCore::setJSTestObjConditionalAttr6Constructor):
112         (WebCore::setJSTestObjAnyAttribute):
113         (WebCore::setJSTestObjMutablePoint):
114         (WebCore::setJSTestObjImmutablePoint):
115         (WebCore::setJSTestObjStrawberry):
116         (WebCore::setJSTestObjStrictFloat):
117         (WebCore::setJSTestObjId):
118         (WebCore::setJSTestObjReplaceableAttribute):
119         (WebCore::setJSTestObjNullableLongSettableAttribute):
120         (WebCore::setJSTestObjNullableStringValue):
121         (WebCore::setJSTestObjAttributeWithReservedEnumType):
122         * bindings/scripts/test/JS/JSTestObj.h:
123         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
124         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
125         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
126         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
127         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
128         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
129         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
130         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
131         (WebCore::setJSTestTypedefsAttrWithGetterException):
132         (WebCore::setJSTestTypedefsAttrWithSetterException):
133         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
134         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
135         * bindings/scripts/test/JS/JSTestTypedefs.h:
136         * bindings/scripts/test/JS/JSattribute.cpp:
137         * bindings/scripts/test/JS/JSreadonly.cpp:
138
139 2014-01-24  Oliver Hunt  <oliver@apple.com>
140
141         Generic JSObject::put should handle static properties in the classinfo hierarchy
142         https://bugs.webkit.org/show_bug.cgi?id=127523
143
144         Reviewed by Geoffrey Garen.
145
146         Update the bindings generator to emit the flag indicating the presence
147         of setters, and remove the many (now unnecessary) put overrides.
148         Tested with run-jsc-benchmarks and shows neutral performance. A few of the
149         micro benchmarks actually get a significant performance increase which
150         is nice.
151
152         * bindings/js/JSDOMWindowCustom.cpp:
153         (WebCore::JSDOMWindow::put):
154             We still need a custom call to lookupPut here in order
155             to get the magic security semantics of the window object.
156         * bindings/scripts/CodeGeneratorJS.pm:
157         (hashTableAccessor):
158         (prototypeHashTableAccessor):
159         (constructorHashTableAccessor):
160         (GenerateImplementation):
161         (GenerateHashTable):
162         (GenerateConstructorHelperMethods):
163
164         * bindings/js/JSDOMWindowCustom.cpp:
165         (WebCore::JSDOMWindow::put):
166         * bindings/scripts/CodeGeneratorJS.pm:
167         (hashTableAccessor):
168         (prototypeHashTableAccessor):
169         (constructorHashTableAccessor):
170         (InstanceOverridesPutImplementation):
171         (InstanceOverridesPutDeclaration):
172         (GenerateHeader):
173         (GenerateImplementation):
174         (GenerateHashTable):
175         (GenerateConstructorHelperMethods):
176         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
177         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
178         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
179         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
180         * bindings/scripts/test/JS/JSTestException.cpp:
181         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
182         * bindings/scripts/test/JS/JSTestInterface.cpp:
183         (WebCore::JSTestInterface::put):
184         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
185         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
186         * bindings/scripts/test/JS/JSTestNode.cpp:
187         * bindings/scripts/test/JS/JSTestObj.cpp:
188         * bindings/scripts/test/JS/JSTestObj.h:
189         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
190         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
191         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
192         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
193         * bindings/scripts/test/JS/JSTestTypedefs.h:
194         * bindings/scripts/test/JS/JSattribute.cpp:
195         * bindings/scripts/test/JS/JSreadonly.cpp:
196         * html/canvas/WebGLRenderingContext.idl:
197           Remove bogus attribute, as it has never been in the spec and should not
198           have been added.
199
200 2014-01-24  Commit Queue  <commit-queue@webkit.org>
201
202         Unreviewed, rolling out r162713.
203         http://trac.webkit.org/changeset/162713
204         https://bugs.webkit.org/show_bug.cgi?id=127593
205
206         broke media/network-no-source-const-shadow (Requested by
207         thorton on #webkit).
208
209         * bindings/js/JSDOMWindowCustom.cpp:
210         (WebCore::JSDOMWindow::put):
211         * bindings/scripts/CodeGeneratorJS.pm:
212         (hashTableAccessor):
213         (prototypeHashTableAccessor):
214         (constructorHashTableAccessor):
215         (GenerateHeader):
216         (GenerateImplementation):
217         (GenerateHashTable):
218         (GenerateConstructorHelperMethods):
219         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
220         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
221         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
222         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
223         * bindings/scripts/test/JS/JSTestException.cpp:
224         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
225         * bindings/scripts/test/JS/JSTestInterface.cpp:
226         (WebCore::JSTestInterface::put):
227         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
228         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
229         * bindings/scripts/test/JS/JSTestNode.cpp:
230         * bindings/scripts/test/JS/JSTestObj.cpp:
231         (WebCore::JSTestObj::put):
232         * bindings/scripts/test/JS/JSTestObj.h:
233         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
234         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
235         (WebCore::JSTestSerializedScriptValueInterface::put):
236         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
237         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
238         (WebCore::JSTestTypedefs::put):
239         * bindings/scripts/test/JS/JSTestTypedefs.h:
240         * bindings/scripts/test/JS/JSattribute.cpp:
241         * bindings/scripts/test/JS/JSreadonly.cpp:
242         * html/canvas/WebGLRenderingContext.idl:
243
244 2014-01-24  Zalan Bujtas  <zalan@apple.com>
245
246         Replace LayoutUnit() calls to a more descriptive LayoutUnit::fromPixel(int).
247         https://bugs.webkit.org/show_bug.cgi?id=127580
248
249         Reviewed by Simon Fraser.
250
251         LayoutUnit(1) statement is ambiguous. While it is intended to set one (CSS) pixel, it
252         could be interpreted as 1 layout unit (1/64th of a CSS pixel atm).
253
254         No change in behavior.
255
256         * inspector/InspectorOverlay.cpp:
257         (WebCore::buildObjectForRegionHighlight):
258         * rendering/FloatingObjects.cpp:
259         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
260         * rendering/RenderBlock.cpp:
261         (WebCore::RenderBlock::layoutShapeInsideInfo):
262         * rendering/RenderBlockFlow.cpp:
263         (WebCore::RenderBlockFlow::collapseMargins):
264         * rendering/RenderFlexibleBox.cpp:
265         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
266         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
267         (WebCore::RenderFlexibleBox::alignChildren):
268         * rendering/RenderMultiColumnFlowThread.cpp:
269         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
270         * rendering/RenderMultiColumnSet.cpp:
271         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
272         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
273
274 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
275
276         Prepare scrolling tree to handle > 1 scrolling node
277         https://bugs.webkit.org/show_bug.cgi?id=127590
278
279         Reviewed by Tim Horton.
280
281         Clean up the code path called after the ScrollingTree has scrolled a node,
282         to prepare for multiple scrolling nodes.
283         
284         Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
285         and pass along the ScrollingNodeID that scrolled.
286         
287         Move updateMainFrameScrollPosition-related code from ScrollingCoordinator to
288         AsyncScrollingCoordinator, since this sync-up is only necessary when doing
289         async scrolling.
290
291         * WebCore.exp.in:
292         * page/scrolling/AsyncScrollingCoordinator.cpp:
293         (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
294         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
295         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
296         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
297         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
298         * page/scrolling/AsyncScrollingCoordinator.h:
299         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
300         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType):
301         Package up the data related to a scheduled scroll into a ScheduledScrollUpdate struct,
302         for easier comparison and cleaner code.
303         * page/scrolling/ScrollingCoordinator.cpp:
304         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
305         * page/scrolling/ScrollingCoordinator.h:
306         * page/scrolling/ScrollingTree.h:
307         * page/scrolling/ThreadedScrollingTree.cpp:
308         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
309         * page/scrolling/ThreadedScrollingTree.h:
310         * page/scrolling/ios/ScrollingTreeIOS.cpp:
311         (WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
312         * page/scrolling/ios/ScrollingTreeIOS.h:
313         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
314         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
315         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
316         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
317
318 2014-01-24  Mark Lam  <mark.lam@apple.com>
319
320         ASSERT(!m_markedSpace.m_currentDelayedReleaseScope) reloading page in inspector.
321         <https://webkit.org/b/127582>
322
323         Reviewed by Mark Hahnenberg.
324
325         No new tests.
326
327         * bindings/js/ScriptController.cpp:
328         (WebCore::ScriptController::attachDebugger):
329         * bindings/js/WorkerScriptController.cpp:
330         (WebCore::WorkerScriptController::detachDebugger):
331         - Adding reasons for detaching a globalObject from the debugger.
332
333 2014-01-24  Zalan Bujtas  <zalan@apple.com>
334
335         Subpixel rendering: Make PaintInfo layout unit aware.
336         https://bugs.webkit.org/show_bug.cgi?id=127562
337
338         Reviewed by Simon Fraser.
339
340         Replace PaintInfo's IntRect with LayoutRect to be able to render to
341         subpixel positions.
342
343         No functional changes.
344
345         * platform/graphics/LayoutRect.h:
346         * rendering/PaintInfo.h:
347         (WebCore::PaintInfo::PaintInfo):
348         (WebCore::PaintInfo::applyTransform):
349         * rendering/RenderBlock.cpp:
350         (WebCore::RenderBlock::paint):
351         * rendering/RenderBoxModelObject.cpp:
352         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
353         * rendering/RenderLayer.cpp:
354         (WebCore::cornerRect):
355         (WebCore::RenderLayer::scrollCornerRect):
356         (WebCore::resizerCornerRect):
357         (WebCore::RenderLayer::scrollCornerAndResizerRect):
358         (WebCore::RenderLayer::horizontalScrollbarStart):
359         (WebCore::RenderLayer::drawPlatformResizerImage):
360         (WebCore::RenderLayer::paintResizer):
361         (WebCore::RenderLayer::hitTestOverflowControls):
362         * rendering/RenderLayer.h:
363         * rendering/RenderLayerBacking.cpp:
364         (WebCore::RenderLayerBacking::paintContents):
365         * rendering/RenderListBox.cpp:
366         (WebCore::RenderListBox::paintScrollbar):
367         * rendering/RenderWidget.cpp:
368         (WebCore::RenderWidget::paintContents):
369         * rendering/mathml/RenderMathMLOperator.cpp:
370         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph):
371         * rendering/svg/SVGRenderingContext.h:
372
373 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
374
375         #ifdef out handleWheelEventPhase for iOS
376         https://bugs.webkit.org/show_bug.cgi?id=127583
377
378         Reviewed by Tim Horton.
379
380         handleWheelEventPhase() doesn't make any sense for iOS, which
381         has no wheel events.
382
383         * page/scrolling/ScrollingTree.h:
384         * page/scrolling/ThreadedScrollingTree.cpp:
385         * page/scrolling/ThreadedScrollingTree.h:
386         * page/scrolling/ios/ScrollingTreeIOS.h:
387
388 2014-01-24  David Hyatt  <hyatt@apple.com>
389
390         [New Multicolumn] Don't destroy all the renderers when a multi-column block stops being multi-column (and vice versa)
391         https://bugs.webkit.org/show_bug.cgi?id=127584
392
393         Make the logic for when you need columns and when you don't shared between the
394         old multi-column code and the new multi-column code. Make sure that the flow thread
395         and sets get created lazily and destroyed on-demand when whether or not we should
396         have multiple columns changes.
397
398         Reviewed by Beth Dakin.
399
400         * rendering/RenderBlock.cpp:
401         (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
402         No longer virtual. The new column code now uses this function too.
403
404         (WebCore::RenderBlock::availableLogicalWidth):
405         Renamed desiredColumnWidth() to computedColumnWidth().
406
407         (WebCore::RenderBlock::computeColumnCountAndWidth):
408         Renamed calcColumnWidth to computeColumnCountAndWidth.
409
410         (WebCore::RenderBlock::setComputedColumnCountAndWidth):
411         Rename setDesiredColumnCountAndWidth to computed.
412
413         (WebCore::RenderBlock::computedColumnWidth):
414         (WebCore::RenderBlock::computedColumnCount):
415         Renamed desiredColumnWidth/Count to computedColumnWidth/Count and made them virtual.
416
417         (WebCore::RenderBlock::updateFirstLetterStyle):
418         desired -> computed rename.
419
420         * rendering/RenderBlock.h:
421         Renames and made a few functions virtual so that RenderBlockFlow can override.
422
423         * rendering/RenderBlockFlow.cpp:
424         (WebCore::RenderBlockFlow::RenderBlockFlow):
425         Don't create the flow thread at construction time any longer.
426
427         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
428         (WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
429         The methods to create and destroy flow threads. These work at any time now and will
430         fix up the render tree accordingly.
431
432         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
433         Virtual override that creates/destroys the new multi-column information as needed.
434
435         (WebCore::RenderBlockFlow::computedColumnWidth):
436         (WebCore::RenderBlockFlow::computedColumnCount):
437         Overrides to return the cached column width and count from the flow thread.
438
439         * rendering/RenderBlockFlow.h:
440         Has overrides of the virtual functions needed to turn multi-column state on/off and
441         to hand back computed count/width information.
442
443         * rendering/RenderMultiColumnFlowThread.cpp:
444         * rendering/RenderMultiColumnFlowThread.h:
445         Removed the algorithm to compute column count and width, since this has been combined
446         with the old multi-column layout code.
447
448         * rendering/RenderView.cpp:
449         (WebCore::RenderView::computeColumnCountAndWidth):
450         Renamed desired -> computed.
451
452         * rendering/RenderView.h:
453         Renamed desired -> computed.
454
455         * style/StyleResolveTree.cpp:
456         (WebCore::Style::determineChange):
457         (WebCore::Style::resolveLocal):
458         (WebCore::Style::resolveTree):
459         * style/StyleResolveTree.h:
460         The Settings argument is no longer needed now that we don't destroy and re-create
461         the renderer for a block flow if it stops being (or becomes) multi-column.
462
463 2014-01-24  Anders Carlsson  <andersca@apple.com>
464
465         Fix 32-bit build.
466
467         * WebCore.exp.in:
468
469 2014-01-24  Brent Fulgham  <bfulgham@apple.com>
470
471         [Win] Convert some NMake files to MSBuild project files
472         https://bugs.webkit.org/show_bug.cgi?id=127579
473
474         Reviewed by Tim Horton.
475
476         * WebCore.vcxproj/WebCore.make: Removed.
477         * WebCore.vcxproj/WebCore.proj: Added.
478
479 2014-01-24  Joseph Pecoraro  <pecoraro@apple.com>
480
481         fast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
482         https://bugs.webkit.org/show_bug.cgi?id=127566
483
484         Reviewed by Oliver Hunt.
485
486         Covered by existing tests.
487
488         * testing/Internals.cpp:
489         (WebCore::Internals::closeDummyInspectorFrontend):
490         Now that we don't have to fake that this is a page being destroyed to
491         avoid recompilation. Use the InspectorDestroyed reason.
492
493 2014-01-24  Anders Carlsson  <andersca@apple.com>
494
495         Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
496         https://bugs.webkit.org/show_bug.cgi?id=127571
497
498         Reviewed by Antti Koivisto.
499
500         WebCore.exp.in:
501         Update symbols.
502
503         * dom/Document.cpp:
504         (WebCore::Document::Document):
505         (WebCore::Document::implicitClose):
506         (WebCore::Document::setParsing):
507         (WebCore::Document::isLayoutTimerActive):
508         (WebCore::Document::minimumLayoutDelay):
509         (WebCore::Document::elapsedTime):
510         (WebCore::Document::write):
511         (WebCore::Document::styleResolverChanged):
512         * dom/Document.h:
513         Use std::chrono instead of doubles for the times and durations.
514
515         * fileapi/FileReader.cpp:
516         (WebCore::FileReader::FileReader):
517         (WebCore::FileReader::didReceiveData):
518         * fileapi/FileReader.h:
519         Switch over to std::chrono.
520
521         * page/FrameView.cpp:
522         (WebCore::FrameView::layout):
523         (WebCore::FrameView::layoutTimerFired):
524         (WebCore::FrameView::scheduleRelayout):
525         (WebCore::FrameView::scheduleRelayoutOfSubtree):
526         Update for Document::elapsedTime() changes.
527
528         * page/Settings.cpp:
529         (WebCore::Settings::setLayoutInterval):
530         * page/Settings.h:
531         (WebCore::Settings::layoutInterval):
532         Change layoutInterval to be std::chrono::milliseconds instead of int.
533
534         * platform/Timer.h:
535         (WebCore::TimerBase::startOneShot):
536         Add an overload that takes std::chrono::milliseconds.
537
538 2014-01-24  Oliver Hunt  <oliver@apple.com>
539
540         Generic JSObject::put should handle static properties in the classinfo hierarchy
541         https://bugs.webkit.org/show_bug.cgi?id=127523
542
543         Reviewed by Geoffrey Garen.
544
545         Update the bindings generator to emit the flag indicating the presence
546         of setters, and remove the many (now unnecessary) put overrides.
547         Tested with run-jsc-benchmarks and shows neutral performance. A few of the
548         micro benchmarks actually get a significant performance increase which
549         is nice.
550
551         * bindings/js/JSDOMWindowCustom.cpp:
552         (WebCore::JSDOMWindow::put):
553             We still need a custom call to lookupPut here in order
554             to get the magic security semantics of the window object.
555         * bindings/scripts/CodeGeneratorJS.pm:
556         (hashTableAccessor):
557         (prototypeHashTableAccessor):
558         (constructorHashTableAccessor):
559         (GenerateImplementation):
560         (GenerateHashTable):
561         (GenerateConstructorHelperMethods):
562
563         * bindings/js/JSDOMWindowCustom.cpp:
564         (WebCore::JSDOMWindow::put):
565         * bindings/scripts/CodeGeneratorJS.pm:
566         (hashTableAccessor):
567         (prototypeHashTableAccessor):
568         (constructorHashTableAccessor):
569         (InstanceOverridesPutImplementation):
570         (InstanceOverridesPutDeclaration):
571         (GenerateHeader):
572         (GenerateImplementation):
573         (GenerateHashTable):
574         (GenerateConstructorHelperMethods):
575         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
576         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
577         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
578         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
579         * bindings/scripts/test/JS/JSTestException.cpp:
580         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
581         * bindings/scripts/test/JS/JSTestInterface.cpp:
582         (WebCore::JSTestInterface::put):
583         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
584         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
585         * bindings/scripts/test/JS/JSTestNode.cpp:
586         * bindings/scripts/test/JS/JSTestObj.cpp:
587         * bindings/scripts/test/JS/JSTestObj.h:
588         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
589         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
590         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
591         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
592         * bindings/scripts/test/JS/JSTestTypedefs.h:
593         * bindings/scripts/test/JS/JSattribute.cpp:
594         * bindings/scripts/test/JS/JSreadonly.cpp:
595         * html/canvas/WebGLRenderingContext.idl:
596           Remove bogus attribute, as it has never been in the spec and should not
597           have been added.
598
599 2014-01-24  David Hyatt  <hyatt@apple.com>
600
601         [New Multicolumn] Eliminate RenderMultiColumnBlock
602         https://bugs.webkit.org/show_bug.cgi?id=127565
603
604         Reviewed by Antti Koivisto.
605
606         This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
607         back into RenderBlockFlow. This allows all block flows to support multi-column
608         layout, including table cells, list items, and the RenderView itself.
609
610         * CMakeLists.txt:
611         * WebCore.order:
612         * WebCore.vcxproj/WebCore.vcxproj:
613         * WebCore.vcxproj/WebCore.vcxproj.filters:
614         * WebCore.xcodeproj/project.pbxproj:
615         Remove RenderMultiColumnBlock from the makefiles.
616
617         * rendering/RenderBlock.cpp:
618         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
619         Tweak the comment, since it was no longer accurate.
620
621         * rendering/RenderBlock.h:
622         Move some functions down into RenderBlockFlow.
623
624         * rendering/RenderBlockFlow.cpp:
625         (WebCore::RenderBlockFlow::RenderBlockFlow):
626         (WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
627         (WebCore::RenderBlockFlow::styleDidChange):
628         (WebCore::RenderBlockFlow::relayoutForPagination):
629         (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
630         (WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
631         (WebCore::RenderBlockFlow::addChild):
632         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
633          * rendering/RenderBlockFlow.h:
634          Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.
635
636         * rendering/RenderBox.cpp:
637         (WebCore::RenderBox::isUnsplittableForPagination):
638         Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.
639
640         * rendering/RenderElement.cpp:
641         (WebCore::RenderElement::createFor):
642         Remove the multicolumn block creation code, since we always make a block flow now.
643
644         * rendering/RenderMultiColumnBlock.cpp: Removed.
645         * rendering/RenderMultiColumnBlock.h: Removed.
646         Nuke the files.
647
648         * rendering/RenderMultiColumnFlowThread.cpp:
649         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
650         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
651         * rendering/RenderMultiColumnSet.cpp:
652         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
653         (WebCore::RenderMultiColumnSet::addForcedBreak):
654         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
655         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
656         (WebCore::RenderMultiColumnSet::prepareForLayout):
657         (WebCore::RenderMultiColumnSet::columnGap):
658         (WebCore::RenderMultiColumnSet::paintColumnRules):
659         Change all of the functions in the multicolumnset and multicolumnflowthread classes
660         to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
661         Change the code to call through to multiColumnFlowThread() for column-specific information
662         for that parent block.
663
664         * rendering/RenderObject.h:
665         (WebCore::RenderObject::isMultiColumnBlockFlow):
666         Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().
667
668         * rendering/RenderingAllInOne.cpp:
669         Remove RenderMultiColumnBlock include.
670         
671 2014-01-24  Brady Eidson  <beidson@apple.com>
672
673         IDB: support createIndex/deleteIndex messaging
674         https://bugs.webkit.org/show_bug.cgi?id=127546
675
676         Reviewed by Tim Horton.
677
678         * WebCore.exp.in: Export a needed CrossThreadCopier
679
680 2014-01-24  Daniel Bates  <dabates@apple.com>
681
682         Fix the Windows build after <http://trac.webkit.org/changeset/162704>
683         (https://bugs.webkit.org/show_bug.cgi?id=127293)
684
685         Only include TargetConditionals.h when building on a Darwin-based OS.
686         Also, check that TARGET_OS_IPHONE is defined before referencing its value
687         since it will be undefined when building on Windows.
688
689         * bindings/objc/PublicDOMInterfaces.h:
690
691 2014-01-24  Daniel Bates  <dabates@apple.com>
692
693         Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
694         https://bugs.webkit.org/show_bug.cgi?id=127293
695
696         Reviewed by Alexey Proskuryakov.
697
698         Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
699         in the public SDK.
700
701         As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.
702
703         * bindings/objc/PublicDOMInterfaces.h:
704
705 2014-01-21  David Hyatt  <hyatt@apple.com>
706
707         [New Multicolumn] Table cells and list items need to work as multicolumn blocks.
708         https://bugs.webkit.org/show_bug.cgi?id=127365
709         
710         This patch is a first step towards eliminating RenderMultiColumnBlock and moving
711         all its functionality into RenderBlockFlow. Doing so will allow table cells, list
712         items and the RenderView to use the new multi-column layout.
713         
714         Reviewed by Simon Fraser.
715
716         * rendering/RenderBlockFlow.cpp:
717         (WebCore::RenderBlockFlow::setMultiColumnFlowThread):
718         * rendering/RenderBlockFlow.h:
719         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
720         (WebCore::RenderBlockFlow::multiColumnFlowThread):
721         Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
722         rare data. This lets us use only one pointer in the rare data to point to an object
723         that can hold all of the rest of the multi-column info.
724
725         * rendering/RenderMultiColumnBlock.cpp:
726         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
727         Move the construction of the flow thread to the constructor. This ensures we
728         never have a null flow thread and lets us avoid having to null check it for
729         empty multi-column blocks.
730
731         (WebCore::RenderMultiColumnBlock::columnHeightAvailable):
732         (WebCore::RenderMultiColumnBlock::columnWidth):
733         (WebCore::RenderMultiColumnBlock::columnCount):
734         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
735         The above functions now call through to the multi-column flow thread for results.
736
737         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
738          Set the column height available on the flow thread.
739
740         (WebCore::RenderMultiColumnBlock::relayoutForPagination):
741         The balancing pass and guard is in the multi-column flow thread now.
742
743         (WebCore::RenderMultiColumnBlock::addChild):
744         Don't have to create the flow thread here any longer, since we do it up front
745         in the constructor of RenderMultiColumnBlock.
746
747         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
748         Don't need the null check of the flow thread any more.
749
750         * rendering/RenderMultiColumnBlock.h:
751         Change the inlined functions to not be inlined, since they need to call
752         RenderMultiColumnFlowThread functions now.
753
754         * rendering/RenderMultiColumnFlowThread.cpp:
755         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
756         Init the new member variables we moved here from RenderMultiColumnBlock.
757
758         (WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
759         Moved from RenderMultiColumnBlock.
760
761         * rendering/RenderMultiColumnFlowThread.h:
762         Add public getters/setters to the member variables so that RenderMultiColumnBlock can
763         still see them. Move the member variables here from RenderMultiColumnBlock.
764
765         * rendering/RenderMultiColumnSet.cpp:
766         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
767         (WebCore::RenderMultiColumnSet::prepareForLayout):
768         (WebCore::RenderMultiColumnSet::columnCount):
769         Call through to the flow thread instead.
770
771 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
772
773         Unreviewed GTK build fix after r162663.
774
775         * platform/gtk/ScrollViewGtk.cpp:
776         (WebCore::ScrollView::visibleContentRectInternal): Renamed from visibleContentRect.
777
778 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
779
780         Move HistoryItem to std::unique_ptr
781         https://bugs.webkit.org/show_bug.cgi?id=127275
782
783         Reviewed by Darin Adler.
784
785         Replace the uses of OwnPtr and PassOwnPtr in the HistoryItem class with std::unique_ptr.
786
787         * history/HistoryItem.cpp:
788         (WebCore::HistoryItem::HistoryItem):
789         (WebCore::HistoryItem::reset):
790         (WebCore::HistoryItem::addRedirectURL):
791         (WebCore::HistoryItem::setRedirectURLs):
792         * history/HistoryItem.h:
793         * history/mac/HistoryItemMac.mm:
794         (WebCore::HistoryItem::setTransientProperty):
795         WebCore.exp.in: Update the symbol.
796
797 2014-01-23  Morten Stenshorne  <mstensho@opera.com>
798
799         Region based multicol: unresolvable percent height results in 1px tall multicol
800         https://bugs.webkit.org/show_bug.cgi?id=122826
801
802         Reviewed by David Hyatt.
803
804         If a box has a percentage height, but the computed height of its
805         containing block is auto, the computed height of the box also becomes
806         auto. computeContentLogicalHeight() returns -1 if the height isn't
807         resolvable, and we need to make sure that such a value doesn't
808         constrain the height of the multicol container.
809
810         Tests: fast/multicol/newmulticol/unresolvable-percent-height-2.html
811                fast/multicol/newmulticol/unresolvable-percent-height.html
812                fast/multicol/newmulticol/unresolvable-percent-max-height-2.html
813                fast/multicol/newmulticol/unresolvable-percent-max-height.html
814
815         * rendering/RenderMultiColumnSet.cpp:
816         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
817         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
818         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
819         (WebCore::RenderMultiColumnSet::prepareForLayout):
820
821 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
822
823         Move ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCore for inspector
824         https://bugs.webkit.org/show_bug.cgi?id=127537
825
826         Reviewed by Timothy Hatcher.
827
828           - Rename ContentSearchUtils => ContentSearchUtilities and move to JavaScriptCore.
829           - Move ScriptBreakpoint and ScriptDebugListener to JavaScriptCore.
830           - Move them all to namespace Inspector.
831           - Update build files and users to the new names.
832
833         No change in functionality, just moving code.
834
835         * CMakeLists.txt:
836         * ForwardingHeaders/inspector/ContentSearchUtilities.h: Added.
837         * ForwardingHeaders/inspector/ScriptBreakpoint.h: Added.
838         * ForwardingHeaders/inspector/ScriptDebugListener.h: Added.
839         * GNUmakefile.list.am:
840         * WebCore.vcxproj/WebCore.vcxproj:
841         * WebCore.vcxproj/WebCore.vcxproj.filters:
842         * WebCore.xcodeproj/project.pbxproj:
843         * bindings/js/PageScriptDebugServer.cpp:
844         * bindings/js/PageScriptDebugServer.h:
845         * bindings/js/ScriptDebugServer.cpp:
846         * bindings/js/ScriptDebugServer.h:
847         * bindings/js/WorkerScriptDebugServer.cpp:
848         * bindings/js/WorkerScriptDebugServer.h:
849         * inspector/InspectorAllInOne.cpp:
850         * inspector/InspectorDebuggerAgent.cpp:
851         (WebCore::InspectorDebuggerAgent::searchInContent):
852         (WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
853         (WebCore::InspectorDebuggerAgent::didParseSource):
854         * inspector/InspectorDebuggerAgent.h:
855         * inspector/InspectorPageAgent.cpp:
856         (WebCore::InspectorPageAgent::sourceMapURLForResource):
857         (WebCore::InspectorPageAgent::searchInResource):
858         (WebCore::InspectorPageAgent::searchInResources):
859         * inspector/InspectorStyleSheet.cpp:
860         (WebCore::buildSourceRangeObject):
861         (WebCore::InspectorStyleSheet::lineEndings):
862         (WebCore::InspectorStyleSheetForInlineStyle::lineEndings):
863
864 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
865
866         Move RegularExpression into JavaScriptCore for inspector
867         https://bugs.webkit.org/show_bug.cgi?id=127526
868
869         Reviewed by Geoffrey Garen.
870
871         Update as appropriate for the moved file and namespace
872         change for class RegularExpression.
873
874         * CMakeLists.txt:
875         * ForwardingHeaders/yarr/RegularExpression.h: Added.
876         * GNUmakefile.list.am:
877         * WebCore.exp.in:
878         * WebCore.vcxproj/WebCore.vcxproj:
879         * WebCore.vcxproj/WebCore.vcxproj.filters:
880         * WebCore.xcodeproj/project.pbxproj:
881         * dom/DOMImplementation.h:
882         * html/BaseCheckableInputType.cpp:
883         * html/BaseTextInputType.cpp:
884         (WebCore::BaseTextInputType::patternMismatch):
885         * html/EmailInputType.cpp:
886         (WebCore::isValidEmailAddress):
887         * html/InputType.cpp:
888         * inspector/ContentSearchUtils.cpp:
889         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
890         (WebCore::ContentSearchUtils::createSearchRegex):
891         (WebCore::ContentSearchUtils::countRegularExpressionMatches):
892         (WebCore::ContentSearchUtils::searchInTextByLines):
893         * inspector/ContentSearchUtils.h:
894         * inspector/InspectorDebuggerAgent.cpp:
895         (WebCore::matches):
896         (WebCore::InspectorDebuggerAgent::breakpointActionLog):
897         (WebCore::InspectorDebuggerAgent::breakpointActionSound):
898         * inspector/InspectorDebuggerAgent.h:
899         * inspector/InspectorPageAgent.cpp:
900         (WebCore::InspectorPageAgent::searchInResources):
901         * inspector/InspectorPageAgent.h:
902         * inspector/InspectorRuntimeAgent.cpp:
903         * inspector/InspectorRuntimeAgent.h:
904         * inspector/InspectorStyleSheet.cpp:
905         (WebCore::selectorsFromSource):
906         * inspector/WorkerDebuggerAgent.cpp:
907         * page/Frame.cpp:
908         (WebCore::createRegExpForLabels):
909         (WebCore::Frame::searchForLabelsAboveCell):
910         (WebCore::Frame::searchForLabelsBeforeElement):
911         (WebCore::matchLabelsAgainstString):
912         * page/Frame.h:
913         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
914         (WebCore::GraphicsContext3D::getUnmangledInfoLog):
915
916 2014-01-23  Brady Eidson  <beidson@apple.com>
917
918         IDB: Support IDBObjectStore.clear()
919         https://bugs.webkit.org/show_bug.cgi?id=127541
920         
921         Reviewed by Anders Carlsson.
922
923         The backing store should never be performing callbacks directly:
924         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
925         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
926
927         Instead, the transaction operations should do that themselves:
928         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
929         (WebCore::ClearObjectStoreOperation::perform):
930         * Modules/indexeddb/IDBTransactionBackendOperations.h:
931         (WebCore::ClearObjectStoreOperation::transaction):
932
933 2014-01-23  Dan Bernstein  <mitz@apple.com>
934
935         <rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be reached) in CSSPreloadScanner::tokenize()
936         https://bugs.webkit.org/show_bug.cgi?id=127540
937
938         Reviewed by Anders Carlsson.
939
940         No new tests, because I could not reproduce the bug reliably and I don’t know how to trigger
941         it.
942
943         * html/parser/CSSPreloadScanner.cpp:
944         (WebCore::CSSPreloadScanner::scan): Check for the DoneParsingImportRules before tokenizing
945         a character, not after. This restores the logic from before r162257.
946
947 2014-01-23  Jer Noble  <jer.noble@apple.com>
948
949         [iOS] Protect against possbile deadlock by delaying video layer creation
950         https://bugs.webkit.org/show_bug.cgi?id=127505
951
952         Reviewed by Eric Carlson.
953
954         Work around a possible deadlock on iOS when creating a media element
955         backed by AVFoundation by delaying creation of the AVPlayerLayer.
956         The deadlock can occur when the web thread is doing CALayer layout
957         while taking the web thread lock, while CoreMedia is doing property
958         access on an async thread while taking the CM lock, and each is waiting
959         for the other's lock to be released.
960
961         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
962         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
963
964 2014-01-23  Jer Noble  <jer.noble@apple.com>
965
966         [MSE][Mac] Crash when reloading a page during playback
967         https://bugs.webkit.org/show_bug.cgi?id=126903
968
969         Reviewed by Eric Carlson.
970
971         Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
972         callback block even after being removed with -removeTimeObserver:, which is tracked by
973         <rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
974         and bail early if the owning media player has been destroyed.
975
976         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
977         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
978         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
979         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
980
981 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
982
983         Dragging from inner side of video to outside causes a crash
984         https://bugs.webkit.org/show_bug.cgi?id=126338
985
986         Reviewed by Jer Noble.
987
988         The crash happens while dragging mouse cursor through timeline control to outside
989         of video region. This is beacause media controls are selected with the drag.
990         The media controls disappear when mouse cursor goes outside of video though
991         the dragging/selection proceeds. If once media controls are hidden, related element
992         lose their renderers. However the drag is still under going. it requires shadowPseudoId
993         of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
994         don't return a static value for the shadowPseudoId unlike other media controls,
995         but they need a renderer to determine it. This is the reason of crash.
996
997         Test: media/media-controller-drag-crash.html
998
999         * html/shadow/SliderThumbElement.cpp:
1000         (WebCore::SliderThumbElement::shadowPseudoId):
1001         (WebCore::SliderContainerElement::shadowPseudoId):
1002
1003 2014-01-23  Brady Eidson  <beidson@apple.com>
1004
1005         IDB: Implement SQLite backing store 'get' support
1006         https://bugs.webkit.org/show_bug.cgi?id=127502
1007
1008         Reviewed by Tim Horton.
1009
1010         Get a KeyRange from a KeyRangeData:
1011         * Modules/indexeddb/IDBKeyRangeData.cpp:
1012         (WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
1013         * Modules/indexeddb/IDBKeyRangeData.h:
1014
1015         Add collation function support to SQLiteDatabase:
1016         * platform/sql/SQLiteDatabase.cpp:
1017         (WebCore::destroyCollationFunction):
1018         (WebCore::callCollationFunction):
1019         (WebCore::SQLiteDatabase::setCollationFunction):
1020         (WebCore::SQLiteDatabase::removeCollationFunction):
1021         * platform/sql/SQLiteDatabase.h:
1022
1023         * WebCore.exp.in:
1024
1025 2014-01-23  Jon Honeycutt  <jhoneycutt@apple.com>
1026
1027         Assertion failure in WebCore::PseudoElement::didRecalcStyle()
1028         <https://bugs.webkit.org/show_bug.cgi?id=126761>
1029         <rdar://problem/15793540>
1030
1031         Reviewed by Andy Estes.
1032
1033         Test: fast/images/animate-list-item-image-assertion.html
1034
1035         * dom/PseudoElement.cpp:
1036         (WebCore::PseudoElement::didRecalcStyle):
1037         Check isRenderImage() rather than isImage() before casting to
1038         RenderImage.
1039
1040         * editing/ios/EditorIOS.mm:
1041         (WebCore::getImage):
1042         Ditto.
1043
1044         * editing/mac/EditorMac.mm:
1045         (WebCore::getImage):
1046         Ditto.
1047
1048         * html/HTMLImageElement.cpp:
1049         (WebCore::HTMLImageElement::parseAttribute):
1050         (WebCore::HTMLImageElement::didAttachRenderers):
1051         Ditto.
1052
1053         * loader/ImageLoader.cpp:
1054         (WebCore::ImageLoader::renderImageResource):
1055         Ditto.
1056
1057         * page/DragController.cpp:
1058         (WebCore::getCachedImage):
1059         Ditto.
1060
1061         * rendering/RenderLayerBacking.cpp:
1062         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1063         (WebCore::RenderLayerBacking::updateImageContents):
1064         Ditto.
1065
1066 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1067
1068         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
1069         https://bugs.webkit.org/show_bug.cgi?id=127409
1070
1071         Reviewed by Geoffrey Garen.
1072
1073         Covered by existing tests.
1074
1075         * bindings/js/ScriptDebugServer.h:
1076         * bindings/js/ScriptDebugServer.cpp:
1077         (WebCore::ScriptDebugServer::ScriptDebugServer):
1078         Remove m_recompileTimer and the recompile soon function.
1079         We can just recompile immediately in all existing cases.
1080
1081         * bindings/js/PageScriptDebugServer.h:
1082         * bindings/js/PageScriptDebugServer.cpp:
1083         (WebCore::PageScriptDebugServer::addListener):
1084         (WebCore::PageScriptDebugServer::removeListener):
1085         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1086         (WebCore::PageScriptDebugServer::didAddFirstListener):
1087         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1088         Add a "didAddFirstListener" to match "didRemoveLastListener".
1089         Only recompile functions when we attach the debugger and when
1090         we detach the last listener.
1091
1092         * bindings/js/WorkerScriptDebugServer.cpp:
1093         (WebCore::WorkerScriptDebugServer::addListener):
1094         (WebCore::WorkerScriptDebugServer::removeListener):
1095         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1096         Same thing. Also rearrange the functions to read better.
1097
1098         * inspector/InspectorProfilerAgent.cpp:
1099         Use the direct recompile function instead of the removed "soon" version.
1100
1101         * WebCore.exp.in:
1102         Update disconnectFrontend symbol.
1103
1104         * page/PageDebuggable.cpp:
1105         (WebCore::PageDebuggable::disconnect):
1106         * testing/Internals.cpp:
1107         (WebCore::Internals::closeDummyInspectorFrontend):
1108         * workers/WorkerMessagingProxy.cpp:
1109         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
1110         Include an InspectorDisconnectReason when calling disconnectFrontend.
1111
1112         * inspector/InspectorDatabaseAgent.h:
1113         * inspector/InspectorDebuggerAgent.cpp:
1114         (WebCore::InspectorDebuggerAgent::disable):
1115         (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
1116         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
1117
1118         * inspector/InspectorProfilerAgent.h:
1119         * inspector/InspectorProfilerAgent.cpp:
1120         (WebCore::InspectorProfilerAgent::enable):
1121         (WebCore::InspectorProfilerAgent::disable):
1122         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
1123         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
1124
1125         * inspector/InspectorController.h:
1126         * inspector/InspectorController.cpp:
1127         (WebCore::InspectorController::inspectedPageDestroyed):
1128         (WebCore::InspectorController::disconnectFrontend):
1129         (WebCore::InspectorController::close):
1130         Pass different reasons for the different disconnect reasons.
1131
1132         * inspector/WorkerInspectorController.h:
1133         * inspector/WorkerInspectorController.cpp:
1134         (WebCore::WorkerInspectorController::~WorkerInspectorController):
1135         (WebCore::WorkerInspectorController::disconnectFrontend):
1136         Pass different reasons for the different disconnect reasons.
1137
1138         * inspector/InspectorApplicationCacheAgent.cpp:
1139         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
1140         * inspector/InspectorApplicationCacheAgent.h:
1141         * inspector/InspectorCSSAgent.cpp:
1142         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
1143         * inspector/InspectorCSSAgent.h:
1144         * inspector/InspectorCanvasAgent.cpp:
1145         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
1146         * inspector/InspectorCanvasAgent.h:
1147         * inspector/InspectorConsoleAgent.cpp:
1148         (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
1149         * inspector/InspectorConsoleAgent.h:
1150         * inspector/InspectorDOMAgent.cpp:
1151         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
1152         * inspector/InspectorDOMAgent.h:
1153         * inspector/InspectorDOMDebuggerAgent.cpp:
1154         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
1155         * inspector/InspectorDOMDebuggerAgent.h:
1156         * inspector/InspectorDOMStorageAgent.cpp:
1157         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
1158         * inspector/InspectorDOMStorageAgent.h:
1159         * inspector/InspectorDatabaseAgent.cpp:
1160         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
1161         * inspector/InspectorDebuggerAgent.h:
1162         * inspector/InspectorHeapProfilerAgent.cpp:
1163         (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
1164         * inspector/InspectorHeapProfilerAgent.h:
1165         * inspector/InspectorIndexedDBAgent.cpp:
1166         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
1167         * inspector/InspectorIndexedDBAgent.h:
1168         * inspector/InspectorInputAgent.cpp:
1169         (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
1170         * inspector/InspectorInputAgent.h:
1171         * inspector/InspectorLayerTreeAgent.cpp:
1172         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
1173         * inspector/InspectorLayerTreeAgent.h:
1174         * inspector/InspectorMemoryAgent.cpp:
1175         (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
1176         * inspector/InspectorMemoryAgent.h:
1177         * inspector/InspectorPageAgent.cpp:
1178         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
1179         * inspector/InspectorPageAgent.h:
1180         * inspector/InspectorResourceAgent.cpp:
1181         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
1182         * inspector/InspectorResourceAgent.h:
1183         * inspector/InspectorTimelineAgent.cpp:
1184         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1185         * inspector/InspectorTimelineAgent.h:
1186         * inspector/InspectorWorkerAgent.cpp:
1187         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
1188         * inspector/InspectorWorkerAgent.h:
1189         * inspector/PageDebuggerAgent.cpp:
1190         (WebCore::PageDebuggerAgent::disable):
1191         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1192         * inspector/PageDebuggerAgent.h:
1193         * inspector/PageRuntimeAgent.cpp:
1194         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
1195         * inspector/PageRuntimeAgent.h:
1196         * inspector/WorkerDebuggerAgent.cpp:
1197         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
1198         * inspector/WorkerDebuggerAgent.h:
1199         * inspector/WorkerRuntimeAgent.cpp:
1200         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
1201         * inspector/WorkerRuntimeAgent.h:
1202         Include InspectorDisconnectReason param.
1203
1204 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1205
1206         Another Windows fix: include <algorithm> for std::min and std::max.
1207         
1208         * platform/graphics/IntSize.h:
1209
1210 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1211
1212         Try to fix Windows build.
1213
1214         * platform/win/PopupMenuWin.cpp:
1215         (WebCore::PopupMenuWin::visibleSize):
1216         * platform/win/PopupMenuWin.h:
1217
1218 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1219
1220         Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
1221         https://bugs.webkit.org/show_bug.cgi?id=127456
1222         
1223         Reviewed by Antti Koivisto.
1224         
1225         On iOS, visibleContentRect() returns the entire document rect for historical
1226         reasons, and actualVisibleContentRect() returns what visibleContentRect()
1227         returns on other platforms.
1228         
1229         In addition, actualVisibleContentRect() was returning an empty rect in WK2.
1230         
1231         Reduce the confusion of #ifdefs by making visibleContentRect() behave like
1232         actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
1233         an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
1234         
1235         Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
1236         which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
1237         
1238         Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
1239         with non-virtual visibleHeight() and visibleWidth().
1240         
1241         ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
1242         
1243         Mechanically change all the call sites of actualVisibleContentRect() to
1244         use visibleContentRect(), and the call sites of visibleContentRect()
1245         to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
1246         where this may not be appropriate.
1247         
1248         Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
1249         
1250         Also add actualScrollPosition(), and clean up some actualScroll* call sites.
1251         
1252         No behavior change.
1253
1254         * WebCore.exp.in:
1255         * accessibility/AccessibilityObject.cpp:
1256         (WebCore::AccessibilityObject::isOnscreen):
1257         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
1258         * accessibility/AccessibilityRenderObject.cpp:
1259         (WebCore::AccessibilityRenderObject::isOffScreen):
1260         * dom/Document.cpp:
1261         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
1262         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
1263         * dom/MouseRelatedEvent.cpp:
1264         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1265         * editing/Editor.cpp:
1266         (WebCore::Editor::countMatchesForText):
1267         * editing/FrameSelection.cpp:
1268         (WebCore::FrameSelection::bounds):
1269         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
1270         * html/HTMLBodyElement.cpp:
1271         (WebCore::HTMLBodyElement::scrollLeft):
1272         (WebCore::HTMLBodyElement::scrollTop):
1273         * html/ImageDocument.cpp:
1274         (WebCore::ImageDocument::imageFitsInWindow):
1275         (WebCore::ImageDocument::windowSizeChanged):
1276         * inspector/InspectorOverlay.cpp:
1277         (WebCore::InspectorOverlay::update):
1278         * page/DOMWindow.cpp:
1279         (WebCore::DOMWindow::innerHeight):
1280         (WebCore::DOMWindow::innerWidth):
1281         (WebCore::DOMWindow::scrollX):
1282         (WebCore::DOMWindow::scrollY):
1283         (WebCore::DOMWindow::scrollBy):
1284         * page/FrameView.cpp:
1285         (WebCore::FrameView::calculateScrollbarModesForLayout):
1286         (WebCore::FrameView::layout):
1287         (WebCore::FrameView::scrollContentsSlowPath):
1288         (WebCore::FrameView::repaintContentRectangle):
1289         (WebCore::FrameView::sendResizeEventIfNeeded):
1290         (WebCore::FrameView::windowClipRect):
1291         (WebCore::FrameView::isScrollable):
1292         (WebCore::FrameView::paintControlTints):
1293         * page/SpatialNavigation.cpp:
1294         (WebCore::canScrollInDirection):
1295         * platform/ScrollView.cpp:
1296         (WebCore::ScrollView::unscaledVisibleContentSize):
1297         (WebCore::ScrollView::visibleContentRectInternal):
1298         (WebCore::ScrollView::updateScrollbars):
1299         (WebCore::ScrollView::paint):
1300         * platform/ScrollView.h:
1301         (WebCore::ScrollView::scrollOffset):
1302         (WebCore::ScrollView::actualScrollX):
1303         (WebCore::ScrollView::actualScrollY):
1304         (WebCore::ScrollView::actualScrollPosition):
1305         * platform/ScrollableArea.cpp:
1306         (WebCore::ScrollableArea::visibleContentRect):
1307         (WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
1308         (WebCore::ScrollableArea::visibleContentRectInternal):
1309         * platform/ScrollableArea.h:
1310         (WebCore::ScrollableArea::visibleWidth):
1311         (WebCore::ScrollableArea::visibleHeight):
1312         * platform/graphics/IntSize.h:
1313         (WebCore::IntSize::expandedTo): Drive-by cleanup.
1314         (WebCore::IntSize::shrunkTo):
1315         * platform/gtk/ScrollViewGtk.cpp:
1316         (WebCore::ScrollView::visibleContentRect):
1317         * rendering/RenderLayer.cpp:
1318         (WebCore::RenderLayer::scrollRectToVisible):
1319         (WebCore::RenderLayer::maximumScrollPosition):
1320         (WebCore::RenderLayer::visibleContentRectInternal):
1321         (WebCore::RenderLayer::hitTest):
1322         * rendering/RenderLayer.h:
1323         * rendering/RenderLayerBacking.cpp:
1324         (WebCore::RenderLayerBacking::updateCompositedBounds):
1325         * rendering/RenderListBox.cpp:
1326         * rendering/RenderListBox.h:
1327         * rendering/RenderView.cpp:
1328         (WebCore::RenderView::viewRect):
1329         (WebCore::RenderView::viewportSize):
1330
1331 2014-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
1332
1333        Turn text-decoration-skip: ink on for all underlines
1334        https://bugs.webkit.org/show_bug.cgi?id=127331
1335
1336        Reviewed by Antti Koivisto.
1337
1338        No new tests are necessary because tests already exist
1339
1340        * rendering/style/RenderStyle.h:
1341
1342 2014-01-23  Hans Muller  <hmuller@adobe.com>
1343
1344         [CSS Shapes] Image valued shape size and position should conform to the spec
1345         https://bugs.webkit.org/show_bug.cgi?id=123295
1346
1347         Reviewed by Andreas Kling.
1348
1349         Implement image valued shape-outside scaling and translation per the spec,
1350         http://dev.w3.org/csswg/css-shapes/#shapes-from-image:
1351
1352         "The image is sized and positioned as if it were a replaced element whose
1353         specified width and height are the same as the element’s used content box size."
1354
1355         This change doesn't completely fulfill the spec, it's limited to image elements
1356         and shape-outside.
1357
1358         Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-001.html
1359                fast/shapes/shape-outside-floats/shape-outside-image-fit-002.html
1360                fast/shapes/shape-outside-floats/shape-outside-image-fit-003.html
1361                fast/shapes/shape-outside-floats/shape-outside-image-fit-004.html
1362
1363         * rendering/shapes/Shape.h:
1364         * rendering/shapes/Shape.cpp:
1365         (WebCore::Shape::createRasterShape):
1366         Added an imageRect parameter which specifies where the shape image is to
1367         appear relative to the content box. The imageRect implies both scaling and
1368         translation of the shape image.
1369
1370         * rendering/shapes/ShapeInfo.cpp:
1371         (WebCore::ShapeInfo<RenderType>::computedShape):
1372         (WebCore::getShapeImageRect):
1373         For replaced elements, compute the shape's imageRect with
1374         RenderReplaced::replacedContentRect().
1375
1376
1377 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
1378
1379         Remove CSS Custom Filters code and tests
1380         https://bugs.webkit.org/show_bug.cgi?id=127382
1381
1382         Reviewed by Simon Fraser.
1383
1384         No new tests. Removing functionality.
1385
1386         * CMakeLists.txt:
1387         * Configurations/FeatureDefines.xcconfig:
1388         * DerivedSources.cpp:
1389         * DerivedSources.make:
1390         * GNUmakefile.list.am:
1391         * WebCore.order:
1392         * WebCore.vcxproj/WebCore.vcxproj:
1393         * WebCore.vcxproj/WebCore.vcxproj.filters:
1394         * WebCore.xcodeproj/project.pbxproj:
1395         * bindings/js/JSCSSRuleCustom.cpp:
1396         (WebCore::toJS):
1397         * bindings/js/JSCSSValueCustom.cpp:
1398         (WebCore::toJS):
1399         * bindings/objc/DOMCSS.mm:
1400         (kitClass):
1401         * css/CSSComputedStyleDeclaration.cpp:
1402         (WebCore::ComputedStyleExtractor::valueForFilter):
1403         (WebCore::ComputedStyleExtractor::propertyValue):
1404         * css/CSSComputedStyleDeclaration.h:
1405         * css/CSSGrammar.y.in:
1406         * css/CSSParser.cpp:
1407         (WebCore::CSSParserContext::CSSParserContext):
1408         (WebCore::operator==):
1409         (WebCore::CSSParser::CSSParser):
1410         (WebCore::CSSParser::parseValue):
1411         (WebCore::filterInfoForName):
1412         (WebCore::CSSParser::parseFilter):
1413         (WebCore::CSSParser::detectAtToken):
1414         * css/CSSParser.h:
1415         * css/CSSParserMode.h:
1416         * css/CSSPropertyNames.in:
1417         * css/CSSPropertySourceData.h:
1418         * css/CSSRule.h:
1419         * css/CSSRule.idl:
1420         * css/CSSValue.cpp:
1421         (WebCore::CSSValue::equals):
1422         (WebCore::CSSValue::cssText):
1423         (WebCore::CSSValue::destroy):
1424         (WebCore::CSSValue::cloneForCSSOM):
1425         * css/CSSValue.h:
1426         * css/CSSValueKeywords.in:
1427         * css/StyleResolver.cpp:
1428         (WebCore::StyleResolver::State::clear):
1429         (WebCore::StyleResolver::applyProperty):
1430         (WebCore::filterOperationForType):
1431         (WebCore::StyleResolver::createFilterOperations):
1432         (WebCore::StyleResolver::loadPendingResources):
1433         * css/StyleResolver.h:
1434         (WebCore::StyleResolver::State::State):
1435         * css/StyleRule.cpp:
1436         (WebCore::StyleRuleBase::destroy):
1437         (WebCore::StyleRuleBase::copy):
1438         (WebCore::StyleRuleBase::createCSSOMWrapper):
1439         * css/StyleRule.h:
1440         * css/StyleSheetContents.cpp:
1441         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1442         * css/WebKitCSSArrayFunctionValue.cpp: Removed.
1443         * css/WebKitCSSArrayFunctionValue.h: Removed.
1444         * css/WebKitCSSFilterRule.cpp: Removed.
1445         * css/WebKitCSSFilterRule.h: Removed.
1446         * css/WebKitCSSFilterRule.idl: Removed.
1447         * css/WebKitCSSFilterValue.cpp:
1448         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
1449         (WebCore::WebKitCSSFilterValue::customCSSText):
1450         * css/WebKitCSSFilterValue.h:
1451         * css/WebKitCSSFilterValue.idl:
1452         * css/WebKitCSSMatFunctionValue.cpp: Removed.
1453         * css/WebKitCSSMatFunctionValue.h: Removed.
1454         * css/WebKitCSSMixFunctionValue.cpp: Removed.
1455         * css/WebKitCSSMixFunctionValue.h: Removed.
1456         * css/WebKitCSSMixFunctionValue.idl: Removed.
1457         * css/WebKitCSSShaderValue.cpp: Removed.
1458         * css/WebKitCSSShaderValue.h: Removed.
1459         * loader/cache/CachedResource.cpp:
1460         (WebCore::defaultPriorityForResourceType):
1461         * loader/cache/CachedResource.h:
1462         * loader/cache/CachedResourceLoader.cpp:
1463         (WebCore::createResource):
1464         (WebCore::CachedResourceLoader::checkInsecureContent):
1465         (WebCore::CachedResourceLoader::canRequest):
1466         * loader/cache/CachedResourceLoader.h:
1467         * loader/cache/CachedShader.cpp: Removed.
1468         * loader/cache/CachedShader.h: Removed.
1469         * page/Settings.cpp:
1470         (WebCore::Settings::Settings):
1471         * page/Settings.h:
1472         * page/animation/CSSPropertyAnimation.cpp:
1473         (WebCore::blendFilter):
1474         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1475         (PlatformCALayerMac::filtersCanBeComposited):
1476         * platform/graphics/filters/CustomFilterArrayParameter.h: Removed.
1477         * platform/graphics/filters/CustomFilterColorParameter.h: Removed.
1478         * platform/graphics/filters/CustomFilterCompiledProgram.cpp: Removed.
1479         * platform/graphics/filters/CustomFilterCompiledProgram.h: Removed.
1480         * platform/graphics/filters/CustomFilterConstants.h: Removed.
1481         * platform/graphics/filters/CustomFilterGlobalContext.cpp: Removed.
1482         * platform/graphics/filters/CustomFilterGlobalContext.h: Removed.
1483         * platform/graphics/filters/CustomFilterMesh.cpp: Removed.
1484         * platform/graphics/filters/CustomFilterMesh.h: Removed.
1485         * platform/graphics/filters/CustomFilterMeshGenerator.cpp: Removed.
1486         * platform/graphics/filters/CustomFilterMeshGenerator.h: Removed.
1487         * platform/graphics/filters/CustomFilterNumberParameter.h: Removed.
1488         * platform/graphics/filters/CustomFilterOperation.cpp: Removed.
1489         * platform/graphics/filters/CustomFilterOperation.h: Removed.
1490         * platform/graphics/filters/CustomFilterParameter.h: Removed.
1491         * platform/graphics/filters/CustomFilterParameterList.cpp: Removed.
1492         * platform/graphics/filters/CustomFilterParameterList.h: Removed.
1493         * platform/graphics/filters/CustomFilterProgram.cpp: Removed.
1494         * platform/graphics/filters/CustomFilterProgram.h: Removed.
1495         * platform/graphics/filters/CustomFilterProgramClient.h: Removed.
1496         * platform/graphics/filters/CustomFilterProgramInfo.cpp: Removed.
1497         * platform/graphics/filters/CustomFilterProgramInfo.h: Removed.
1498         * platform/graphics/filters/CustomFilterRenderer.cpp: Removed.
1499         * platform/graphics/filters/CustomFilterRenderer.h: Removed.
1500         * platform/graphics/filters/CustomFilterTransformParameter.h: Removed.
1501         * platform/graphics/filters/CustomFilterValidatedProgram.cpp: Removed.
1502         * platform/graphics/filters/CustomFilterValidatedProgram.h: Removed.
1503         * platform/graphics/filters/FECustomFilter.cpp: Removed.
1504         * platform/graphics/filters/FECustomFilter.h: Removed.
1505         * platform/graphics/filters/FilterOperation.h:
1506         * platform/graphics/filters/FilterOperations.cpp:
1507         (WebCore::FilterOperations::outsets):
1508         * platform/graphics/filters/FilterOperations.h:
1509         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
1510         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.
1511         * platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Removed.
1512         * platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Removed.
1513         * platform/graphics/gpu/Texture.cpp:
1514         * platform/graphics/texmap/TextureMapper.h:
1515         * platform/graphics/texmap/TextureMapperGL.cpp:
1516         (WebCore::getPassesRequiredForFilter):
1517         (WebCore::BitmapTextureGL::applyFilters):
1518         * platform/graphics/texmap/TextureMapperGL.h:
1519         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1520         (WebCore::CompositingCoordinator::clearPendingStateChanges):
1521         (WebCore::CompositingCoordinator::syncLayerState):
1522         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1523         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h: Removed.
1524         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h: Removed.
1525         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1526         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
1527         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1528         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
1529         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1530         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1531         * rendering/FilterEffectRenderer.cpp:
1532         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1533         (WebCore::FilterEffectRenderer::build):
1534         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1535         * rendering/FilterEffectRenderer.h:
1536         * rendering/RenderLayer.cpp:
1537         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1538         (WebCore::RenderLayer::calculateClipRects):
1539         * rendering/RenderLayer.h:
1540         * rendering/RenderLayerBacking.cpp:
1541         (WebCore::RenderLayerBacking::updateFilters):
1542         * rendering/RenderLayerFilterInfo.cpp:
1543         (WebCore::RenderLayer::FilterInfo::~FilterInfo):
1544         * rendering/RenderLayerFilterInfo.h:
1545         * rendering/RenderView.cpp:
1546         * rendering/RenderView.h:
1547         * rendering/style/StyleCachedShader.cpp: Removed.
1548         * rendering/style/StyleCachedShader.h: Removed.
1549         * rendering/style/StyleCustomFilterProgram.cpp: Removed.
1550         * rendering/style/StyleCustomFilterProgram.h: Removed.
1551         * rendering/style/StyleCustomFilterProgramCache.cpp: Removed.
1552         * rendering/style/StyleCustomFilterProgramCache.h: Removed.
1553         * rendering/style/StylePendingShader.h: Removed.
1554         * rendering/style/StyleShader.h: Removed.
1555
1556 2014-01-22  Jon Honeycutt  <jhoneycutt@apple.com>
1557
1558         REGRESSION(r161967): Crash in WebCore::CachedSVGDocumentReference::load
1559         <https://webkit.org/b/127151>
1560         <rdar://problem/15840760>
1561
1562         There were two issues introduced here; the first is a use-after-free of
1563         CachedSVGDocumentReference objects.
1564
1565         The previous code kept a map from FilterOperation ->
1566         RefPtr<WebKitCSSSVGDocumentValue>, which retained the
1567         CachedSVGDocument. In r161967, this was changed to use a weak HashSet,
1568         which allows stale CachedSVGDocumentReferences in the pending document
1569         set if the owning FilterOperation is deleted. To fix this, we'll keep a
1570         vector of RefPtr<FilterOperation> with pending SVG documents.
1571
1572         The second issue is a null deref in CachedSVGDocumentReference::load();
1573         CachedResourceLoader::requestSVGDocument() can return 0 if (for
1574         example) an invalid URL is passed. r161967 removed a null check as part
1575         of the refactoring.
1576
1577         Reviewed by Dirk Schulze.
1578
1579         Tests: css3/filters/crash-filter-animation-invalid-url.html
1580                css3/filters/crash-invalid-url.html
1581
1582         * css/StyleResolver.cpp:
1583         (WebCore::StyleResolver::State::clear):
1584         Use new member var name.
1585         (WebCore::StyleResolver::loadPendingSVGDocuments):
1586         For each FilterOperation with a pending SVG document, get or create a
1587         CachedSVGDocumentReference, and tell it to load. Changed to use new
1588         function names.
1589         (WebCore::StyleResolver::createFilterOperations):
1590         Append the FilterOperation to the list of FilterOperations with
1591         unloaded SVG documents.
1592
1593         * css/StyleResolver.h:
1594         Changed from using PendingSVGDocumentSet, a weak set, to
1595         a Vector<RefPtr<ReferenceFilterOperation>>.
1596         (WebCore::StyleResolver::State::filtersWithPendingSVGDocuments):
1597         Return the vector.
1598
1599         * loader/cache/CachedSVGDocumentReference.cpp:
1600         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
1601         Null check m_document rather than checking m_loadRequested.
1602         m_loadRequested may be true when m_document is 0.
1603         (WebCore::CachedSVGDocumentReference::load):
1604         Null check the result of CachedResourceLoader::requestSVGDocument().
1605
1606         * platform/graphics/filters/FilterOperation.cpp:
1607         (WebCore::ReferenceFilterOperation::getOrCreateCachedSVGDocumentReference):
1608         Create, if necessary, and return the CachedSVGDocumentReference.
1609
1610         * platform/graphics/filters/FilterOperation.h:
1611         Replaced createCachedSVGDocumentReference() with
1612         getOrCreateCachedSVGDocumentReference(), which makes for slightly
1613         cleaner code.
1614
1615 2014-01-23  Antti Koivisto  <antti@apple.com>
1616
1617         Don't enable speculative tiles immediately after main load stops progressing
1618         https://bugs.webkit.org/show_bug.cgi?id=127507
1619
1620         Reviewed by Andreas Kling.
1621
1622         It is common for timers and events to trigger more loading after the initial main frame loading
1623         has completed. We should delay a bit before enabling speculative tiles and keep them disabled 
1624         if loading still continues.
1625
1626         * page/FrameView.cpp:
1627         (WebCore::FrameView::FrameView):
1628         (WebCore::FrameView::adjustTiledBackingCoverage):
1629         (WebCore::shouldEnableSpeculativeTilingDuringLoading):
1630         (WebCore::FrameView::enableSpeculativeTilingIfNeeded):
1631         
1632             When load progression stops wait 0.5s before enabling speculative tiles.
1633
1634         (WebCore::FrameView::speculativeTilingEnableTimerFired):
1635         
1636             Don't enable speculative tiles if the progression has started again. Instead restart the timer.
1637
1638         * page/FrameView.h:
1639         * rendering/RenderLayerBacking.cpp:
1640         (WebCore::RenderLayerBacking::RenderLayerBacking):
1641         (WebCore::computeTileCoverage):
1642         
1643             Move the FrameView level code to FrameView (so we don't need to add a timer to every RenderLayerBacking).
1644
1645         * rendering/RenderLayerBacking.h:
1646
1647 2014-01-23  Antti Koivisto  <antti@apple.com>
1648
1649         Loads started soon after main frame completion should be considered part of the main load
1650         https://bugs.webkit.org/show_bug.cgi?id=127504
1651
1652         Reviewed by Andreas Kling.
1653
1654         ProgressTracker currently decides that main load is complete when the main frame stops loading. 
1655         However it is common that timers and onload events trigger more loads immediately (for example 
1656         by inserting iframes) and loading continues visually. These should be considered as part of the
1657         main load for paint throttling and speculative tiling coverage purposes.
1658
1659         * loader/ProgressTracker.cpp:
1660         (WebCore::ProgressTracker::ProgressTracker):
1661         (WebCore::ProgressTracker::progressStarted):
1662         
1663             Track whether this is considered part of the main load or not with a boolean. 
1664             It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes.
1665
1666         (WebCore::ProgressTracker::finalProgressComplete):
1667         
1668             Get a timestamp.
1669
1670         (WebCore::ProgressTracker::isMainLoadProgressing):
1671
1672             New definition of "main load".
1673
1674         * loader/ProgressTracker.h:
1675
1676 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
1677
1678         [WinCairo] Compile error.
1679         https://bugs.webkit.org/show_bug.cgi?id=127499
1680
1681         Reviewed by Brent Fulgham.
1682
1683         * platform/network/curl/ResourceError.h: Include <winsock2.h> before <curl/curl.h>.
1684
1685 2014-01-23  Brady Eidson  <beidson@apple.com>
1686
1687         IDB: Implement cross-thread and IPC plumbing for 'get' support
1688         https://bugs.webkit.org/show_bug.cgi?id=127501
1689
1690         Reviewed by Anders Carlsson.
1691
1692         Add isolatedCopy to the IDBGetResult object:
1693         * Modules/indexeddb/IDBGetResult.h:
1694         (WebCore::IDBGetResult::isolatedCopy):
1695
1696         Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
1697         * Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1698         (WebCore::IDBKeyRangeData::isolatedCopy):
1699         * Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1700         (WebCore::IDBKeyRangeData::IDBKeyRangeData):
1701
1702         Add a few more cross-thread copiers:
1703         * platform/CrossThreadCopier.cpp:
1704         (WebCore::IDBGetResult>::copy):
1705         (WebCore::IDBKeyRangeData>::copy):
1706         * platform/CrossThreadCopier.h:
1707
1708         Project file gunk:
1709         * CMakeLists.txt:
1710         * GNUmakefile.list.am:
1711         * WebCore.exp.in:
1712         * WebCore.xcodeproj/project.pbxproj:
1713
1714 2014-01-23  Jer Noble  <jer.noble@apple.com>
1715
1716         [MSE][Mac] Adopt new AVStreamDataParser delegate API
1717         https://bugs.webkit.org/show_bug.cgi?id=127498
1718
1719         Reviewed by Eric Carlson.
1720
1721         Adopt a new delegate API which passes in whether or not the new AVAsset
1722         is discontinuous, implying the AVAsset is entirely new rather than
1723         just updated with new information.
1724
1725         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1726         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
1727
1728 2014-01-23  Tim Horton  <timothy_horton@apple.com>
1729
1730         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
1731         https://bugs.webkit.org/show_bug.cgi?id=127415
1732         <rdar://problem/12482452>
1733
1734         Reviewed by Sam Weinig.
1735
1736         * English.lproj/Localizable.strings:
1737         * WebCore.exp.in:
1738         * platform/LocalizedStrings.cpp:
1739         (WebCore::useBlockedPlugInContextMenuTitle):
1740         * platform/LocalizedStrings.h:
1741         Add a localizable string for the generic case, where the client
1742         didn't provide a more specific string for the context menu item.
1743
1744 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
1745
1746         [Curl] There is no way to specify cache folder.
1747         https://bugs.webkit.org/show_bug.cgi?id=125028
1748
1749         Reviewed by Brent Fulgham.
1750
1751         Fixed logical test, disc cache should be disabled if creating cache folder fails.
1752
1753         * platform/network/curl/CurlCacheManager.cpp:
1754         (WebCore::CurlCacheManager::setCacheDirectory):
1755
1756 2014-01-23  Brady Eidson  <beidson@apple.com>
1757
1758         Unreviewed build fix.
1759
1760         * WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it
1761
1762 2014-01-22  Brent Fulgham  <bfulgham@apple.com>
1763
1764         [Win] Update project and solution files for 64-bit builds
1765         https://bugs.webkit.org/show_bug.cgi?id=127457
1766
1767         Reviewed by Eric Carlson.
1768
1769         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
1770         * WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
1771         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
1772         assembly when building 64-bit target.
1773         * WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
1774         * config.h: Handle 64-bit type definitions.
1775         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1776         (PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
1777         (PlatformCAAnimation::setToValue): Ditto
1778         (PlatformCAAnimation::setValues): Ditto
1779         * platform/graphics/win/FontCustomPlatformData.cpp:
1780         (WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
1781         support 32- and 64-bit targets.
1782         * platform/graphics/win/GraphicsContextCGWin.cpp:
1783         (WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
1784         support 64-bit builds.
1785         * platform/win/PasteboardWin.cpp:
1786         (WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
1787         work on 32- and 64-bit code.
1788         (WebCore::createGlobalImageFileDescriptor): Ditto
1789         * platform/win/StructuredExceptionHandlerSuppressor.cpp:
1790         (WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
1791         Comment out 32-bit inline assembly.
1792         (WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
1793         Ditto
1794
1795 2014-01-23  Brady Eidson  <beidson@apple.com>
1796
1797         Make IDBGetResult work with IDBKeyData instead of IDBKey.
1798         https://bugs.webkit.org/show_bug.cgi?id=127493
1799
1800         Reviewed by Eric Carlson.
1801
1802         Also break it into its own header to work better with IPC messages.
1803
1804         * Modules/indexeddb/IDBGetResult.h: Added.
1805         (WebCore::IDBGetResult::IDBGetResult):
1806
1807         * Modules/indexeddb/IDBServerConnection.h:
1808
1809         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1810         (WebCore::GetOperation::perform):
1811
1812         * WebCore.xcodeproj/project.pbxproj:
1813
1814 2014-01-23  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
1815
1816         [curl] Add storage limit to cache manager
1817         https://bugs.webkit.org/show_bug.cgi?id=125779
1818
1819         Reviewed by Brent Fulgham.
1820
1821         Sets a local disc storage size limit for the cache manager
1822         used by the curl network backend.
1823
1824         * platform/network/curl/CurlCacheEntry.cpp:
1825         (WebCore::CurlCacheEntry::CurlCacheEntry):
1826         (WebCore::CurlCacheEntry::isCached):
1827         (WebCore::CurlCacheEntry::saveCachedData):
1828         (WebCore::CurlCacheEntry::readCachedData):
1829         (WebCore::CurlCacheEntry::didFail):
1830         (WebCore::CurlCacheEntry::didFinishLoading):
1831         (WebCore::CurlCacheEntry::loadFileToBuffer):
1832         (WebCore::CurlCacheEntry::parseResponseHeaders):
1833         (WebCore::CurlCacheEntry::entrySize):
1834         * platform/network/curl/CurlCacheEntry.h:
1835         (WebCore::CurlCacheEntry::requestHeaders):
1836         * platform/network/curl/CurlCacheManager.cpp:
1837         (WebCore::CurlCacheManager::CurlCacheManager):
1838         (WebCore::CurlCacheManager::setStorageSizeLimit):
1839         (WebCore::CurlCacheManager::loadIndex):
1840         (WebCore::CurlCacheManager::saveIndex):
1841         (WebCore::CurlCacheManager::makeRoomForNewEntry):
1842         (WebCore::CurlCacheManager::didReceiveResponse):
1843         (WebCore::CurlCacheManager::didReceiveData):
1844         (WebCore::CurlCacheManager::invalidateCacheEntry):
1845         (WebCore::CurlCacheManager::readCachedData):
1846         * platform/network/curl/CurlCacheManager.h:
1847         (WebCore::CurlCacheManager::cacheDirectory):
1848
1849 2014-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1850
1851         Unreviewed. Fix automake warning.
1852
1853         * GNUmakefile.list.am: Remove trailing whitespaces.
1854
1855 2014-01-23  Mihai Maerean  <mmaerean@adobe.com>
1856
1857         [CSS Regions] Fix positioning composited layers when the region has overflow:hidden
1858         https://bugs.webkit.org/show_bug.cgi?id=124042
1859
1860         Reviewed by Mihnea Ovidenie.
1861
1862         If there's a clipping GraphicsLayer on the hierarchy, substract its offset, since it's its
1863         parent that positions us.
1864
1865         Tests: compositing/regions/position-layer-inside-region-overflow-hidden.html
1866                compositing/regions/position-layer-inside-overflow-hidden.html
1867                compositing/regions/position-layers-inside-region-overflow-hidden.html
1868                compositing/regions/position-layers-inside-regions-overflow-hidden.html
1869
1870         * rendering/RenderLayerBacking.cpp:
1871         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): The position
1872         must also be correct when the region has box-shadow that inflates the region's layer. The
1873         composited layers from the flow thread should be rendered in the same position whether the
1874         associated region has clipping or not.
1875         Using the position of the clipping layer instead of the location of the clipbox makes it
1876         also work with box-shadow that inflates the region's graphics layer.
1877
1878 2014-01-23  Andrei Bucur  <abucur@adobe.com>
1879
1880         [CSS Regions] Convert regions iterator loops to range-based loops
1881         https://bugs.webkit.org/show_bug.cgi?id=127464
1882
1883         Reviewed by Antti Koivisto.
1884
1885         Replace most of the iterator loops in the region implementation with
1886         range based for loops. The for loops that iterate only over subsets
1887         of collections have not been changed.
1888
1889         Tests: no new tests, this is a refactoring patch.
1890
1891         * dom/WebKitNamedFlow.cpp:
1892         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
1893         (WebCore::WebKitNamedFlow::getRegionsByContent):
1894         (WebCore::WebKitNamedFlow::getRegions):
1895         (WebCore::WebKitNamedFlow::getContent):
1896         * inspector/InspectorOverlay.cpp:
1897         (WebCore::buildObjectForCSSRegionsHighlight):
1898         * rendering/RenderFlowThread.cpp:
1899         (WebCore::RenderFlowThread::validateRegions):
1900         (WebCore::RenderFlowThread::updateLogicalWidth):
1901         (WebCore::RenderFlowThread::computeLogicalHeight):
1902         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1903         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1904         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1905         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1906         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
1907         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
1908         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1909         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1910         (WebCore::RenderFlowThread::collectLayerFragments):
1911         (WebCore::RenderFlowThread::fragmentsBoundingBox):
1912         * rendering/RenderNamedFlowFragment.cpp:
1913         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
1914         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
1915         * rendering/RenderNamedFlowThread.cpp:
1916         (WebCore::RenderNamedFlowThread::clearContentElements):
1917         (WebCore::RenderNamedFlowThread::nextRendererForNode):
1918         (WebCore::RenderNamedFlowThread::dependsOn):
1919         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
1920         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
1921         (WebCore::RenderNamedFlowThread::pushDependencies):
1922         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1923         (WebCore::isContainedInElements):
1924         (WebCore::RenderNamedFlowThread::getRanges):
1925         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1926         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1927         * rendering/RenderTreeAsText.cpp:
1928         (WebCore::writeRenderRegionList):
1929
1930 2014-01-23  László Langó  <llango.u-szeged@partner.samsung.com>
1931
1932         Range should be constructable.
1933         https://bugs.webkit.org/show_bug.cgi?id=115639
1934
1935         Reviewed by Ryosuke Niwa.
1936
1937         http://www.w3.org/TR/2013/WD-dom-20131107/#interface-range
1938         Now we can do `new Range()` instead of `document.createRange()`.
1939
1940         Backported from Blink: https://chromium.googlesource.com/chromium/blink/+/47ca40efdf58a4787aa33aa75a35778899b1c002%5E%21
1941
1942         Test: fast/dom/Range/range-constructor.html
1943
1944         * dom/Range.cpp:
1945         (WebCore::Range::create):
1946         * dom/Range.h:
1947         * dom/Range.idl:
1948
1949 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
1950
1951         Unreviewed build fix for gles after r162565. Add missing definitions.
1952
1953         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1954         (WebCore::GraphicsContext3D::drawArraysInstanced):
1955         (WebCore::GraphicsContext3D::drawElementsInstanced):
1956         (WebCore::GraphicsContext3D::vertexAttribDivisor):
1957
1958 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1959
1960         [GLIB] Use GUniquePtr instead of GOwnPtr
1961         https://bugs.webkit.org/show_bug.cgi?id=127431
1962
1963         Reviewed by Martin Robinson.
1964
1965         GUniquePtr is a template alias of std::unique_ptr with a custom
1966         deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
1967         where the output pointer is needed, but it will also be replaced soon.
1968
1969         * GNUmakefile.list.am:
1970         * PlatformGTK.cmake:
1971         * accessibility/atk/AXObjectCacheAtk.cpp:
1972         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1973         (getAttributeSetForAccessibilityObject):
1974         (accessibilityObjectLength):
1975         (textExtents):
1976         (webkitAccessibleTextGetChar):
1977         (numberOfReplacedElementsBeforeOffset):
1978         * page/ContextMenuController.cpp:
1979         * platform/SharedBuffer.h:
1980         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1981         (webKitWebAudioSrcConstructed):
1982         (webKitWebAudioSrcLoop):
1983         * platform/audio/gtk/AudioBusGtk.cpp:
1984         (WebCore::AudioBus::loadPlatformResource):
1985         * platform/geoclue/GeolocationProviderGeoclue.cpp:
1986         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
1987         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1988         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
1989         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1990         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1991         (webKitMediaSrcAddSrc):
1992         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1993         (webKitWebSrcStart):
1994         (ResourceHandleStreamingClient::wasBlocked):
1995         (ResourceHandleStreamingClient::cannotShowURL):
1996         * platform/graphics/gtk/ImageBufferGtk.cpp:
1997         (WebCore::encodeImage):
1998         (WebCore::ImageBuffer::toDataURL):
1999         * platform/graphics/gtk/ImageGtk.cpp:
2000         (WebCore::getThemeIconFileName):
2001         (WebCore::Image::loadPlatformResource):
2002         * platform/gtk/ContextMenuGtk.cpp:
2003         (WebCore::ContextMenu::itemCount):
2004         (WebCore::contextMenuItemVector):
2005         * platform/gtk/ContextMenuItemGtk.cpp:
2006         (WebCore::createPlatformMenuItemDescription):
2007         * platform/gtk/DataObjectGtk.cpp:
2008         (WebCore::DataObjectGtk::setURIList):
2009         (WebCore::DataObjectGtk::setURL):
2010         * platform/gtk/FileSystemGtk.cpp:
2011         (WebCore::filenameToString):
2012         (WebCore::fileSystemRepresentation):
2013         (WebCore::filenameForDisplay):
2014         (WebCore::pathGetFileName):
2015         (WebCore::applicationDirectoryPath):
2016         (WebCore::sharedResourcesPath):
2017         (WebCore::directoryName):
2018         (WebCore::listDirectory):
2019         (WebCore::openTemporaryFile):
2020         * platform/gtk/GOwnPtrGtk.cpp: Removed.
2021         * platform/gtk/GOwnPtrGtk.h: Removed.
2022         * platform/gtk/GUniquePtrGtk.h: Added.
2023         * platform/gtk/GamepadsGtk.cpp:
2024         (WebCore::GamepadsGtk::GamepadsGtk):
2025         * platform/gtk/GtkClickCounter.cpp:
2026         (WebCore::GtkClickCounter::shouldProcessButtonEvent):
2027         * platform/gtk/GtkInputMethodFilter.cpp:
2028         (WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
2029         * platform/gtk/GtkPopupMenu.cpp:
2030         (WebCore::GtkPopupMenu::popUp):
2031         (WebCore::GtkPopupMenu::typeAheadFind):
2032         * platform/gtk/LanguageGtk.cpp:
2033         (WebCore::platformLanguage):
2034         * platform/gtk/LocalizedStringsGtk.cpp:
2035         (WebCore::imageTitle):
2036         (WebCore::localizedMediaTimeDescription):
2037         * platform/gtk/PasteboardHelper.cpp:
2038         (WebCore::selectionDataToUTF8String):
2039         (WebCore::PasteboardHelper::getClipboardContents):
2040         (WebCore::PasteboardHelper::fillSelectionData):
2041         * platform/gtk/PopupMenuGtk.cpp:
2042         (WebCore::PopupMenuGtk::createGtkActionForMenuItem):
2043         (WebCore::PopupMenuGtk::show):
2044         * platform/gtk/WebKitAuthenticationWidget.cpp:
2045         (webkitAuthenticationWidgetInitialize):
2046         * platform/network/ResourceHandleInternal.h:
2047         * platform/network/gtk/CredentialBackingStore.cpp:
2048         (WebCore::credentialForChallengeAsyncReadyCallback):
2049         * platform/network/soup/CookieJarSoup.cpp:
2050         (WebCore::setCookiesFromDOM):
2051         (WebCore::cookiesForSession):
2052         (WebCore::getRawCookies):
2053         (WebCore::deleteCookie):
2054         (WebCore::getHostnamesWithCookies):
2055         (WebCore::deleteCookiesForHostname):
2056         (WebCore::deleteAllCookies):
2057         * platform/network/soup/DNSSoup.cpp:
2058         * platform/network/soup/GUniquePtrSoup.h: Added.
2059         * platform/network/soup/ResourceErrorSoup.cpp:
2060         (WebCore::failingURI):
2061         * platform/network/soup/ResourceHandleSoup.cpp:
2062         (WebCore::ResourceHandle::ensureReadBuffer):
2063         (WebCore::cleanupSoupRequestOperation):
2064         (WebCore::createSoupRequestAndMessageForHandle):
2065         * platform/network/soup/ResourceRequestSoup.cpp:
2066         (WebCore::ResourceRequest::updateSoupMessageMembers):
2067         (WebCore::ResourceRequest::updateSoupMessage):
2068         * platform/network/soup/ResourceResponseSoup.cpp:
2069         * platform/network/soup/SoupURIUtils.cpp:
2070         (WebCore::soupURIToKURL):
2071         * platform/soup/SharedBufferSoup.cpp:
2072         (WebCore::SharedBuffer::SharedBuffer):
2073         (WebCore::SharedBuffer::clearPlatformData):
2074         (WebCore::SharedBuffer::maybeTransferPlatformData):
2075         (WebCore::SharedBuffer::hasPlatformData):
2076         * plugins/gtk/PluginPackageGtk.cpp:
2077         (WebCore::PluginPackage::fetchInfo):
2078         (WebCore::PluginPackage::load):
2079
2080 2014-01-22  Simon Fraser  <simon.fraser@apple.com>
2081
2082         Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
2083         https://bugs.webkit.org/show_bug.cgi?id=127461
2084
2085         Reviewed by Andreas Kling.
2086
2087         The "fixedVisibleContentRect" code path is only used by platforms
2088         which enabled TILED_BACKING_STORE, so to reduce confusion, surround
2089         this code with #if USE(TILED_BACKING_STORE).
2090
2091         * page/Frame.cpp:
2092         (WebCore::Frame::createView):
2093         * page/FrameView.cpp:
2094         * page/FrameView.h:
2095         * platform/ScrollView.cpp:
2096         (WebCore::ScrollView::unscaledVisibleContentSize):
2097         (WebCore::ScrollView::visibleContentRect):
2098         * platform/ScrollView.h:
2099         (WebCore::ScrollView::visibleSize):
2100
2101 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
2102
2103         ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
2104         https://bugs.webkit.org/show_bug.cgi?id=126987
2105
2106         Reviewed by Simon Fraser.
2107
2108         When "inherit" is specified and there is no parent, Length values have an "Auto" type
2109
2110         Test: fast/css3-text/css3-word-spacing-percentage/word-spacing-crash.html
2111
2112         * rendering/style/RenderStyle.cpp:
2113         (WebCore::RenderStyle::setWordSpacing):
2114
2115 2014-01-22  Samuel White  <samuel_white@apple.com>
2116
2117         AX: Can't always increment web sliders.
2118         https://bugs.webkit.org/show_bug.cgi?id=127451
2119
2120         Reviewed by Chris Fleizach.
2121
2122         Clamping the decrement/increment amount to one when necessary (if a percent change would result in a change of less than one).
2123
2124         Test: accessibility/range-alter-by-percent.html
2125
2126         * accessibility/AccessibilityNodeObject.cpp:
2127         (WebCore::AccessibilityNodeObject::changeValueByPercent):
2128
2129 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
2130
2131         Remove CSS3_TEXT_DECORATION define
2132         https://bugs.webkit.org/show_bug.cgi?id=127333
2133
2134         Reviewed by Simon Fraser.
2135
2136         This is required for unprefixing the text-decoration-* CSS properties.
2137
2138         No new tests are necessary becase the flag was already on by default.
2139
2140         * Configurations/FeatureDefines.xcconfig:
2141         * css/CSSComputedStyleDeclaration.cpp:
2142         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2143         (WebCore::ComputedStyleExtractor::propertyValue):
2144         * css/CSSParser.cpp:
2145         (WebCore::isColorPropertyID):
2146         (WebCore::CSSParser::parseValue):
2147         (WebCore::CSSParser::addTextDecorationProperty):
2148         (WebCore::CSSParser::parseTextUnderlinePosition):
2149         * css/CSSParser.h:
2150         * css/CSSPrimitiveValueMappings.h:
2151         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
2152         * css/CSSPropertyNames.in:
2153         * css/CSSValueKeywords.in:
2154         * css/DeprecatedStyleBuilder.cpp:
2155         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2156         * css/StylePropertyShorthand.cpp:
2157         (WebCore::webkitTextDecorationShorthand):
2158         (WebCore::shorthandForProperty):
2159         (WebCore::matchingShorthandsForLonghand):
2160         * css/StylePropertyShorthand.h:
2161         * css/StyleResolver.cpp:
2162         (WebCore::shouldApplyPropertyInParseOrder):
2163         (WebCore::isValidVisitedLinkProperty):
2164         (WebCore::StyleResolver::applyProperty):
2165         * platform/graphics/GraphicsContext.h:
2166         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2167         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2168         * platform/graphics/cg/GraphicsContextCG.cpp:
2169         (WebCore::GraphicsContext::platformInit):
2170         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2171         (WebCore::createPen):
2172         * rendering/InlineFlowBox.cpp:
2173         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2174         * rendering/InlineFlowBox.h:
2175         * rendering/InlineTextBox.cpp:
2176         (WebCore::textDecorationStyleToStrokeStyle):
2177         (WebCore::boundingBoxForAllActiveDecorations):
2178         (WebCore::InlineTextBox::paintDecoration):
2179         * rendering/RenderObject.cpp:
2180         (WebCore::decorationColor):
2181         * rendering/RootInlineBox.cpp:
2182         (WebCore::RootInlineBox::maxLogicalTop):
2183         * rendering/RootInlineBox.h:
2184         * rendering/style/RenderStyle.cpp:
2185         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
2186         (WebCore::RenderStyle::colorIncludingFallback):
2187         (WebCore::RenderStyle::visitedDependentColor):
2188         * rendering/style/RenderStyle.h:
2189         * rendering/style/RenderStyleConstants.h:
2190         * rendering/style/StyleRareInheritedData.cpp:
2191         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2192         (WebCore::StyleRareInheritedData::operator==):
2193         * rendering/style/StyleRareInheritedData.h:
2194         * rendering/style/StyleRareNonInheritedData.cpp:
2195         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2196         (WebCore::StyleRareNonInheritedData::operator==):
2197         * rendering/style/StyleRareNonInheritedData.h:
2198
2199 2014-01-22  Chris Fleizach  <cfleizach@apple.com>
2200
2201         AX: Do not return an accessible name for an object just because it has tabindex=0
2202         https://bugs.webkit.org/show_bug.cgi?id=126914
2203
2204         Reviewed by Mario Sanchez Prada.
2205
2206         WebKit has code to return an accessible name for any object that is "generically" focusable (ie. tabindex=0).
2207         This behavior, which is not supported in ARIA, has caused many problems for VoiceOver. Often VoiceOver will
2208         speak all the text underneath any type of group.
2209
2210         I think we need to revert this behavior and follow the ARIA spec more closely.
2211
2212         Test: accessibility/aria-describedby-ensures-visibility.html
2213
2214         * accessibility/AccessibilityNodeObject.cpp:
2215         (WebCore::AccessibilityNodeObject::visibleText):
2216         (WebCore::AccessibilityNodeObject::title):
2217
2218 2014-01-22  Brady Eidson  <beidson@apple.com>
2219
2220         The IDB backing store get() method shouldn't call IDB callbacks directly
2221         https://bugs.webkit.org/show_bug.cgi?id=127453
2222
2223         Reviewed by Beth Dakin.
2224
2225         * Modules/indexeddb/IDBServerConnection.h:
2226         (WebCore::IDBGetResult::IDBGetResult): Add a new structure to hold all of the
2227           possible results of a get() call.
2228
2229         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2230         (WebCore::IDBServerConnectionLevelDB::get): Don't call IDBCallbacks directly.
2231           Instead, return the GetResult to the GetOperation which will make IDBCallbacks.
2232         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2233
2234         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2235         (WebCore::GetOperation::perform): Get all of the IDBGetResults in the completion callback
2236           make the appropriate IDBCallback.
2237         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2238
2239 2014-01-22  Dean Jackson  <dino@apple.com>
2240
2241         Unreviewed attempt to fix 32-bit builds.
2242
2243         Use long long rather than GC3Dintptr.
2244
2245         * html/canvas/ANGLEInstancedArrays.cpp:
2246         (WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE):
2247         * html/canvas/ANGLEInstancedArrays.h:
2248         * html/canvas/WebGLRenderingContext.cpp:
2249         (WebCore::WebGLRenderingContext::drawElementsInstanced):
2250         * html/canvas/WebGLRenderingContext.h:
2251
2252 2014-01-21  Brady Eidson  <beidson@apple.com>
2253
2254         IDB: "Put" support
2255         <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
2256
2257         Reviewed by Alexey Proskuryakov.
2258
2259         Add persistent encode/decode for storage to the database:
2260         * Modules/indexeddb/IDBKey.cpp:
2261         (WebCore::IDBKey::encode):
2262         (WebCore::IDBKey::decode):
2263         * Modules/indexeddb/IDBKey.h:
2264
2265         Add a data class to represent IDBKey suitable for crossing IPC:
2266         * Modules/indexeddb/IDBKeyData.cpp: Added.
2267         (WebCore::IDBKeyData::IDBKeyData):
2268         (WebCore::IDBKeyData::maybeCreateIDBKey):
2269         (WebCore::IDBKeyData::isolatedCopy):
2270         * Modules/indexeddb/IDBKeyData.h: Added.
2271         (WebCore::IDBKeyData::IDBKeyData):
2272
2273         * platform/CrossThreadCopier.cpp:
2274         (WebCore::IDBKeyData>::copy):
2275         * platform/CrossThreadCopier.h:
2276
2277         * WebCore.exp.in:
2278         * WebCore.xcodeproj/project.pbxproj:
2279
2280 2014-01-22  Dean Jackson  <dino@apple.com>
2281
2282         [WebGL] Implement ANGLE_instanced_arrays
2283         https://bugs.webkit.org/show_bug.cgi?id=127257
2284
2285         Reviewed by Brent Fulgham.
2286
2287         Implement the instanced drawing WebGL extension,
2288         ANGLE_instanced_arrays. This is currently Mac-only,
2289         but should be portable to other platforms if their
2290         OpenGL exposes the functions. It's also done in a way
2291         that will make exposing it to WebGL2 simple.
2292
2293         Test: fast/canvas/webgl/angle-instanced-arrays.html
2294
2295         * CMakeLists.txt:
2296         * DerivedSources.cpp:
2297         * DerivedSources.make:
2298         * GNUmakefile.list.am:
2299         * WebCore.vcxproj/WebCore.vcxproj:
2300         * WebCore.vcxproj/WebCore.vcxproj.filters:
2301         * WebCore.xcodeproj/project.pbxproj:
2302         Add the new files to all the build systems.
2303
2304         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2305         (WebCore::toJS): Link JS side to C++ side.
2306
2307         * html/canvas/ANGLEInstancedArrays.cpp: Added.
2308         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2309         * html/canvas/ANGLEInstancedArrays.h: Added.
2310         * html/canvas/ANGLEInstancedArrays.idl: Added.
2311         New boilerplate files that expose the extension methods.
2312
2313         * html/canvas/WebGLExtension.h: New extension enum.
2314
2315         * html/canvas/WebGLRenderingContext.cpp:
2316         (WebCore::WebGLRenderingContext::validateVertexAttributes): Add an optional
2317         parameter representing the number of instance primitives we are asked
2318         to draw. Use that for the draw count if looking at an instanced attribute.
2319         Also make sure we see at least one non-instanced attribute.
2320         (WebCore::WebGLRenderingContext::validateDrawArrays): Update this so it could
2321         be used from either drawArrays or drawArraysInstanced.
2322         (WebCore::WebGLRenderingContext::drawArrays):
2323         (WebCore::WebGLRenderingContext::validateDrawElements): Same here, now can be
2324         used by the instanced and non-instanced versions.
2325         (WebCore::WebGLRenderingContext::drawElements):
2326         (WebCore::WebGLRenderingContext::getExtension): Create and return the new extension.
2327         (WebCore::WebGLRenderingContext::getSupportedExtensions): Add new extension to the list.
2328         (WebCore::WebGLRenderingContext::getVertexAttrib): Intercept a query to the divisor
2329         attribute and return the value we kept in the state.
2330         (WebCore::WebGLRenderingContext::drawArraysInstanced): Call the GC3D method.
2331         (WebCore::WebGLRenderingContext::drawElementsInstanced): Ditto.
2332         (WebCore::WebGLRenderingContext::vertexAttribDivisor): Ditto.
2333
2334         * html/canvas/WebGLRenderingContext.h: Define the new methods and parameters.
2335
2336         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2337         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Keep a record of the
2338         divisor if we set it.
2339         * html/canvas/WebGLVertexArrayObjectOES.h:
2340         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::VertexAttribState):
2341
2342         * platform/graphics/GraphicsContext3D.h: New enum.
2343         * platform/graphics/mac/GraphicsContext3DMac.mm:
2344         (WebCore::GraphicsContext3D::drawArraysInstanced): The actual calls into OpenGL.
2345         (WebCore::GraphicsContext3D::drawElementsInstanced): Ditto.
2346         (WebCore::GraphicsContext3D::vertexAttribDivisor): Ditto.
2347
2348         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Empty implementations
2349         for non-mac platforms.
2350
2351         * platform/graphics/ios/GraphicsContext3DIOS.h: Define the iOS names for the
2352         functions.
2353
2354 2014-01-22  Zalan Bujtas  <zalan@apple.com>
2355
2356         [CSS Shapes] shape-inside rectangle layout can fail
2357         https://bugs.webkit.org/show_bug.cgi?id=124784
2358
2359         Reviewed by Darin Adler.
2360
2361         Early subpixel rounding/flooring/ceiling can have unwanted
2362         side effect on the final pixel value. Delay pixel
2363         conversions as much as possible.
2364
2365         Existing test is changed to reflect subpixel functionality.
2366
2367         * rendering/shapes/RectangleShape.cpp:
2368         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
2369
2370 2014-01-22  Jochen Eisinger  <jochen@chromium.org>
2371
2372         Add protocolIsInHTTPFamily for strings and use it where appropriate
2373         https://bugs.webkit.org/show_bug.cgi?id=127336
2374
2375         Reviewed by Alexey Proskuryakov.
2376
2377         * html/HTMLAnchorElement.cpp:
2378         (WebCore::HTMLAnchorElement::parseAttribute):
2379         * page/ContentSecurityPolicy.cpp:
2380         (WebCore::CSPSource::schemeMatches):
2381         * page/SecurityPolicy.cpp:
2382         (WebCore::SecurityPolicy::generateReferrerHeader):
2383         * platform/URL.cpp:
2384         (WebCore::protocolIsInHTTPFamily):
2385         * platform/URL.h:
2386
2387 2014-01-22  Zalan Bujtas  <zalan@apple.com>
2388
2389         Subpixel Layout: SimpleLineLayout needs more position rounding to match InlineFlowBox layout.
2390         https://bugs.webkit.org/show_bug.cgi?id=127404
2391
2392         Reviewed by Antti Koivisto.
2393
2394         In order to produce a CSS pixel perfect layout, SimpleLineLayout needs to
2395         round line positions to CSS (integral) position similarly to InlineFlowBox.
2396
2397         Existing tests cover it.
2398
2399         * rendering/SimpleLineLayoutResolver.h:
2400         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2401         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
2402
2403 2014-01-22  Joseph Pecoraro  <pecoraro@apple.com>
2404
2405         Unreviewed rollout of r162534, this caused inspector test failures.
2406
2407         * bindings/js/PageScriptDebugServer.cpp:
2408         (WebCore::PageScriptDebugServer::addListener):
2409         (WebCore::PageScriptDebugServer::removeListener):
2410         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2411         (WebCore::PageScriptDebugServer::didRemoveLastListener):
2412         * bindings/js/PageScriptDebugServer.h:
2413         * bindings/js/ScriptDebugServer.cpp:
2414         (WebCore::ScriptDebugServer::ScriptDebugServer):
2415         (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
2416         (WebCore::ScriptDebugServer::recompileAllJSFunctionsTimerFired):
2417         * bindings/js/ScriptDebugServer.h:
2418         * bindings/js/WorkerScriptDebugServer.cpp:
2419         (WebCore::WorkerScriptDebugServer::addListener):
2420         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2421         (WebCore::WorkerScriptDebugServer::removeListener):
2422         * inspector/InspectorProfilerAgent.cpp:
2423
2424 2014-01-22  peavo@outlook.com  <peavo@outlook.com>
2425
2426         Crashes in setTextForIterator
2427         https://bugs.webkit.org/show_bug.cgi?id=127424
2428
2429         Reviewed by Brent Fulgham.
2430
2431         * platform/text/icu/UTextProviderLatin1.cpp:
2432         (WebCore::uTextLatin1Clone): Provide correct buffer size in utext_setup function call.
2433         (WebCore::uTextLatin1Access): Give correct buffer size to memset call.
2434         (WebCore::openLatin1UTextProvider): Ditto.
2435
2436 2014-01-22  Jer Noble  <jer.noble@apple.com>
2437
2438         [Mac] MediaPlayerPrivateMediaSourceAVFObjC::load ASSERTs on lots of tests
2439         https://bugs.webkit.org/show_bug.cgi?id=127430
2440
2441         Reviewed by Eric Carlson.
2442
2443         When other registered media engines cannot load a URL, the engine selection
2444         will eventually pick MediaPlayerPrivateMediaSourceAVFObjC and ask it to load
2445         the URL. Instead of ASSERTing here, simply reject the URL by setting the
2446         network state to FormatError.
2447
2448         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2449         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
2450
2451 2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2452
2453         [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
2454         https://bugs.webkit.org/show_bug.cgi?id=127119
2455
2456         Reviewed by Mario Sanchez Prada.
2457
2458         At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
2459         ACCESSIBILITY is not enabled, fixing that.
2460         Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.
2461
2462         * accessibility/AXObjectCache.h:
2463         (WebCore::AXObjectCache::AXObjectCache):
2464         * accessibility/AccessibilityObject.h:
2465
2466 2014-01-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2467
2468         Refactor calculation of hasRx and hasRy values in SVGPathData
2469         https://bugs.webkit.org/show_bug.cgi?id=127423
2470
2471         Reviewed by Darin Adler.
2472
2473         This is a follow-up on https://bugs.webkit.org/show_bug.cgi?id=127337
2474
2475         * rendering/svg/SVGPathData.cpp:
2476         (WebCore::updatePathFromRectElement):
2477
2478 2014-01-21  Joseph Pecoraro  <pecoraro@apple.com>
2479
2480         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
2481         https://bugs.webkit.org/show_bug.cgi?id=127409
2482
2483         Reviewed by Timothy Hatcher.
2484
2485         * bindings/js/ScriptDebugServer.h:
2486         * bindings/js/ScriptDebugServer.cpp:
2487         (WebCore::ScriptDebugServer::ScriptDebugServer):
2488         Remove m_recompileTimer and the recompile soon function.
2489         We can just recompile immediately in all existing cases.
2490
2491         * bindings/js/PageScriptDebugServer.h:
2492         * bindings/js/PageScriptDebugServer.cpp:
2493         (WebCore::PageScriptDebugServer::addListener):
2494         (WebCore::PageScriptDebugServer::removeListener):
2495         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2496         (WebCore::PageScriptDebugServer::didAddFirstListener):
2497         (WebCore::PageScriptDebugServer::didRemoveLastListener):
2498         Add a "didAddFirstListener" to match "didRemoveLastListener".
2499         Only recompile functions when we attach the debugger and when
2500         we detach the last listener.
2501
2502         * bindings/js/WorkerScriptDebugServer.cpp:
2503         (WebCore::WorkerScriptDebugServer::addListener):
2504         (WebCore::WorkerScriptDebugServer::removeListener):
2505         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2506         Same thing. Also rearrange the functions to read better.
2507
2508         * inspector/InspectorProfilerAgent.cpp:
2509         Use the direct recompile function instead of the removed "soon" version.
2510
2511 2014-01-22  Robert Sipka  <sipka@inf.u-szeged.hu>
2512
2513         [curl] Improve detecting and handling of SSL client certificate
2514         https://bugs.webkit.org/show_bug.cgi?id=125006
2515
2516         Reviewed by Brent Fulgham.
2517
2518         Add client certificate handling.
2519
2520         * platform/network/ResourceHandle.h:
2521         * platform/network/curl/ResourceError.h:
2522         (WebCore::ResourceError::hasSSLConnectError):
2523         * platform/network/curl/ResourceHandleCurl.cpp:
2524         (WebCore::ResourceHandle::setClientCertificateInfo):
2525         * platform/network/curl/ResourceHandleManager.cpp:
2526         (WebCore::ResourceHandleManager::initializeHandle):
2527         * platform/network/curl/SSLHandle.cpp:
2528         (WebCore::addAllowedClientCertificate):
2529         (WebCore::setSSLClientCertificate):
2530         * platform/network/curl/SSLHandle.h:
2531
2532 2014-01-22  Mihai Maerean  <mmaerean@adobe.com>
2533
2534         [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
2535         https://bugs.webkit.org/show_bug.cgi?id=127343
2536
2537         Reviewed by Sam Weinig.
2538
2539         RenderNamedFlowFragment::layerOwner cannot return null because regions create stacking
2540         contexts which create layers.
2541
2542         No new tests, no functional change.
2543
2544         * rendering/RenderFlowThread.cpp:
2545         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
2546         * rendering/RenderLayer.cpp:
2547         (WebCore::RenderLayer::calculateClipRects):
2548         * rendering/RenderLayerBacking.cpp:
2549         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
2550         * rendering/RenderLayerCompositor.cpp:
2551         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2552         * rendering/RenderNamedFlowFragment.h:
2553
2554 2014-01-22  Antti Koivisto  <antti@apple.com>
2555
2556         Avoid unthrottled layer flushes triggered by RenderLayerCompositor::ensureRootLayer
2557         https://bugs.webkit.org/show_bug.cgi?id=127426
2558
2559         Reviewed by Anders Carlsson.
2560         
2561         * rendering/RenderLayerCompositor.cpp:
2562         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
2563         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2564
2565             Factor scroll layer position update to a function.
2566
2567         (WebCore::RenderLayerCompositor::ensureRootLayer):
2568         
2569             Stop calling frameViewDidChangeSize/frameViewDidScroll. Instead call the relevent functions
2570             directly. This avoid unthrottled layer flush that is done when the view actually scrolls.
2571
2572         * rendering/RenderLayerCompositor.h:
2573
2574 2014-01-22  Mihai Tica  <mitica@adobe.com>
2575
2576         [CSS Background Blending] -webkit-background-blend-mode fails for certain SVG files
2577         https://bugs.webkit.org/show_bug.cgi?id=127350
2578
2579         Reviewed by Dirk Schulze.
2580
2581         The graphics context of the SVG inherits the blend mode set
2582         on the background layer. Fix consists in drawing the SVG
2583         in a transparency layer.
2584
2585         Test: css3/compositing/background-blend-mode-svg.html
2586
2587         * svg/graphics/SVGImage.cpp:
2588         (WebCore::SVGImage::draw): Begin a transparency layer if a blend mode is set.
2589
2590 2014-01-22  Antti Koivisto  <antti@apple.com>
2591
2592         Update overlay scrollbars in single pass
2593         https://bugs.webkit.org/show_bug.cgi?id=127289
2594
2595         Reviewed by Anders Carlsson.
2596
2597         * platform/ScrollView.cpp:
2598         (WebCore::ScrollView::updateScrollbars):
2599         
2600             Multi-pass scrollbar resolution is only needed for traditional scrollbars. Overlay scrollbars don't affect layout.
2601
2602 2014-01-22  Mihnea Ovidenie  <mihnea@adobe.com>
2603
2604         [CSSRegions] Incorrect layout of a region pseudo children
2605         https://bugs.webkit.org/show_bug.cgi?id=126146
2606
2607         Reviewed by David Hyatt.
2608
2609         Test: fast/regions/collapse-anonymous-region.html
2610
2611         A region behaviour, styled using -webkit-flow-from, is modeled using an anonymous
2612         block created to fragment the named flow content inside the region. We have to prevent
2613         the behaviour of anonymous children collapsing for this block to make sure that the
2614         region element children are still laid out properly when the region element becomes an ordinary
2615         element.
2616
2617         * rendering/RenderBlockFlow.h:
2618
2619 2014-01-21  Ryuan Choi  <ryuan.choi@samsung.com>
2620
2621         Remove unused "acceleratedCompositingForScrollableFramesEnabled" setting
2622         https://bugs.webkit.org/show_bug.cgi?id=127402
2623
2624         Reviewed by Anders Carlsson.
2625
2626         compositing/iframes/iframe-composited-scrolling.html is updated because
2627         there are no usages in WebCore.
2628
2629         * page/Settings.in:
2630
2631 2014-01-21  Alex Christensen  <achristensen@webkit.org>
2632
2633         Compile fix for using libsoup on Windows.
2634         https://bugs.webkit.org/show_bug.cgi?id=127377
2635
2636         Reviewed by Daniel Bates.
2637
2638         * platform/network/soup/ProxyResolverSoup.cpp:
2639         (soupProxyResolverWkSetProperty):
2640         (soupProxyResolverWkGetProperty):
2641         (soupProxyResolverWkGetProxyURISync):
2642         Replaced uint with unsigned.
2643
2644 2014-01-21  Daniel Bates  <dabates@apple.com>
2645
2646         Break up single assertion into two assertions in HTMLMediaElement::returnPlatformLayer()
2647
2648         Following up after <http://trac.webkit.org/changeset/162473>, we should break up
2649         the assertion into two assertions as suggested by Darin Adler. Separating the single
2650         assertion into two assertions makes it straightforward to determine the conjunct that
2651         failed among other benefits.
2652
2653         * html/HTMLMediaElement.cpp:
2654         (WebCore::HTMLMediaElement::parseAttribute):
2655
2656 2014-01-21  Brady Eidson  <beidson@apple.com>
2657
2658         The IDB backing store put() method shouldn't call IDB callbacks directly
2659         https://bugs.webkit.org/show_bug.cgi?id=127399
2660
2661         Reviewed by Beth Dakin.
2662
2663         Refactor the put() callback to take a resulting key or an error.
2664         * Modules/indexeddb/IDBServerConnection.h:
2665
2666         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2667         (WebCore::PutOperation::perform): Call to the backing store, then perform the
2668           appropriate IDB callback whether a key or an error was returned.
2669         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2670
2671         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2672         (WebCore::IDBServerConnectionLevelDB::put): Don’t call IDB callbacks directly.
2673           Instead, pass the resulting key/error back to the PutOperation.
2674         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2675
2676 2014-01-21  Jae Hyun Park  <jae.park@company100.net>
2677
2678         Use nullptr in HTMLCanvasElement
2679         https://bugs.webkit.org/show_bug.cgi?id=127388
2680
2681         Reviewed by Gyuyoung Kim.
2682
2683         * html/HTMLCanvasElement.cpp:
2684         (WebCore::HTMLCanvasElement::getContext):
2685         (WebCore::HTMLCanvasElement::drawingContext):
2686         (WebCore::HTMLCanvasElement::existingDrawingContext):
2687
2688 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
2689
2690         Assertion failure in Range::nodeWillBeRemoved
2691         https://bugs.webkit.org/show_bug.cgi?id=121694
2692
2693         Reviewed by Ryosuke Niwa.
2694
2695         Based on Blink a change: https://chromium.googlesource.com/chromium/blink/+/407c1d7b2c45974aa614b3f847ffe9e8fce205fa
2696
2697         This patch fix an assertion failure. Range::nodeWillBeRemoved() might
2698         be called with removed node in ContainerNode, when DOMNodeRemovedFromDocument
2699         event handler calls removeChild(), for node being removed.
2700
2701         Test: fast/dom/Range/remove-twice-crash.html
2702
2703         * dom/ContainerNode.cpp:
2704         (WebCore::ContainerNode::willRemoveChild):
2705         * dom/ContainerNode.h:
2706
2707 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2708
2709         REGRESSION (r161580): Some PDFs render outside their <img>
2710         https://bugs.webkit.org/show_bug.cgi?id=127381
2711         <rdar://problem/15872168>
2712
2713         Reviewed by Simon Fraser.
2714
2715         * platform/graphics/cg/PDFDocumentImage.cpp:
2716         (WebCore::transformContextForPainting):
2717         Only try to make the scale uniform if it isn't already, and use the minimum
2718         of the two original scales when doing so, so that it is absolutely certain
2719         to fit inside space allocated for the image during layout.
2720
2721 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2722
2723         Remove #if PLATFORM(IOS) in various places around customFixedPositionLayoutRect() code
2724         https://bugs.webkit.org/show_bug.cgi?id=127373
2725
2726         Reviewed by Beth Dakin.
2727
2728         Instead of PLATFORM(IOS) #idefs at every call site for viewportConstrainedVisibleContentRect(),
2729         move the #ifdef inside viewportConstrainedVisibleContentRect().
2730         
2731         The one call site that needs special handling is RenderLayerBacking::updateCompositedBounds(),
2732         which needs to avoid clipping fixed layers to the custom fixed position rect, but instead to
2733         visibleContentRect() (which is really the document bounds on iOS). This ensures that the
2734         fixed layers aren't clipped when zooming out.
2735
2736         * page/FrameView.cpp:
2737         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
2738         * rendering/RenderBoxModelObject.cpp:
2739         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2740         * rendering/RenderLayerBacking.cpp:
2741         (WebCore::RenderLayerBacking::updateCompositedBounds):
2742         * rendering/RenderLayerCompositor.cpp:
2743         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2744         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2745         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2746
2747 2014-01-21  Andy Estes  <aestes@apple.com>
2748
2749         [iOS] Allow all clients to link against WebCore
2750         https://bugs.webkit.org/show_bug.cgi?id=127372
2751         
2752         Reviewed by Dan Bernstein.
2753
2754         * Configurations/WebCore.xcconfig:
2755
2756 2014-01-21  Bear Travis  <betravis@adobe.com>
2757
2758         [CSS Shapes] Preserve box-shape order when serializing shape values
2759         https://bugs.webkit.org/show_bug.cgi?id=127200
2760
2761         Reviewed by Dirk Schulze.
2762
2763         Convert the parsed shape-box pair to a CSSValueList rather than directly
2764         adding the box value to BasicShape. The CSSValueList preserves the
2765         shape-box ordering, and cleans up a little bit of the code shared between
2766         clip and shape values.
2767
2768         Modifying existing parsing tests.
2769
2770         * css/CSSComputedStyleDeclaration.cpp:
2771         (WebCore::shapePropertyValue): Factor out code common to generating shape
2772         values.
2773         (WebCore::ComputedStyleExtractor::propertyValue): Generate a CSSValueList when
2774         you have both a shape and a box.
2775         * css/CSSParser.cpp:
2776         (WebCore::CSSParser::parseBasicShapeAndOrBox): Factor out code common to clip
2777         paths and shape properties that parses the [basic-shape || box] syntax from
2778         the CSS Shapes spec.
2779         (WebCore::CSSParser::parseShapeProperty): Parse shape-box pairs as a CSSValueList.
2780         * css/DeprecatedStyleBuilder.cpp:
2781         (WebCore::ApplyPropertyShape::applyValue): Use the CSSValueList for shape-box pairs.
2782         * css/CSSValueList.h:
2783         (WebCore::CSSValueList::itemWithoutBoundsCheck): Add a const version.
2784         * page/animation/CSSPropertyAnimation.cpp:
2785         (WebCore::blendFunc): Specify a box when blending.
2786         * rendering/style/ShapeValue.h:
2787         (WebCore::ShapeValue::createShapeValue): Add a box parameter.
2788         (WebCore::ShapeValue::ShapeValue): Ditto.
2789
2790 2014-01-21  Daniel Bates  <dabates@apple.com>
2791
2792         Fix the iOS Simulator release build
2793
2794         Substitute ASSERT_UNUSED() for ASSERT() to resolve a compiler warning
2795         that the argument platformLayer is unused. The argument platformLayer
2796         is only used in the asserted condition, which isn't compiled in a
2797         release build; => the argument is unused in a release build.
2798
2799         * html/HTMLMediaElement.cpp:
2800         (WebCore::HTMLMediaElement::parseAttribute):
2801
2802 2014-01-21  Zoltan Horvath  <zoltan@webkit.org>
2803
2804         Since MidpointState is a class, it should behave like a class
2805         https://bugs.webkit.org/show_bug.cgi?id=127154
2806
2807         Reviewed by David Hyatt.
2808
2809         I modified MidpointState to behave like a class, updated the call sites also.
2810
2811         No new tests, no behavior change.
2812
2813         * platform/text/BidiResolver.h:
2814         (WebCore::MidpointState::reset):
2815         (WebCore::MidpointState::startIgnoringSpaces):
2816         (WebCore::MidpointState::stopIgnoringSpaces):
2817         (WebCore::MidpointState::midpoints):
2818         (WebCore::MidpointState::numMidpoints):
2819         (WebCore::MidpointState::currentMidpoint):
2820         (WebCore::MidpointState::incrementCurrentMidpoint):
2821         (WebCore::MidpointState::decreaseNumMidpoints):
2822         (WebCore::MidpointState::betweenMidpoints):
2823         (WebCore::MidpointState::setBetweenMidpoints):
2824         (WebCore::MidpointState::addMidpoint): Renamed from deprecatedAddMidpoint, since now
2825         its private, we no longer need to discourage callers from using it.
2826         * rendering/InlineIterator.h:
2827         (WebCore::IsolateTracker::addFakeRunIfNecessary):
2828         * rendering/RenderBlockLineLayout.cpp:
2829         (WebCore::RenderBlockFlow::appendRunsForObject):
2830         (WebCore::constructBidiRunsForLine):
2831         * rendering/line/BreakingContextInlineHeaders.h:
2832         (WebCore::checkMidpoints):
2833         * rendering/line/TrailingObjects.cpp:
2834         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2835
2836 2014-01-21  Commit Queue  <commit-queue@webkit.org>
2837
2838         Unreviewed, rolling out r162452.
2839         http://trac.webkit.org/changeset/162452
2840         https://bugs.webkit.org/show_bug.cgi?id=127366
2841
2842         broke a few tests on all Mac WebKit1 bots (Requested by
2843         thorton on #webkit).
2844
2845         * WebCore.exp.in:
2846         * page/FocusController.cpp:
2847         (WebCore::FocusController::FocusController):
2848         (WebCore::FocusController::setFocused):
2849         (WebCore::FocusController::setActive):
2850         (WebCore::FocusController::setContentIsVisible):
2851         * page/FocusController.h:
2852         (WebCore::FocusController::isActive):
2853         (WebCore::FocusController::isFocused):
2854         * page/Page.cpp:
2855         (WebCore::Page::Page):
2856         (WebCore::Page::setIsInWindow):
2857         (WebCore::Page::setIsVisuallyIdle):
2858         (WebCore::Page::setIsVisible):
2859         (WebCore::Page::visibilityState):
2860         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2861         * page/Page.h:
2862         (WebCore::Page::isVisible):
2863         (WebCore::Page::isInWindow):
2864
2865 2014-01-21  Chris Fleizach  <cfleizach@apple.com>
2866
2867         AX: Mac: Expose the visible text of a password field to AX
2868         https://bugs.webkit.org/show_bug.cgi?id=127353
2869
2870         Reviewed by Brent Fulgham.
2871
2872         The Mac platform should now expose the rendered value of password fields through AX.
2873
2874         Test: accessibility/password-field-value.html
2875
2876         * accessibility/AccessibilityRenderObject.cpp:
2877         (WebCore::AccessibilityRenderObject::textLength):
2878         (WebCore::AccessibilityRenderObject::passwordFieldValue):
2879
2880 2014-01-21  Robert Sipka  <sipka@inf.u-szeged.hu>
2881
2882         Support SSL error handling in case of synchronous job.
2883         https://bugs.webkit.org/show_bug.cgi?id=125301
2884
2885         Reviewed by Brent Fulgham.
2886
2887         Set ssl error informations for the users.
2888
2889         * platform/network/curl/ResourceHandleManager.cpp:
2890         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2891
2892 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2893
2894         Export systemTotalMemory() and systemMemoryLevel() for MobileSafari
2895         https://bugs.webkit.org/show_bug.cgi?id=127360
2896
2897         Reviewed by Andy Estes.
2898         
2899         MobileSafari inappropriately calls these WebCore functions directly,
2900         so export them.
2901
2902         * WebCore.exp.in:
2903
2904 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2905
2906         Clean up PLATFORM(IOS) code related to the custom fixed position layout rect
2907         https://bugs.webkit.org/show_bug.cgi?id=127362
2908
2909         Reviewed by Dave Hyatt.
2910
2911         Various platforms customize the rect used to layout position:fixed elements,
2912         and each modified RenderBox::availableLogicalHeight/WidthUsing() in different
2913         ways.
2914         
2915         Clean this up by adding RenderView::clientLogicalWidth/HeightForFixedPosition(),
2916         and moving the platform hacks into it.
2917
2918         * rendering/RenderBox.cpp:
2919         (WebCore::RenderBox::availableLogicalHeightUsing):
2920         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2921         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2922         * rendering/RenderView.cpp:
2923         (WebCore::RenderView::clientLogicalWidthForFixedPosition):
2924         (WebCore::RenderView::clientLogicalHeightForFixedPosition):
2925         * rendering/RenderView.h:
2926
2927 2014-01-21  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2928
2929         ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
2930         <https://webkit.org/b/108184>
2931
2932         Reviewed by Philip Rogers.
2933
2934         In the case a SMILElement timing had a syncbase dependency on an indefinite value
2935         the assert were raised. The assert has been removed and a check has been added
2936         instead that prevents the addition of indefinite times to the time list.
2937
2938         Test: svg/animations/smil-syncbase-self-dependency.svg
2939
2940         * svg/animation/SVGSMILElement.cpp:
2941         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2942           ASSERT removed.
2943
2944 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2945
2946         Address late review naming comments after r162453.
2947
2948         * WebCore.xcodeproj/project.pbxproj:
2949         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2950         * platform/graphics/mac/CALayerWebAdditions.h: Removed.
2951         * platform/graphics/mac/CALayerWebAdditions.mm: Removed.
2952         * platform/graphics/mac/WebCoreCALayerExtras.h: Added.
2953         * platform/graphics/mac/WebCoreCALayerExtras.mm: Added.
2954         (-[CALayer web_disableAllActions]):
2955
2956 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2957
2958         Keep CALayer implicit animation disabling code in a single place
2959         https://bugs.webkit.org/show_bug.cgi?id=127355
2960
2961         Reviewed by Simon Fraser.
2962
2963         * WebCore.xcodeproj/project.pbxproj:
2964         Add CALayerWebAdditions.{h,mm}.
2965
2966         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2967         (PlatformCALayerMac::commonInit):
2968         Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.
2969
2970         * platform/graphics/mac/CALayerWebAdditions.h: Added.
2971         * platform/graphics/mac/CALayerWebAdditions.mm: Added.
2972         (-[CALayer web_disableAllActions]):
2973         Added. Disable all implicit actions on the layer.
2974
2975 2014-01-21  Gavin Barraclough  <barraclough@apple.com>
2976
2977         Change Page, FocusController to use ViewState
2978         https://bugs.webkit.org/show_bug.cgi?id=126533
2979
2980         Reviewed by Tim Horton.
2981
2982         These classes currently maintain a set of separate fields to represent the view state;
2983         combine these into a single field, and allow WebPage to send the combined update rather
2984         than individual changes.
2985
2986         Maintain existing interface for WebKit1 clients.
2987
2988         * WebCore.exp.in:
2989             - Added WebCore::setViewState, removed WebCore::setIsVisuallyIdle.
2990         * page/FocusController.cpp:
2991         (WebCore::FocusController::FocusController):
2992             - Initialize combined m_viewState.
2993         (WebCore::FocusController::setFocused):
2994             - Calls setViewState.
2995         (WebCore::FocusController::setFocusedInternal):
2996             - setFocused -> setFocusedInternal.
2997         (WebCore::FocusController::setViewState):
2998             - Added, update all ViewState flags.
2999         (WebCore::FocusController::setActive):
3000             - Calls setViewState.
3001         (WebCore::FocusController::setActiveInternal):
3002             - setActive -> setActiveInternal.
3003         (WebCore::FocusController::setContentIsVisible):
3004             - Calls setViewState.
3005         (WebCore::FocusController::setContentIsVisibleInternal):
3006             - setContentIsVisible -> setContentIsVisibleInternal.
3007         * page/FocusController.h:
3008         (WebCore::FocusController::isActive):
3009         (WebCore::FocusController::isFocused):
3010         (WebCore::FocusController::contentIsVisible):
3011             - Implemented in terms of ViewState.
3012         * page/Page.cpp:
3013         (WebCore::Page::Page):
3014             - Initialize using PageInitialViewState.
3015         (WebCore::Page::setIsInWindow):
3016             - Calls setViewState.
3017         (WebCore::Page::setIsInWindowInternal):
3018             - setIsInWindow -> setIsInWindowInternal.
3019         (WebCore::Page::setIsVisuallyIdleInternal):
3020             - setIsVisuallyIdle -> setIsVisuallyIdleInternal.
3021         (WebCore::Page::setViewState):
3022             - Added, update all ViewState flags, including FocusController.
3023         (WebCore::Page::setIsVisible):
3024             - Calls setViewState.
3025         (WebCore::Page::setIsVisibleInternal):
3026             - setIsVisible -> setIsVisibleInternal.
3027         (WebCore::Page::visibilityState):
3028             - m_isVisible -> isVisible()
3029         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
3030             - m_isVisible -> isVisible()
3031         * page/Page.h:
3032         (WebCore::Page::isVisible):
3033         (WebCore::Page::isInWindow):
3034             - Implemented in terms of ViewState.
3035         (WebCore::Page::scriptedAnimationsSuspended):
3036             - Combined member fields into ViewState::Flags.
3037
3038 2014-01-21  Lauro Neto  <lauro.neto@openbossa.org>
3039
3040         Remove PLATFORM(NIX) from WebCore
3041         https://bugs.webkit.org/show_bug.cgi?id=127299
3042
3043         Reviewed by Anders Carlsson.
3044
3045         * editing/Editor.cpp:
3046         (WebCore::Editor::cut):
3047         (WebCore::Editor::copy):
3048         (WebCore::Editor::copyImage):
3049         * editing/Editor.h:
3050         * html/HTMLCanvasElement.h:
3051         * loader/EmptyClients.h:
3052         * loader/FrameLoader.cpp:
3053         (WebCore::FrameLoader::defaultObjectContentType):
3054         * page/ChromeClient.h:
3055         * page/DragController.cpp:
3056         (WebCore::DragController::startDrag):
3057         * platform/Cursor.h:
3058         * platform/DragData.h:
3059         * platform/DragImage.h:
3060         * platform/FileSystem.h:
3061         * platform/LocalizedStrings.h:
3062         * platform/Widget.h:
3063         * platform/audio/FFTFrame.h:
3064         * platform/audio/HRTFElevation.cpp:
3065         * platform/cairo/WidgetBackingStore.h:
3066         * platform/graphics/ANGLEWebKitBridge.h:
3067         * platform/graphics/FontPlatformData.h:
3068         * platform/graphics/GLContext.cpp:
3069         (WebCore::GLContext::createContextForWindow):
3070         * platform/graphics/GLContext.h:
3071         * platform/graphics/GraphicsContext3D.h:
3072         * platform/graphics/GraphicsContext3DPrivate.cpp:
3073         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3074         * platform/graphics/OpenGLESShims.h:
3075         * platform/graphics/OpenGLShims.cpp:
3076         (WebCore::getProcAddress):
3077         * platform/graphics/OpenGLShims.h:
3078         * platform/graphics/PlatformLayer.h:
3079         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3080         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3081         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
3082         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
3083         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
3084         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
3085         (WebCore::Extensions3DOpenGL::supportsExtension):
3086         * platform/graphics/opengl/Extensions3DOpenGL.h:
3087         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3088         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3089         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3090         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3091         (WebCore::GraphicsContext3D::reshape):
3092         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
3093         * platform/graphics/texmap/TextureMapper.h:
3094         * platform/network/ResourceHandle.h:
3095         * plugins/PluginPackage.cpp:
3096         * plugins/PluginView.cpp:
3097         (WebCore::PluginView::PluginView):
3098         * plugins/PluginView.h:
3099         * plugins/PluginViewNone.cpp:
3100         * rendering/SimpleLineLayout.cpp:
3101         (WebCore::SimpleLineLayout::canUseFor):
3102
3103 2014-01-21  Eric Carlson  <eric.carlson@apple.com>
3104
3105         Add &lrm; &rlm; and &nbsp; to WebVTT parser
3106         https://bugs.webkit.org/show_bug.cgi?id=85112
3107
3108         Reviewed by Jer Noble.
3109
3110         No new tests, track-webvtt-tc022-entities.html was updated to test this.
3111
3112         * html/track/WebVTTTokenizer.cpp:
3113         (WebCore::WebVTTTokenizer::nextToken): Support RLM, LRM, and NBSP entities.
3114
3115 2014-01-21  Commit Queue  <commit-queue@webkit.org>
3116
3117         Unreviewed, rolling out r162354.
3118         http://trac.webkit.org/changeset/162354
3119         https://bugs.webkit.org/show_bug.cgi?id=127354
3120
3121         Appears to have broken accessibility in a non-trivial way
3122         (Requested by ap on #webkit).
3123
3124         * platform/ScrollView.cpp:
3125         (WebCore::ScrollView::updateScrollbars):
3126
3127 2014-01-21  Commit Queue  <commit-queue@webkit.org>
3128
3129         Unreviewed, rolling out r162445.
3130         http://trac.webkit.org/changeset/162445
3131         https://bugs.webkit.org/show_bug.cgi?id=127351
3132
3133         It broke the 32 bit GTK build (Requested by Ossy on #webkit).
3134
3135         * rendering/style/StyleRareInheritedData.cpp:
3136
3137 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
3138
3139         Wrong struct size when CSS_IMAGE_ORIENTATION and CSS3_TEXT_DECORATION are enabled.
3140         https://bugs.webkit.org/show_bug.cgi?id=127346
3141
3142         Efl build fix.
3143
3144         Reviewed by Csaba Osztrogonác.
3145
3146         * rendering/style/StyleRareInheritedData.cpp:
3147
3148 2014-01-21  Antti Koivisto  <antti@apple.com>
3149
3150         Delay initial layer flush during loading on all platforms
3151         https://bugs.webkit.org/show_bug.cgi?id=127347
3152
3153         Reviewed by Andreas Kling.
3154
3155         To reduce unnecessary repaints enable the same behaviour as iOS already has.
3156
3157         * rendering/RenderLayerCompositor.cpp:
3158         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3159         
3160             Set the initial state of m_layerFlushThrottlingEnabled correctly.
3161
3162         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
3163         (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded):
3164         * rendering/RenderLayerCompositor.h:
3165         
3166             Enable initial layer flush delay on all platforms.
3167
3168 2014-01-21  Mihai Tica  <mitica@adobe.com>
3169
3170         If you set a tiled cross-faded-image or a tiled gradient as
3171         a background layer, -webkit-background-blend-mode doesn't work.
3172         The problem consists in the blendMode parameter not being set
3173         for these specific drawing paths.
3174
3175         https://bugs.webkit.org/show_bug.cgi?id=126888
3176         Reviewed by Dirk Schulze.
3177
3178         Test: css3/compositing/background-blend-mode-tiled-layers.html
3179
3180         * platform/graphics/CrossfadeGeneratedImage.cpp:
3181         (WebCore::CrossfadeGeneratedImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
3182         * platform/graphics/GradientImage.cpp:
3183         (WebCore::GradientImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
3184         * platform/graphics/ImageBuffer.h: Add a BlendMode parameter to the drawPattern method.
3185         * platform/graphics/cairo/ImageBufferCairo.cpp:
3186         (WebCore::ImageBuffer::drawPattern): Add the default BlendMode parameter to the method declaration.
3187         * platform/graphics/cg/ImageBufferCG.cpp:
3188         (WebCore::ImageBuffer::drawPattern): Add and use the blendMode parameter for all the code paths.
3189         * platform/graphics/wince/ImageBufferWinCE.cpp:
3190         (WebCore::BufferedImage::drawPattern): Add the default BlendMode parameter to the method declaration.
3191
3192 2014-01-21  Gurpreet Kaur  <k.gurpreet@samsung.com>
3193
3194         The WebCore.vcxproj.filters doesnot apply
3195         https://bugs.webkit.org/show_bug.cgi?id=127338
3196
3197         Reviewed by Csaba Osztrogonác.
3198
3199         * WebCore.vcxproj/WebCore.vcxproj.filters:
3200         Modified the WebCore.vcxproj.filters so that it is applied when loading
3201         WebCore.vcxproj file.
3202
3203 2014-01-21  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3204
3205         Fix SVG animations which set rx or ry attributes
3206         https://bugs.webkit.org/show_bug.cgi?id=127337
3207
3208         Reviewed by Dirk Schulze.
3209
3210         Test: svg/stroke/animated-non-scaling-rxry.html
3211
3212         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=152376&view=revision
3213
3214         * rendering/svg/RenderSVGRect.cpp:
3215         (WebCore::RenderSVGRect::updateShapeFromElement):
3216         * rendering/svg/SVGPathData.cpp:
3217         (WebCore::updatePathFromRectElement):
3218
3219 2014-01-21  Krzysztof Czech  <k.czech@samsung.com>
3220
3221         [ATK] Expose aria-flowto through ATK_RELATION_FLOWS_TO
3222         https://bugs.webkit.org/show_bug.cgi?id=127291
3223
3224         Reviewed by Mario Sanchez Prada.
3225
3226         Test: accessibility/aria-flowto.html
3227
3228         Expose aria-flowto through ATK_RELATION_FLOWS_TO according to
3229         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
3230
3231         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3232         (setAtkRelationSetFromCoreObject):
3233
3234 2014-01-20  Ryuan Choi  <ryuan.choi@samsung.com>
3235
3236         [CMAKE] Remove Nix from CMake scripts
3237         https://bugs.webkit.org/show_bug.cgi?id=127264
3238
3239         Reviewed by Anders Carlsson.
3240
3241         * CMakeLists.txt:
3242
3243 2014-01-20  Anders Carlsson  <andersca@apple.com>
3244
3245         Remove an unused PageGroup function
3246         https://bugs.webkit.org/show_bug.cgi?id=127327
3247
3248         Reviewed by Andreas Kling.
3249
3250         * WebCore.exp.in:
3251         * page/PageGroup.cpp:
3252         * page/PageGroup.h:
3253
3254 2014-01-20  Anders Carlsson  <andersca@apple.com>
3255
3256         Move user style sheet handling to UserContentController
3257         https://bugs.webkit.org/show_bug.cgi?id=127322
3258         <rdar://problem/15861296>
3259
3260         Reviewed by Andreas Kling.
3261
3262         * dom/DocumentStyleSheetCollection.cpp:
3263         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
3264         * page/PageGroup.cpp:
3265         (WebCore::PageGroup::addUserStyleSheetToWorld):
3266         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
3267         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
3268         (WebCore::PageGroup::removeAllUserContent):
3269         * page/PageGroup.h:
3270         * page/UserContentController.cpp:
3271         (WebCore::UserContentController::addUserStyleSheet):
3272         (WebCore::UserContentController::removeUserStyleSheet):
3273         (WebCore::UserContentController::removeUserStyleSheets):
3274         (WebCore::UserContentController::removeAllUserContent):
3275         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
3276         * page/UserContentController.h:
3277         (WebCore::UserContentController::userStyleSheets):
3278
3279 2014-01-20  Benjamin Poulain  <benjamin@webkit.org>
3280
3281         Add a nicer way to iterate over all the attributes of an element
3282         https://bugs.webkit.org/show_bug.cgi?id=127266
3283
3284         Reviewed by Geoffrey Garen.
3285
3286         When using Element::attributeAt() in a loop, the compiler had to generate two kinds of
3287         accessor:
3288         -If the element data is unique, the length and data comes from the attribute Vector.
3289         -If the element data is shared, the data comes from the tail of elementData itself.
3290
3291         The choice was done for every access, which caused the assembly to be a little
3292         hard to follow.
3293         This patch unify the data access by doing everything as a array pointer with offset (getting
3294         that data from Vector when necessary).
3295
3296         To make it easier to do the right thing, a new iterator was added so that range-based loops
3297         can replace all the faulty cases.
3298
3299         * css/SelectorChecker.cpp:
3300         (WebCore::anyAttributeMatches):
3301         * css/SelectorChecker.h:
3302         (WebCore::SelectorChecker::checkExactAttribute):
3303         * dom/DatasetDOMStringMap.cpp:
3304         (WebCore::DatasetDOMStringMap::getNames):
3305         (WebCore::DatasetDOMStringMap::item):
3306         (WebCore::DatasetDOMStringMap::contains):
3307         * dom/Element.cpp:
3308         (WebCore::Element::normalizeAttributes):
3309         (WebCore::Element::detachAllAttrNodesFromElement):
3310         (WebCore::Element::cloneAttributesFromElement):
3311         * dom/Element.h:
3312         (WebCore::Element::attributesIterator):
3313         * dom/ElementData.cpp:
3314         (WebCore::ElementData::isEquivalent):
3315         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
3316         * dom/ElementData.h:
3317         (WebCore::AttributeConstIterator::AttributeConstIterator):
3318         (WebCore::AttributeConstIterator::operator*):
3319         (WebCore::AttributeConstIterator::operator->):
3320         (WebCore::AttributeConstIterator::operator++):
3321         (WebCore::AttributeConstIterator::operator==):
3322         (WebCore::AttributeConstIterator::operator!=):
3323         (WebCore::AttributeIteratorAccessor::AttributeIteratorAccessor):
3324         (WebCore::AttributeIteratorAccessor::begin):
3325         (WebCore::AttributeIteratorAccessor::end):
3326         (WebCore::ElementData::attributesIterator):
3327         * dom/Node.cpp:
3328         (WebCore::Node::isDefaultNamespace):
3329         (WebCore::Node::lookupNamespaceURI):
3330         (WebCore::Node::lookupNamespacePrefix):
3331         (WebCore::Node::compareDocumentPosition):
3332         * dom/StyledElement.cpp:
3333         (WebCore::StyledElement::makePresentationAttributeCacheKey):
3334         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3335         * editing/MarkupAccumulator.cpp:
3336         (WebCore::MarkupAccumulator::appendElement):
3337         * editing/markup.cpp:
3338         (WebCore::completeURLs):
3339         (WebCore::StyledMarkupAccumulator::appendElement):
3340         * html/HTMLEmbedElement.cpp:
3341         (WebCore::HTMLEmbedElement::parametersForPlugin):
3342         * html/HTMLObjectElement.cpp:
3343         (WebCore::HTMLObjectElement::parametersForPlugin):
3344         * inspector/DOMPatchSupport.cpp:
3345         (WebCore::DOMPatchSupport::innerPatchNode):
3346         (WebCore::DOMPatchSupport::createDigest):
3347         * inspector/InspectorDOMAgent.cpp:
3348         (WebCore::InspectorDOMAgent::setAttributesAsText):
3349         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3350         * inspector/InspectorNodeFinder.cpp:
3351         (WebCore::InspectorNodeFinder::matchesElement):
3352         * page/PageSerializer.cpp:
3353         (WebCore::isCharsetSpecifyingNode):
3354         * xml/XPathNodeSet.cpp:
3355         (WebCore::XPath::NodeSet::traversalSort):
3356         * xml/XPathStep.cpp:
3357         (WebCore::XPath::Step::nodesInAxis):
3358         * xml/parser/XMLDocumentParserLibxml2.cpp:
3359         (WebCore::XMLDocumentParser::XMLDocumentParser):
3360
3361 2014-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3362
3363         Do refactor in collectGradientAttributes() and renderStyleForLengthResolve()
3364         https://bugs.webkit.org/show_bug.cgi?id=126869
3365
3366         Reviewed by Dirk Schulze.
3367
3368         Some SVG functions have done a first iteration by using a boolean flag. This is
3369         one of poor implementations. This patch fix it by extracting a logic into a new method.
3370         Additionally it would be good to use do-while() loop instead of using while() in
3371         renderStyleForLengthResolving() because a first condition is always true.
3372
3373         Merge r165358 from blink.
3374
3375         * svg/SVGLengthContext.cpp:
3376         (WebCore::renderStyleForLengthResolving):
3377         * svg/SVGLinearGradientElement.cpp:
3378         (WebCore::setGradientAttributes):
3379         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
3380         * svg/SVGRadialGradientElement.cpp:
3381         (WebCore::setGradientAttributes):
3382         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
3383
3384 2014-01-20  Anders Carlsson  <andersca@apple.com>
3385
3386         UserContentController should keep track of user scripts
3387         https://bugs.webkit.org/show_bug.cgi?id=127317
3388         <rdar://problem/15861296>
3389
3390         Reviewed by Andreas Kling.
3391
3392         Move handling of user scripts from PageGroup to UserContentController.
3393
3394         * page/Frame.cpp:
3395         (WebCore::Frame::injectUserScripts):
3396         * page/PageGroup.cpp:
3397         (WebCore::PageGroup::addUserScriptToWorld):
3398         (WebCore::PageGroup::removeUserScriptFromWorld):
3399         (WebCore::PageGroup::removeUserScriptsFromWorld):
3400         (WebCore::PageGroup::removeAllUserContent):
3401         * page/PageGroup.h:
3402         * page/UserContentController.cpp:
3403         (WebCore::UserContentController::addUserScript):
3404         (WebCore::UserContentController::removeUserScript):
3405         (WebCore::UserContentController::removeUserScripts):
3406         (WebCore::UserContentController::removeAllUserContent):
3407         * page/UserContentController.h:
3408         (WebCore::UserContentController::userScripts):
3409
3410 2014-01-20  Anders Carlsson  <andersca@apple.com>
3411
3412         Give each page a UserContentController
3413         https://bugs.webkit.org/show_bug.cgi?id=127315
3414         <rdar://problem/15861296>
3415
3416         Reviewed by Andreas Kling.
3417
3418         Add a UserContentController object to PageGroup and have the page group set it on any
3419         pages that are added to the page group.
3420
3421         This is another step towards moving handling of user content away from PageGroup and make it
3422         possible for each page to have different user content.
3423
3424         * page/Page.cpp:
3425         (WebCore::Page::~Page):
3426         (WebCore::Page::setUserContentController):
3427         * page/Page.h:
3428         (WebCore::Page::userContentController):
3429         * page/PageGroup.cpp:
3430         (WebCore::PageGroup::PageGroup):
3431         (WebCore::PageGroup::addPage):
3432         (WebCore::PageGroup::removePage):
3433         * page/PageGroup.h:
3434         * page/UserContentController.cpp:
3435         (WebCore::UserContentController::addPage):
3436         (WebCore::UserContentController::removePage):
3437         * page/UserContentController.h:
3438
3439 2014-01-20  Jeremy Jones  <jeremyj@apple.com>
3440
3441         Add AVKit fullscreen video interface.
3442         https://bugs.webkit.org/show_bug.cgi?id=126818
3443
3444         Reviewed by Eric Carlson.
3445
3446         No new tests, no observable change in functionality.
3447
3448         * WebCore.exp.in:
3449         * WebCore.xcodeproj/project.pbxproj:
3450         * html/HTMLMediaElement.cpp:
3451         (WebCore::HTMLMediaElement::parseAttribute):
3452         * html/HTMLMediaElement.h:
3453         Add ability for fullscreen to borrow the AVPlayerLayer.
3454         * page/Settings.cpp:
3455         * page/Settings.h:
3456         (WebCore::Settings::setMediaPlaybackFullscreenAVKit):
3457         (WebCore::Settings::mediaPlaybackFullscreenAVKit):
3458         Add a disabled setting.
3459         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3460         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
3461         Enabled fullscreen for iOS.
3462         * platform/ios/WebVideoFullscreenControllerAVKit.h: Added.
3463         * platform/ios/WebVideoFullscreenControllerAVKit.mm: Added.
3464         (-[WebAVPlayerController init]):
3465         (-[WebAVPlayerController dealloc]):
3466         (-[WebAVPlayerController forwardingTargetForSelector:]):
3467         (-[WebAVPlayerController shouldDismissForDone]):
3468         (-[WebAVPlayerController play:]):
3469         (-[WebAVPlayerController pause:]):
3470         (-[WebAVPlayerController togglePlayback:]):
3471         (-[WebAVPlayerController isPlaying]):
3472         (-[WebAVPlayerController setPlaying:]):
3473         (+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
3474         (-[WebAVPlayerController seekToTime:]):
3475         (-[WebAVPlayerController updateTimingWithCurrentTime:]):
3476         (-[WebAVPlayerController effectiveRate]):
3477         (-[WebAVPlayerController setMediaElement:]):
3478         (-[WebAVPlayerController handleEvent:]):
3479         (-[WebVideoFullscreenController init]):
3480         (-[WebVideoFullscreenController dealloc]):
3481         (-[WebVideoFullscreenController setMediaElement:]):
3482         (-[WebVideoFullscreenController mediaElement]):
3483         (-[WebVideoFullscreenController enterFullscreen:]):
3484         (-[WebVideoFullscreenController exitFullscreen]):
3485         Add WebAVPlayerController for HTMLMediaElememt to interface with AVPlayerViewController.
3486
3487 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3488
3489         Replace uses of std::forward<T>(), std::unique_ptr<T>::clear() that landed in r162368
3490         https://bugs.webkit.org/show_bug.cgi?id=127306
3491
3492         Reviewed by Darin Adler.
3493
3494         Address the post-landing reviews of the r162368 commit that moved WebAudio source code to using std::unique_ptr.
3495         std::move() should be used instead of std::forward<T>() in HRTFKernel::create().
3496         Instead of calling std::unique_ptr<T>::reset(), nullptr should be assigned to that smart pointer to reset it.
3497
3498         * Modules/webaudio/ConvolverNode.cpp:
3499         (WebCore::ConvolverNode::uninitialize):
3500         * Modules/webaudio/DynamicsCompressorNode.cpp:
3501         (WebCore::DynamicsCompressorNode::uninitialize):
3502         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3503         (WebCore::MediaElementAudioSourceNode::setFormat):
3504         * Modules/webaudio/PannerNode.cpp:
3505         (WebCore::PannerNode::uninitialize):
3506         * platform/audio/AudioChannel.h:
3507         (WebCore::AudioChannel::set):
3508         * platform/audio/HRTFDatabaseLoader.cpp:
3509         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3510         * platform/audio/HRTFKernel.h:
3511         (WebCore::HRTFKernel::create):
3512
3513 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3514
3515         Modernize WebCore/inspector with nullptr
3516         https://bugs.webkit.org/show_bug.cgi?id=127303
3517
3518         Reviewed by Anders Carlsson.
3519
3520         Ran clang-modernize -use-nullptr over WebCore/inspector.
3521
3522         * inspector/ConsoleMessage.cpp:
3523         (WebCore::ConsoleMessage::ConsoleMessage):
3524         * inspector/ConsoleMessage.h:
3525         * inspector/ContentSearchUtils.cpp:
3526         (WebCore::ContentSearchUtils::findMagicComment):
3527         * inspector/DOMEditor.cpp:
3528         (WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction):
3529         * inspector/DOMPatchSupport.cpp:
3530         (WebCore::DOMPatchSupport::patchDocument):
3531         (WebCore::DOMPatchSupport::patchNode):
3532         (WebCore::DOMPatchSupport::diff):
3533         (WebCore::DOMPatchSupport::innerPatchChildren):
3534         * inspector/InspectorApplicationCacheAgent.cpp:
3535         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3536         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
3537         * inspector/InspectorCanvasAgent.cpp:
3538         (WebCore::InspectorCanvasAgent::disable):
3539         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
3540         (WebCore::InspectorCanvasAgent::frameNavigated):
3541         * inspector/InspectorConsoleAgent.cpp:
3542         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
3543         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
3544         (WebCore::InspectorConsoleAgent::clearMessages):
3545         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
3546         (WebCore::InspectorConsoleAgent::didReceiveResponse):
3547         (WebCore::InspectorConsoleAgent::didFailLoading):
3548         * inspector/InspectorConsoleAgent.h:
3549         * inspector/InspectorController.cpp:
3550         (WebCore::InspectorController::inspectedPageDestroyed):
3551         * inspector/InspectorDOMDebuggerAgent.cpp:
3552         (WebCore::InspectorDOMDebuggerAgent::disable):
3553         (WebCore::InspectorDOMDebuggerAgent::discardAgent):
3554         * inspector/InspectorDOMStorageAgent.cpp:
3555         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
3556         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
3557         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
3558         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3559         * inspector/InspectorDatabaseAgent.cpp:
3560         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
3561         (WebCore::InspectorDatabaseAgent::findByFileName):
3562         (WebCore::InspectorDatabaseAgent::databaseForId):
3563         * inspector/InspectorDebuggerAgent.cpp:
3564         (WebCore::InspectorDebuggerAgent::addMessageToConsole):
3565         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3566         (WebCore::InspectorDebuggerAgent::didParseSource):
3567         (WebCore::InspectorDebuggerAgent::didContinue):
3568         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
3569         * inspector/InspectorFrontendHost.cpp:
3570         (WebCore::FrontendMenuProvider::disconnect):
3571         (WebCore::InspectorFrontendHost::InspectorFrontendHost):
3572         (WebCore::InspectorFrontendHost::disconnectClient):
3573         * inspector/InspectorHeapProfilerAgent.cpp:
3574         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
3575         * inspector/InspectorIndexedDBAgent.cpp:
3576         (WebCore::assertDocument):
3577         (WebCore::assertIDBFactory):
3578         (WebCore::InspectorIndexedDBAgent::requestData):
3579         * inspector/InspectorInstrumentation.cpp:
3580         (WebCore::frameForScriptExecutionContext):
3581         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
3582         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
3583         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
3584         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
3585         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
3586         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
3587         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
3588         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
3589         * inspector/InspectorInstrumentation.h:
3590         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3591         (WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
3592         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
3593         * inspector/InspectorLayerTreeAgent.cpp:
3594         (WebCore::InspectorLayerTreeAgent::disable):
3595         * inspector/InspectorNodeFinder.cpp:
3596         (WebCore::InspectorNodeFinder::searchUsingXPath):
3597         * inspector/InspectorOverlay.cpp:
3598         (WebCore::buildObjectForElementInfo):
3599         * inspector/InspectorPageAgent.cpp:
3600         (WebCore::InspectorPageAgent::cachedResourceContent):
3601         (WebCore::InspectorPageAgent::sharedBufferContent):
3602         (WebCore::InspectorPageAgent::disable):
3603         (WebCore::InspectorPageAgent::frameForId):
3604         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
3605         * inspector/InspectorProfilerAgent.cpp:
3606         (WebCore::InspectorProfilerAgent::~InspectorProfilerAgent):
3607         * inspector/InspectorProfilerAgent.h:
3608         * inspector/InspectorResourceAgent.cpp:
3609         (WebCore::buildObjectForResourceResponse):
3610         (WebCore::InspectorResourceAgent::willSendRequest):
3611         (WebCore::InspectorResourceAgent::didReceiveResponse):
3612         (WebCore::InspectorResourceAgent::didFinishLoading):
3613         (WebCore::InspectorResourceAgent::didFailLoading):
3614         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3615         (WebCore::InspectorResourceAgent::disable):
3616         * inspector/InspectorRuntimeAgent.cpp:
3617         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3618         * inspector/InspectorStyleSheet.cpp:
3619         (ParsedStyleSheet::ruleSourceDataAt):
3620         (WebCore::buildSourceRangeObject):
3621         (WebCore::asCSSRuleList):
3622         (WebCore::fillMediaListChain):
3623         (WebCore::InspectorStyle::setPropertyText):
3624         (WebCore::InspectorStyle::populateAllProperties):
3625         (WebCore::InspectorStyle::extractSourceData):
3626         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
3627         (WebCore::InspectorStyleSheet::addRule):
3628         (WebCore::InspectorStyleSheet::ruleForId):
3629         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3630         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3631         (WebCore::InspectorStyleSheet::buildObjectForRule):
3632         (WebCore::InspectorStyleSheet::styleForId):
3633         (WebCore::InspectorStyleSheet::inspectorStyleForId):
3634         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3635         * inspector/InspectorStyleSheet.h:
3636         (WebCore::InspectorCSSId::asProtocolValue):
3637         * inspector/InspectorTimelineAgent.cpp:
3638         (WebCore::InspectorTimelineAgent::stop):
3639         (WebCore::InspectorTimelineAgent::willComposite):
3640         (WebCore::InspectorTimelineAgent::page):
3641         * inspector/InspectorWorkerAgent.cpp:
3642         (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent):
3643         * inspector/InstrumentingAgents.cpp:
3644         (WebCore::InstrumentingAgents::InstrumentingAgents):
3645         (WebCore::InstrumentingAgents::reset):
3646         * inspector/NetworkResourcesData.cpp:
3647         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
3648         (WebCore::NetworkResourcesData::xhrReplayData):
3649         (WebCore::NetworkResourcesData::removeCachedResource):
3650         (WebCore::NetworkResourcesData::resourceDataForRequestId):
3651         * inspector/PageConsoleAgent.cpp:
3652         (WebCore::PageConsoleAgent::~PageConsoleAgent):
3653         * inspector/PageDebuggerAgent.cpp:
3654         (WebCore::PageDebuggerAgent::disable):
3655         * inspector/PageRuntimeAgent.cpp:
3656         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
3657         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
3658         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3659         * inspector/ScriptArguments.cpp:
3660         (WebCore::ScriptArguments::globalState):
3661         * inspector/WorkerRuntimeAgent.cpp:
3662         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
3663
3664 2014-01-20  Anders Carlsson  <andersca@apple.com>
3665
3666         Add empty UserContentController class
3667         https://bugs.webkit.org/show_bug.cgi?id=127300
3668         <rdar://problem/15861296>
3669
3670         Reviewed by Dan Bernstein.
3671
3672         This is the first step towards moving handling of user scripts and style sheets from
3673         the page group to a separate objects and ultimately make them be settable per page instead of per page group.
3674
3675         * CMakeLists.txt:
3676         * GNUmakefile.list.am:
3677         * WebCore.vcxproj/WebCore.vcxproj:
3678         * WebCore.vcxproj/WebCore.vcxproj.filters:
3679         * WebCore.xcodeproj/project.pbxproj:
3680         * page/UserContentController.cpp: Added.
3681         (WebCore::UserContentController::create):
3682         (WebCore::UserContentController::UserContentController):
3683         (WebCore::UserContentController::~UserContentController):
3684         * page/UserContentController.h: Added.
3685
3686 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3687
3688         Run clang-modernize and let it add a bunch of missing overrides in WebCore/inspector
3689         https://bugs.webkit.org/show_bug.cgi?id=127206
3690
3691         Reviewed by Anders Carlsson.
3692
3693         Let clang-modernize add overrides.
3694
3695         * inspector/DOMEditor.cpp:
3696         * inspector/InspectorApplicationCacheAgent.h:
3697         * inspector/InspectorCSSAgent.h:
3698         * inspector/InspectorCanvasAgent.h:
3699         * inspector/InspectorConsoleAgent.h:
3700         * inspector/InspectorDOMAgent.h:
3701         * inspector/InspectorDOMDebuggerAgent.h:
3702         * inspector/InspectorDOMStorageAgent.h:
3703         * inspector/InspectorDatabaseAgent.cpp:
3704         * inspector/InspectorDatabaseAgent.h:
3705         * inspector/InspectorDebuggerAgent.h:
3706         * inspector/InspectorFrontendHost.cpp:
3707         * inspector/InspectorHeapProfilerAgent.cpp:
3708         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3709         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3710         * inspector/InspectorHeapProfilerAgent.h:
3711         * inspector/InspectorHistory.cpp:
3712         * inspector/InspectorIndexedDBAgent.cpp:
3713         * inspector/InspectorIndexedDBAgent.h:
3714         * inspector/InspectorInputAgent.h:
3715         * inspector/InspectorLayerTreeAgent.h:
3716         * inspector/InspectorMemoryAgent.h:
3717         * inspector/InspectorPageAgent.h:
3718         * inspector/InspectorProfilerAgent.cpp:
3719         * inspector/InspectorProfilerAgent.h:
3720         * inspector/InspectorResourceAgent.h:
3721         * inspector/InspectorRuntimeAgent.h:
3722         * inspector/InspectorStyleSheet.h:
3723         * inspector/InspectorTimelineAgent.h:
3724         * inspector/InspectorWorkerAgent.cpp:
3725         * inspector/InspectorWorkerAgent.h:
3726         * inspector/PageConsoleAgent.h:
3727         * inspector/PageDebuggerAgent.h:
3728         * inspector/PageRuntimeAgent.h:
3729         * inspector/WorkerConsoleAgent.h:
3730         * inspector/WorkerDebuggerAgent.cpp:
3731         * inspector/WorkerInspectorController.cpp:
3732         * inspector/WorkerRuntimeAgent.h:
3733
3734 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3735
3736         Move WebAudio source code to std::unique_ptr
3737         https://bugs.webkit.org/show_bug.cgi?id=127274
3738
3739         Reviewed by Eric Carlson.
3740
3741         Move from using OwnPtr and PassOwnPtr to using std::unique_ptr and move semantics
3742         in the WebAudio module and the WebAudio code in the platform layer.
3743
3744         * Modules/webaudio/AsyncAudioDecoder.cpp:
3745         * Modules/webaudio/AsyncAudioDecoder.h:
3746         * Modules/webaudio/AudioBasicInspectorNode.cpp:
3747         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
3748         * Modules/webaudio/AudioBasicProcessorNode.cpp:
3749         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
3750         * Modules/webaudio/AudioBasicProcessorNode.h:
3751         * Modules/webaudio/AudioBufferSourceNode.cpp:
3752         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3753         * Modules/webaudio/AudioContext.cpp:
3754         * Modules/webaudio/AudioContext.h:
3755         * Modules/webaudio/AudioDestinationNode.cpp:
3756         (WebCore::AudioDestinationNode::AudioDestinationNode):
3757         * Modules/webaudio/AudioNode.cpp:
3758         (WebCore::AudioNode::addInput):
3759         (WebCore::AudioNode::addOutput):
3760         (WebCore::AudioNode::checkNumberOfChannelsForInput):
3761         * Modules/webaudio/AudioNode.h:
3762         * Modules/webaudio/BiquadFilterNode.cpp:
3763         (WebCore::BiquadFilterNode::BiquadFilterNode):
3764         * Modules/webaudio/BiquadProcessor.cpp:
3765         (WebCore::BiquadProcessor::createKernel):
3766         (WebCore::BiquadProcessor::getFrequencyResponse):
3767         * Modules/webaudio/BiquadProcessor.h:
3768         * Modules/webaudio/ChannelMergerNode.cpp:
3769         (WebCore::ChannelMergerNode::ChannelMergerNode):
3770         * Modules/webaudio/ChannelSplitterNode.cpp:
3771         (WebCore::ChannelSplitterNode::ChannelSplitterNode):
3772         * Modules/webaudio/ConvolverNode.cpp:
3773         (WebCore::ConvolverNode::ConvolverNode):
3774         (WebCore::ConvolverNode::uninitialize):
3775         (WebCore::ConvolverNode::setBuffer):
3776         * Modules/webaudio/ConvolverNode.h:
3777         * Modules/webaudio/DefaultAudioDestinationNode.h:
3778         * Modules/webaudio/DelayNode.cpp:
3779         (WebCore::DelayNode::DelayNode):
3780         * Modules/webaudio/DelayProcessor.cpp:
3781         (WebCore::DelayProcessor::createKernel):
3782         * Modules/webaudio/DelayProcessor.h:
3783         * Modules/webaudio/DynamicsCompressorNode.cpp:
3784         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
3785         (WebCore::DynamicsCompressorNode::initialize):
3786         (WebCore::DynamicsCompressorNode::uninitialize):
3787         * Modules/webaudio/DynamicsCompressorNode.h:
3788         * Modules/webaudio/GainNode.cpp:
3789         (WebCore::GainNode::GainNode):
3790         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3791         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3792         (WebCore::MediaElementAudioSourceNode::setFormat):
3793         * Modules/webaudio/MediaElementAudioSourceNode.h:
3794         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3795         * Modules/webaudio/MediaStreamAudioSource.cpp:
3796         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3797         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
3798         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3799         * Modules/webaudio/OscillatorNode.cpp:
3800         (WebCore::OscillatorNode::OscillatorNode):
3801         * Modules/webaudio/PannerNode.cpp:
3802         (WebCore::PannerNode::PannerNode):
3803         (WebCore::PannerNode::uninitialize):
3804         (WebCore::PannerNode::setPanningModel):
3805         * Modules/webaudio/PannerNode.h:
3806         * Modules/webaudio/PeriodicWave.cpp:
3807         (WebCore::PeriodicWave::createBandLimitedTables):
3808         * Modules/webaudio/PeriodicWave.h:
3809         * Modules/webaudio/RealtimeAnalyser.cpp:
3810         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
3811         (WebCore::RealtimeAnalyser::setFftSize):
3812         * Modules/webaudio/RealtimeAnalyser.h:
3813         * Modules/webaudio/ScriptProcessorNode.cpp:
3814         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
3815         * Modules/webaudio/WaveShaperDSPKernel.cpp:
3816         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
3817         * Modules/webaudio/WaveShaperDSPKernel.h:
3818         * Modules/webaudio/WaveShaperNode.cpp:
3819         (WebCore::WaveShaperNode::WaveShaperNode):
3820         * Modules/webaudio/WaveShaperProcessor.cpp:
3821         (WebCore::WaveShaperProcessor::createKernel):
3822         * Modules/webaudio/WaveShaperProcessor.h:
3823         * platform/audio/AudioBus.cpp:
3824         (WebCore::AudioBus::AudioBus):
3825         (WebCore::AudioBus::copyWithGainFrom):
3826         * platform/audio/AudioBus.h:
3827         * platform/audio/AudioChannel.cpp:
3828         * platform/audio/AudioChannel.h:
3829         (WebCore::AudioChannel::AudioChannel):
3830         (WebCore::AudioChannel::set):
3831         * platform/audio/AudioDSPKernelProcessor.h:
3832         * platform/audio/AudioDestination.h:
3833         * platform/audio/AudioResampler.cpp:
3834         (WebCore::AudioResampler::AudioResampler):
3835         (WebCore::AudioResampler::configureChannels):
3836         * platform/audio/AudioResampler.h:
3837         * platform/audio/AudioSession.h:
3838         * platform/audio/DynamicsCompressor.cpp:
3839         (WebCore::DynamicsCompressor::setNumberOfChannels):
3840         * platform/audio/DynamicsCompressor.h:
3841         * platform/audio/DynamicsCompressorKernel.cpp:
3842         (WebCore::DynamicsCompressorKernel::setNumberOfChannels):
3843         * platform/audio/DynamicsCompressorKernel.h:
3844         * platform/audio/FFTFrame.cpp:
3845         (WebCore::FFTFrame::createInterpolatedFrame):
3846         * platform/audio/FFTFrame.h:
3847         * platform/audio/HRTFDatabase.cpp:
3848         (WebCore::HRTFDatabase::HRTFDatabase):
3849         * platform/audio/HRTFDatabase.h:
3850         * platform/audio/HRTFDatabaseLoader.cpp:
3851         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3852         (WebCore::HRTFDatabaseLoader::load):
3853         * platform/audio/HRTFDatabaseLoader.h:
3854         * platform/audio/HRTFElevation.cpp:
3855         (WebCore::HRTFElevation::createForSubject):
3856         (WebCore::HRTFElevation::createByInterpolatingSlices):
3857         * platform/audio/HRTFElevation.h:
3858         (WebCore::HRTFElevation::HRTFElevation):
3859         * platform/audio/HRTFKernel.cpp:
3860         (WebCore::HRTFKernel::HRTFKernel):
3861         (WebCore::HRTFKernel::createImpulseResponse):
3862         (WebCore::HRTFKernel::createInterpolatedKernel):
3863         * platform/audio/HRTFKernel.h:
3864         (WebCore::HRTFKernel::create):
3865         (WebCore::HRTFKernel::HRTFKernel):
3866         * platform/audio/MultiChannelResampler.cpp:
3867         (WebCore::MultiChannelResampler::MultiChannelResampler):
3868         * platform/audio/MultiChannelResampler.h:
3869         * platform/audio/Panner.cpp:
3870         (WebCore::Panner::create):
3871         * platform/audio/Panner.h:
3872         * platform/audio/Reverb.cpp:
3873         (WebCore::Reverb::initialize):
3874         * platform/audio/Reverb.h:
3875         * platform/audio/ReverbConvolver.h:
3876         * platform/audio/ReverbConvolverStage.cpp:
3877         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
3878         * platform/audio/ReverbConvolverStage.h:
3879         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3880         (WebCore::AudioDestination::create):
3881         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3882         * platform/audio/ios/AudioDestinationIOS.cpp:
3883         (WebCore::AudioDestination::create):
3884         * platform/audio/ios/AudioSessionIOS.mm:
3885         (WebCore::AudioSession::AudioSession):
3886         * platform/audio/mac/AudioDestinationMac.cpp:
3887         (WebCore::AudioDestination::create):
3888         * platform/audio/mac/AudioDestinationMac.h:
3889         * platform/audio/mac/AudioSessionMac.cpp:
3890         (WebCore::AudioSession::AudioSession):
3891
3892 2014-01-20  Morten Stenshorne  <mstensho@opera.com>
3893
3894         Region based multicol: support explicit column breaks
3895         https://bugs.webkit.org/show_bug.cgi?id=123993
3896
3897         Reviewed by David Hyatt.
3898
3899         Merely supporting insertion of explicit (forced) column breaks in
3900         the region based multicol implementation is really simple: just
3901         hook up with what the CSS regions code is already doing.
3902
3903         However, there is one complication: column balancing. In order to
3904         balance columns as nicely as possible when there are explicit
3905         breaks, we need to figure out between which explicit breaks the
3906         implicit breaks will occur (if there's room for any at all).
3907
3908         Tests: fast/multicol/newmulticol/break-after.html
3909                fast/multicol/newmulticol/break-before.html
3910                fast/multicol/newmulticol/breaks-2-columns-3-no-balancing.html
3911                fast/multicol/newmulticol/breaks-2-columns-3.html
3912                fast/multicol/newmulticol/breaks-3-columns-3.html
3913                fast/multicol/newmulticol/fixed-height-fill-balance-2.html
3914
3915         * rendering/RenderBlockFlow.cpp:
3916         (WebCore::RenderBlockFlow::applyBeforeBreak):
3917         (WebCore::RenderBlockFlow::applyAfterBreak): Use the already
3918         existing region breaking code when inserting breaks in region
3919         based multicol.
3920         * rendering/RenderFlowThread.h:
3921         * rendering/RenderMultiColumnBlock.cpp:
3922         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3923         (WebCore::RenderMultiColumnBlock::relayoutForPagination): Avoid
3924         re-balancing if the multicol's contents were not laid out. Apart
3925         from being good for performance, this is now necessary because of
3926         how explicit breaks are implemented.
3927         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
3928         Detect if the contents are going to be laid out, or skipped, so
3929         that we can tell if we need to (re-)balance the columns
3930         afterwards.
3931         * rendering/RenderMultiColumnBlock.h:
3932         * rendering/RenderMultiColumnFlowThread.cpp:
3933         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
3934         Locate the appropriate multi-column set and call its
3935         addForcedBreak().
3936         * rendering/RenderMultiColumnFlowThread.h:
3937         * rendering/RenderMultiColumnSet.cpp:
3938         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3939         (WebCore::RenderMultiColumnSet::findRunWithTallestColumns):
3940         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks): Figure
3941         out how many implicit breaks each single "content run" should
3942         contain. The taller the content run, the more implicit breaks.
3943         (WebCore::RenderMultiColumnSet::calculateBalancedHeight): This is
3944         now a const method that only does half of what the old
3945         calculateBalancedHeight() did. The rest (such as actually storing
3946         the new column height) is done by recalculateBalancedHeight().
3947         (WebCore::RenderMultiColumnSet::clearForcedBreaks): Needs to be
3948         called between each layout pass, to clear the list of "content
3949         runs".
3950         (WebCore::RenderMultiColumnSet::addForcedBreak): Only useful when
3951         columns are to be balanced. It receives explicit (forced) breaks
3952         and stores them as "content runs". When layout is done, we'll go
3953         through the list of content runs, and see where implicit breaks
3954         should be inserted (if there's room for any). The goal is to
3955         insert implicit breaks in such a way that the final columns become
3956         as short as possible.
3957         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
3958         Calculates and sets a new balanced column height. This used to be
3959         done directly in calculateBalancedHeight(), but that method is now
3960         const and it now only calculates the new height and returns it.
3961         (WebCore::RenderMultiColumnSet::prepareForLayout):
3962         * rendering/RenderMultiColumnSet.h: Remove old data members
3963         intended for forced breaks (they were unused), and introduce a
3964         "content run" vector instead. A new content run is triggered by an
3965         explicit break. This is only used when column balancing is
3966         enabled. When not balanced, RenderMultiColumnSet doesn't need to
3967         do anything when explicit breaks are inserted.
3968
3969 2014-01-20  Eric Carlson  <eric.carlson@apple.com>
3970
3971         Allow MediaSessionManager to restrict 'preload' behavior
3972         https://bugs.webkit.org/show_bug.cgi?id=127297
3973
3974         Reviewed by Jer Noble.
3975
3976         Tests: media/video-restricted-no-preload-auto.html
3977                media/video-restricted-no-preload-metadata.html
3978
3979         * html/HTMLMediaElement.cpp:
3980         (WebCore::HTMLMediaElement::parseAttribute): Apply restrictions to preload attribute before
3981             passing to media engine.
3982         (WebCore::HTMLMediaElement::loadResource): Ditto.
3983
3984         * html/HTMLMediaSession.cpp:
3985         (WebCore::HTMLMediaSession::effectivePreloadForElement): New, limit preload according to restrictions.
3986         * html/HTMLMediaSession.h:
3987
3988         * platform/audio/MediaSessionManager.h:
3989         * platform/audio/ios/MediaSessionManagerIOS.mm:
3990         (WebCore::MediaSessionManageriOS::resetRestrictions): Limit preload to metadata only. Drive-by
3991             static deviceClass initialization cleanup.
3992
3993         * testing/Internals.cpp:
3994         (WebCore::Internals::setMediaSessionRestrictions): Support MetadataPreloadingNotPermitted and
3995             AutoPreloadingNotPermitted.
3996
3997 2014-01-20  Andreas Kling  <akling@apple.com>
3998
3999         Let RenderImage construct its RenderImageResource.
4000         <https://webkit.org/b/127290>
4001
4002         Everyone who creates a RenderImage immediately follows up with
4003         creating a RenderImageResource and assigning it to the image.
4004
4005         Let the RenderImage constructor do this instead, and make the
4006         imageResource() accessors return references. This exposed a
4007         number of unnecessary null checks.
4008
4009         Also modernized the touched code with std::unique_ptr.
4010
4011         Reviewed by Antti Koivisto.
4012
4013         * html/HTMLImageElement.cpp:
4014         (WebCore::HTMLImageElement::createElementRenderer):
4015         (WebCore::HTMLImageElement::didAttachRenderers):
4016         * html/HTMLPlugInImageElement.cpp:
4017         (WebCore::HTMLPlugInImageElement::createElementRenderer):
4018         * html/HTMLVideoElement.cpp:
4019         (WebCore::HTMLVideoElement::didAttachRenderers):
4020         (WebCore::HTMLVideoElement::parseAttribute):
4021         * html/ImageInputType.cpp:
4022         (WebCore::ImageInputType::createInputRenderer):
4023         (WebCore::ImageInputType::attach):
4024         * loader/ImageLoader.cpp:
4025         (WebCore::ImageLoader::renderImageResource):
4026         * rendering/RenderElement.cpp:
4027         (WebCore::RenderElement::createFor):
4028         * rendering/RenderImage.cpp:
4029         (WebCore::RenderImage::RenderImage):
4030         (WebCore::RenderImage::~RenderImage):
4031         (WebCore::RenderImage::styleDidChange):
4032         (WebCore::RenderImage::imageChanged):
4033         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded):
4034         (WebCore::RenderImage::updateInnerContentRect):
4035         (WebCore::RenderImage::imageDimensionsChanged):
4036         (WebCore::RenderImage::notifyFinished):
4037         (WebCore::RenderImage::paintReplaced):
4038         (WebCore::RenderImage::paintIntoRect):
4039         (WebCore::RenderImage::foregroundIsKnownTo