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