[CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-21  Rik Cabanier  <cabanier@adobe.com>
2
3         [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
4         https://bugs.webkit.org/show_bug.cgi?id=131824
5
6         Reviewed by Dean Jackson.
7
8         Removed support for non-separable blend modes from the CSS parser.
9
10         Covered by existing tests
11
12         * css/CSSParser.cpp:
13         (WebCore::isValidKeywordPropertyAndValue):
14         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
15         (PlatformCAFilters::setBlendingFiltersOnLayer):
16
17 2014-04-21  David Hyatt  <hyatt@apple.com>
18
19         [New Multicolumn] Column set drawing under horizontal scrollbar.
20         https://bugs.webkit.org/show_bug.cgi?id=131812.
21
22         Reviewed by Sam Weinig.
23
24         Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.
25
26         * rendering/RenderBlockFlow.cpp:
27         (WebCore::RenderBlockFlow::layoutBlock):
28         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
29         * rendering/RenderBlockFlow.h:
30         Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
31         The new columns need to be able to set it to true if the amount of available column
32         height ever changes, so that the RenderFlowThread and the sets get a layout call.
33
34         * rendering/style/RenderStyle.cpp:
35         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
36         Make sure that the pagination mode is set up with an auto column-fill specified. You
37         don't ever want to balance when you set a pagination mode on the RenderView.
38
39 2014-04-21  Tim Horton  <timothy_horton@apple.com>
40
41         [iOS WebKit2] Implement CSS viewport units
42         https://bugs.webkit.org/show_bug.cgi?id=131863
43         <rdar://problem/16279088>
44
45         Reviewed by Darin Adler.
46
47         * WebCore.exp.in:
48         * page/FrameView.cpp:
49         (WebCore::FrameView::setViewportSize):
50         * page/FrameView.h:
51         (WebCore::FrameView::viewportSize):
52         Add setViewportSize() and viewportSize().
53         If the viewport size changes, we have to do style recalc.
54         If we have an overridden viewport size, use it.
55
56         * rendering/RenderView.cpp:
57         (WebCore::RenderView::viewportSize):
58         * rendering/RenderView.h:
59         Get the size from FrameView.
60
61 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
62
63         Remove unused WebKitSystemInterface functions
64         https://bugs.webkit.org/show_bug.cgi?id=131938
65
66         Reviewed by Alexey Proskuryakov.
67
68         * WebCore.exp.in:
69         * platform/ios/WebCoreSystemInterfaceIOS.mm:
70         * platform/mac/WebCoreSystemInterface.h:
71         * platform/mac/WebCoreSystemInterface.mm:
72
73 2014-04-21  Andreas Kling  <akling@apple.com>
74
75         Move the JSString cache from DOMWrapperWorld to VM.
76         <https://webkit.org/b/131940>
77
78         Since there's no need for JSStrings to be world-specific, this patch
79         moves the string cache to JSC::VM. This makes jsStringWithCache()
80         a lot faster since it no longer has to jump through twenty-eleven
81         hoops to find the DOMWrapperWorld.
82
83         Reviewed by Geoff Garen.
84
85         * bindings/js/DOMWrapperWorld.cpp:
86         (WebCore::DOMWrapperWorld::clearWrappers):
87         * bindings/js/DOMWrapperWorld.h:
88         * bindings/js/JSDOMBinding.cpp:
89         (WebCore::jsStringWithCache):
90
91 2014-04-21  David Hyatt  <hyatt@apple.com>
92
93         [New Multicolumn] Column balancing is slow on float-multicol.html
94         https://bugs.webkit.org/show_bug.cgi?id=131801
95
96         Reviewed by Enrica Casucci.
97
98         Added fast/multicol/tall-float.html
99
100         * rendering/RenderBlock.cpp:
101         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
102         Make RenderFlowThreads expand to encompass floats. Also from Morten's patch for
103         Blink (#361551).
104
105         * rendering/RenderBlockFlow.cpp:
106         (WebCore::RenderBlockFlow::computeOverflow):
107         Fix a bug where the new multi-column code was adding in overflow for floats
108         when it should not. This was resulting in the creation of scrollbars when none
109         should exist. This is my own addition.
110
111         (WebCore::RenderBlockFlow::addOverhangingFloats):
112         Make RenderFlowThreads and RenderRegions ignore overhanging float additions. This
113         comes from Morten's patch for Blink (#361551).
114
115 2014-04-21  Darin Adler  <darin@apple.com>
116
117         REGRESSION (r160908): Safari doesn't draw rotated images properly first time
118         https://bugs.webkit.org/show_bug.cgi?id=131930
119
120         Reviewed by Anders Carlsson.
121
122         With render tree creation sufficiently lazy, we had to put some explicit
123         calls to updateStyleIfNeeded into the ImageDocument class.
124
125         * dom/DOMImplementation.cpp:
126         (WebCore::DOMImplementation::createDocument): Pass a Frame&.
127
128         * html/ImageDocument.cpp:
129         (WebCore::ImageDocument::imageSize): Added this helper function. This updates
130         style so we can use the renderer to compute an image size taking things like
131         orientation into account, and also passes in the zoom factor.
132         (WebCore::ImageDocument::updateDuringParsing): Moved the body of the
133         ImageDocumentParser::appendBytes function into this function. Since it's a
134         member of ImageDocument, it has better access to appropriate private members,
135         and we don't have to expose as many functions to the public. Also changed to
136         not use the frame so much. Also merged in the code that creates the document
137         instead of having it be a side effect in the cachedImage helper function; all
138         the other call sites were checking for null before calling cachedImage.
139         (WebCore::ImageDocument::finishedParsing): Moved the body of the
140         ImageDocumentParser::finish function here. Added a call to updateStyleIfNeeded
141         before using the renderer to get the image size.
142         (WebCore::ImageDocumentParser::document): Made this return a reference. It's
143         just a convenience function used in the two functions below.
144         (WebCore::ImageDocumentParser::appendBytes): Just call updateDuringParsing.
145         (WebCore::ImageDocumentParser::finish): Just call finishedParsing.
146         (WebCore::ImageDocument::ImageDocument): Take a reference for the argument,
147         use nullptr, and also initialize m_shouldShrinkImage directly instead of using
148         a shouldShrinkToFit() helper function to do it.
149         (WebCore::ImageDocument::createDocumentStructure): Removed unneeded check of
150         null for the frame, since the caller does it. Removed some unneeded
151         IGNORE_EXCEPTON and a stray semicolon. Use m_shouldShrinkImage instead of
152         calling shouldShrinkToFit since at this early point they will be identical.
153         (WebCore::ImageDocument::scale): Make non-const so we can call the new
154         imageSize helper. Use Document::view instead of Frame::view. Improved the
155         conversion to floating point so it doesn't involve a static_cast and an extra
156         conversion from int to LayoutUnit.
157         (WebCore::ImageDocument::resizeImageToFit): Ditto.
158         (WebCore::ImageDocument::imageClicked): Ditto.
159         (WebCore::ImageDocument::imageUpdated): Ditto. Also use m_shouldShrinkImage
160         ibnstead of shouldShrinkToFit.
161         (WebCore::ImageDocument::restoreImageSize): Ditto.
162         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
163         (WebCore::ImageDocument::windowSizeChanged): Ditto.
164         (WebCore::ImageDocument::cachedImage): Deleted. Moved logic into updateDuringParsing.
165         (WebCore::ImageDocument::shouldShrinkToFit): Deleted. Moved logic into constructor.
166         (WebCore::ImageEventListener::handleEvent): Updated for changes above.
167         (WebCore::ImageEventListener::operator==): Simplified. No reason this has to check
168         whether both listeners are in the same document.
169         (WebCore::ImageDocumentElement::didMoveToNewDocument): Use nullptr.
170
171         * html/ImageDocument.h: Deleted some unused things, updated for changes above,
172         and made some memer functions private.
173
174         * loader/FrameLoaderClient.h: Deleted the allowScriptFromSource, allowPlugins,
175         allowImage, and allowDisplayingInsecureContent functions. These were only used in
176         Chromium and are now unneeded complexity. We could bring them back if anyone wants them.
177
178         * loader/MixedContentChecker.cpp:
179         (WebCore::MixedContentChecker::canDisplayInsecureContent): Removed call to
180         allowDisplayingInsecureContent, just use the setting directly.
181         (WebCore::MixedContentChecker::canRunInsecureContent): Removed call to
182         allowRunningInsecureContent, just use the setting directly.
183
184         * loader/SubframeLoader.cpp:
185         (WebCore::SubframeLoader::allowPlugins): Removed call to allowPlugins, just
186         use the arePluginsEnabled setting directly.
187
188         * loader/cache/CachedResourceLoader.cpp:
189         (WebCore::CachedResourceLoader::canRequest): Removed call to allowScriptFromSource, just
190         use the isScriptEnabled setting directly.
191         (WebCore::CachedResourceLoader::clientDefersImage): Removed call to allowImage.
192
193 2014-04-21  David Hyatt  <hyatt@apple.com>
194
195         [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
196         https://bugs.webkit.org/show_bug.cgi?id=131811
197
198         Reviewed by Dean Jackson.
199
200         Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
201         
202         With block axis pagination mode, it is possible to set a column height that is not the same
203         as the available fill height for a block. The new multi-column code had the assumption that
204         the column height was the same as the amount of fill room you had available. This is not
205         the case.
206         
207         To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
208         available column height as a separate variable from the computed column height. This allows
209         the pagination API to specify a different column height that is not the same as the view's
210         content height.
211
212         Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
213         RenderView to work with the new column code as well.
214
215         To address the layout test failures (that caused the previous rollout), I made sure to
216         initialize m_availableHeight to 0 when m_computedColumnHeight also gets reset to 0.
217         
218         The assertion is not something I could reproduce on any machine, but I can see the problem.
219         I patched Page's pageCount method to not have column code directly in Page.cpp, 
220         and to make a new pageCount() method on RenderView that Page calls
221         into. This method is now patched to handle the new column code as well as the old. I have
222         no real way of testing this method though, since I can't reproduce the assertion that the
223         bots were experiencing.
224
225         * page/Page.cpp:
226         (WebCore::Page::pageCount):
227         * rendering/RenderMultiColumnSet.cpp:
228         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
229         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
230         (WebCore::RenderMultiColumnSet::prepareForLayout):
231         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
232         * rendering/RenderMultiColumnSet.h:
233         * rendering/RenderView.cpp:
234         (WebCore::RenderView::pageOrViewLogicalHeight):
235         (WebCore::RenderView::pageCount):
236         * rendering/RenderView.h:
237
238 2014-04-18  Dean Jackson  <dino@apple.com>
239
240         [Media] Clean up localized strings in controls
241         https://bugs.webkit.org/show_bug.cgi?id=131857
242         <rdar://problem/16663005>
243
244         Reviewed by Eric Carlson.
245
246         There is no need for separate localization files
247         on OS X and iOS. Move the small number of iOS-specific
248         localizations into a shared file.
249
250         We also don't need a function to return a static table.
251         Ultimately I think we want a top-level WebKit object that
252         hold the table, but for now use a global variable
253         called UIStringTable. Since we're in an isolated world, we
254         won't clash with anything.
255
256         I noticed a few cases were we grab a localized string and
257         then instantly run a replacement on it. This should be
258         supported directly in the UIString() accessor.
259
260         * English.lproj/mediaControlsLocalizedStrings.js: Add iOS strings. Just
261         use a static table.
262         (mediaControlsLocalizedStrings): Deleted.
263         * English.lproj/mediaControlsLocalizedStringsiOS.js: Removed.
264         * Modules/mediacontrols/mediaControlsApple.js:
265         (Controller.prototype.extend): Fix braces.
266         (Controller.prototype.UIString): Use the string table, and allow replacement.
267         (Controller.prototype.createControls): Use new UIString replacement.
268         * Modules/mediacontrols/mediaControlsiOS.js:
269         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Use new UIString.
270         (ControllerIOS.prototype.UIString): Deleted. Use the parent class version.
271         * WebCore.xcodeproj/project.pbxproj: Remove file from Resources.
272         * rendering/RenderThemeIOS.mm:
273         (WebCore::RenderThemeIOS::mediaControlsScript): No need to include the iOS
274         specific localization file.
275
276 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
277
278         [Win] Unreviewed build fix.
279
280         * inspector/TimelineRecordFactory.cpp: Add missing include.
281
282 2014-04-21  Zan Dobersek  <zdobersek@igalia.com>
283
284         Move cross-port Source/WebCore/page/ code to std::unique_ptr
285         https://bugs.webkit.org/show_bug.cgi?id=130534
286
287         Reviewed by Darin Adler.
288
289         Replace uses of OwnPtr and PassOwnPtr in cross-port code under Source/WebCore/page/ with
290         std::unique_ptr. Unnecessary OwnPtr.h and PassOwnPtr.h header inclusions are removed as well.
291
292         * dom/Document.cpp:
293         (WebCore::Document::initSecurityContext):
294         * dom/SecurityContext.cpp:
295         (WebCore::SecurityContext::setContentSecurityPolicy):
296         * dom/SecurityContext.h:
297         * page/CaptionUserPreferences.h:
298         * page/ContentSecurityPolicy.cpp:
299         (WebCore::CSPDirectiveList::create):
300         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
301         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
302         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
303         (WebCore::CSPDirectiveList::setCSPDirective):
304         (WebCore::ContentSecurityPolicy::didReceiveHeader):
305         * page/ContentSecurityPolicy.h:
306         * page/DOMSecurityPolicy.h:
307         * page/DOMWindow.cpp:
308         (WebCore::PostMessageTimer::fired):
309         (WebCore::DOMWindow::postMessageTimerFired):
310         * page/DOMWindow.h:
311         * page/EventHandler.cpp:
312         (WebCore::EventHandler::EventHandler):
313         * page/EventHandler.h:
314         * page/Frame.cpp:
315         (WebCore::Frame::Frame):
316         (WebCore::createRegExpForLabels):
317         (WebCore::Frame::searchForLabelsAboveCell):
318         (WebCore::Frame::searchForLabelsBeforeElement):
319         (WebCore::matchLabelsAgainstString):
320         (WebCore::Frame::setTiledBackingStoreEnabled):
321         * page/Frame.h:
322         * page/FrameView.cpp:
323         (WebCore::FrameView::addEmbeddedObjectToUpdate):
324         (WebCore::FrameView::addSlowRepaintObject):
325         (WebCore::FrameView::addViewportConstrainedObject):
326         (WebCore::FrameView::addScrollableArea):
327         * page/FrameView.h:
328         * page/Page.cpp:
329         (WebCore::Page::Page):
330         * page/Page.h:
331         * page/PageConsole.h:
332         * page/PageThrottler.h:
333         * page/SecurityPolicy.cpp:
334         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
335         * page/animation/AnimationController.h:
336         * page/animation/CSSPropertyAnimation.cpp:
337         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
338         (WebCore::CSSPropertyAnimationWrapperMap::instance):
339         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
340         * page/mac/PageMac.cpp:
341         (WebCore::Page::addSchedulePair):
342         * workers/WorkerGlobalScope.cpp:
343         (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
344
345 2014-04-21  Darin Adler  <darin@apple.com>
346
347         Add HashSet::takeAny
348         https://bugs.webkit.org/show_bug.cgi?id=131928
349
350         Reviewed by Benjamin Poulain.
351
352         * dom/Document.cpp:
353         (WebCore::Document::takeAnyMediaCanStartListener): Use HashSet::takeAny.
354         * dom/ScriptExecutionContext.cpp:
355         (WebCore::takeAny): Deleted.
356         (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Use HashSet::takeAny.
357
358 2014-04-21  Zan Dobersek  <zdobersek@igalia.com>
359
360         iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
361         https://bugs.webkit.org/show_bug.cgi?id=131916
362
363         Reviewed by Darin Adler.
364
365         A follow-up to r167197. Make RemoteCommandListener ctor public and use std::make_unique<>()
366         in both versions of RemoteCommandListener::create() functions (iOS and non-iOS).
367
368         * platform/RemoteCommandListener.cpp:
369         (WebCore::RemoteCommandListener::create):
370         * platform/RemoteCommandListener.h:
371         (WebCore::RemoteCommandListener::RemoteCommandListener):
372         * platform/ios/RemoteCommandListenerIOS.mm:
373         (WebCore::RemoteCommandListener::create):
374
375 2014-04-21  Andreas Kling  <akling@apple.com>
376
377         Micro-optimize the way we hand NodeLists to JSC.
378         <https://webkit.org/b/131932>
379
380         Use HashMap::fastAdd() when returning cached node lists and collections.
381         10.9% progression on Bindings/get-elements-by-tag-name.html
382
383         Reviewed by Antti Koivisto.
384
385         * dom/NodeRareData.h:
386         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
387         (WebCore::NodeListsNodeData::addCacheWithName):
388         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
389         (WebCore::NodeListsNodeData::addCachedCollection):
390
391 2014-04-21  Commit Queue  <commit-queue@webkit.org>
392
393         Unreviewed, rolling out r167584.
394         https://bugs.webkit.org/show_bug.cgi?id=131929
395
396         Broke Objective-C bindings test (Requested by ap on #webkit).
397
398         Reverted changeset:
399
400         "Add Element.matches, the standard name for
401         webkitMatchesSelector"
402         https://bugs.webkit.org/show_bug.cgi?id=131922
403         http://trac.webkit.org/changeset/167584
404
405 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
406
407         Compile the :root pseudo class and fix a related issue with :nth-child()
408         https://bugs.webkit.org/show_bug.cgi?id=131926
409
410         Reviewed by Andreas Kling.
411
412         Add the :root pseudo class. This is another trivial selector, we just need to compare
413         the element pointer with the documentElement.
414
415         I discovered some issues with :nth-child(n) through the layout tests for ":root".
416         When the pseudo class nth-child could match anything, no code was generated. That decision
417         was taken when generating the fragments.
418
419         The specification of :nth-child() has two tests: the parent test and the counter test.
420         Since some fragments would not generate any code for :nth-child(n), they would succeed on the root,
421         which is incorrect since the root should fail the parent test.
422
423         This was fixed by moving the filtering of non-counting :nth-child() after we generate the parent
424         check.
425         We still don't generate any counter test unless required.
426
427         Test: fast/selectors/nth-child-on-root.html
428
429         * cssjit/SelectorCompiler.cpp:
430         (WebCore::SelectorCompiler::addPseudoClassType):
431         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
432         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
433         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsRoot):
434         * dom/Document.h:
435         (WebCore::Document::documentElementMemoryOffset):
436
437 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
438
439         Add Element.matches, the standard name for webkitMatchesSelector
440         https://bugs.webkit.org/show_bug.cgi?id=131922
441
442         Reviewed by Andreas Kling.
443
444         This patch just renames webkitMatchesSelector() to matches().
445
446         * bindings/scripts/CodeGeneratorObjC.pm:
447         (GenerateImplementation):
448         The Objective-C binding generator only supported ImplementedAs for getters and setters.
449         This adds support for the option so that Element.matches can be generated for Obj-C.
450
451         * dom/Element.cpp:
452         (WebCore::Element::matches):
453         (WebCore::Element::webkitMatchesSelector): Deleted.
454         * dom/Element.h:
455         * dom/Element.idl:
456         * inspector/InspectorCSSAgent.cpp:
457         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
458
459 2014-04-20  Zalan Bujtas  <zalan@apple.com>
460
461         Subpixel rendering: RenderLayer's size is set using enclosingRect() which can result in cruft.
462         https://bugs.webkit.org/show_bug.cgi?id=131468
463
464         Reviewed by Darin Adler.
465
466         Layers marked opaque may not paint edge pixels, when RenderLayer bounds are non-integral and
467         get device pixel snapped.
468         For details see this: https://trac.webkit.org/r159463
469
470         Test: compositing/hidpi-non-simple-compositing-layer-with-fractional-size-and-background.html
471
472         * rendering/RenderLayerBacking.cpp:
473         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
474
475 2014-04-19  Darin Adler  <darin@apple.com>
476
477         Simple layout can get confused by coordinate overflow
478         https://bugs.webkit.org/show_bug.cgi?id=131890
479         rdar://problem/15558510
480
481         Reviewed by Andreas Kling.
482
483         Test: fast/css/simple-layout-overflow.html
484
485         * rendering/SimpleLineLayoutResolver.h:
486         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
487         If lastLine is smaller than firstLine, just ignore it.
488
489 2014-04-20  Darin Adler  <darin@apple.com>
490
491         ScriptExecutionContext::stopActiveDOMObjects iterates a hash map that can change during iteration (for multiple reasons, including GC)
492         https://bugs.webkit.org/show_bug.cgi?id=52719
493
494         Reviewed by Alexey Proskuryakov.
495
496         At least two specific ways this can happen:
497
498         1) XMLHttpRequest::stop can trigger a JavaScript garbage collection.
499         2) NotificationCenter::stop can delete the last references to notifications;
500            those notifications are also active DOM objects.
501
502         Besides fixing the iteration in that function, did some other fixes for the
503         ScriptExecutionContext class, including some coding style changes. Many uses
504         of nullptr instead of 0, without listing each function separately below.
505
506         * Modules/webdatabase/DatabaseContext.cpp:
507         (WebCore::DatabaseContext::contextDestroyed): Call through to the base class
508         version of contextDestroyed rather than repeating what it does (with a large
509         comment that doesn't acknowledge the base class alread does it).
510         * Modules/webdatabase/DatabaseContext.h: Removed some unneeded includes.
511         Wrote out "private" explicitly for deriving from ActiveDOMObject. Made the
512         ActiveDOMObject function overrides private, and marked them override and final.
513
514         * dom/ActiveDOMObject.h: Updated comments. Replaced suspendIfNeededCalled with
515         assertSuspendIfNeededWasCalled, which has an empty inline version in the header.
516         Renamed m_suspendIfNeededCalled to m_suspendIfNeededWasCalled.
517
518         * dom/ActiveDOMObject.cpp:
519         (WebCore::ActiveDOMObject::ActiveDOMObject): Pass a reference instead of a pointer.
520         (WebCore::ActiveDOMObject::~ActiveDOMObject): Ditto.
521         (WebCore::ActiveDOMObject::suspendIfNeeded): Ditto.
522
523         * dom/ContextDestructionObserver.cpp:
524         (WebCore::ContextDestructionObserver::observeContext): Pass a reference instead of a pointer.
525
526         * dom/MessagePort.cpp:
527         (WebCore::MessagePort::MessagePort): Pass a reference instead of a pointer.
528         (WebCore::MessagePort::~MessagePort): Ditto.
529         (WebCore::MessagePort::disentangle): Ditto.
530
531         * dom/ScriptExecutionContext.cpp:
532         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Updated flags used
533         for assertions so they are conditional and updated their names.
534         (WebCore::takeAny): Added. Helper function that we can consider for HashSet in
535         the future; makes loop below easier to read.
536         (WebCore::checkConsistency): Added. Assertions that were done multiple places below,
537         and should not be written over and over again.
538         (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Changed to use C++11
539         for loops and the takeAny function above.
540         (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Ditto.
541         (WebCore::ScriptExecutionContext::createdMessagePort): Changed to take a reference
542         for clarity and so it doesn't have to do an assert the pointer is non-null.
543         (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
544         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): Changed to use
545         C++11 for loop and reworded comment and redid assertions.
546         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ditto.
547         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Ditto.
548         (WebCore::ScriptExecutionContext::stopActiveDOMObjects): Changed to support
549         removal of an active DOM object during the stop function. Included new comments
550         to clarify what the rules are.
551         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): Changed to take
552         a reference for clarity and so it doesn't have to assert a pointer is non-null.
553         (WebCore::ScriptExecutionContext::didCreateActiveDOMObject): Ditto. Also changed to
554         use RELEASE_ASSERT instead of CRASH.
555         (WebCore::ScriptExecutionContext::willDestroyActiveDOMObject): Ditto.
556         (WebCore::ScriptExecutionContext::didCreateDestructionObserver): Ditto.
557         (WebCore::ScriptExecutionContext::willDestroyDestructionObserver): Ditto.
558         (WebCore::ScriptExecutionContext::closeMessagePorts): Moved the body of this
559         function into its one call site, ScriptExecutionContext::stopActiveDOMObjects,
560         since it's simple enough when written as a C++11 for loop.
561         (WebCore::ScriptExecutionContext::hasPendingActivity): Added. This function was
562         already exported for workers, and implementing it outside this class required
563         exposing the private HashSet members; more sensible to implement it here and
564         simply make it public in WorkerGlobalScope.
565
566         * dom/ScriptExecutionContext.h: Removed unnecessary includes and forward declarations.
567         Removed a long-ago-fixed FIXME. Changed various functions to take references instead of
568         pointers. Added a protected hasPendingActivity function, deleted the closeMessagePorts
569         function, deleted the ActiveDOMObjectsSet typedef, made the assertion flags be
570         !ASSERT_DISABLED only, and deleted the messagePorts and activeDOMObjects functions.
571
572         * workers/WorkerGlobalScope.cpp:
573         (WebCore::WorkerGlobalScope::hasPendingActivity): Deleted. This is now implemented
574         in the base class.
575
576         * workers/WorkerGlobalScope.h: Make hasPendingActivity function from the base class
577         public instead of declaring it in this class.
578
579 2014-04-20  Brent Fulgham  <bfulgham@apple.com>
580
581         [Mac] Unable to select 'Off' or 'Auto' from track menu when tracks consist of unsupported track types
582         https://bugs.webkit.org/show_bug.cgi?id=131908
583         <rdar://problem/15999882>
584
585         Reviewed by Eric Carlson.
586
587         * html/HTMLMediaElement.cpp:
588         (WebCore::HTMLMediaElement::setSelectedTextTrack): When the user selects 'Off', make sure the currently 'showing'
589         track is switched to 'disabled'.
590
591 2014-04-20  Andreas Kling  <akling@apple.com>
592
593         Speed up jsStringWithCache() through WeakGCMap inlining.
594         <https://webkit.org/b/131923>
595
596         Inline the common path of WeakGCMap::add() in jsStringWithCache().
597         26% progression on Bindings/id-getter.html
598
599         Reviewed by Darin Adler.
600
601         * WebCore.exp.in:
602         * bindings/js/JSDOMBinding.h:
603         * bindings/js/JSDOMBinding.cpp:
604         (WebCore::jsStringWithCache):
605
606             Move jsStringWithCache() out of line since we're now blowing up
607             its size quite a bit.
608
609 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
610
611         Fix the build after r167574
612
613         * cssjit/SelectorCompiler.cpp:
614         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
615
616 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
617
618         Compile the pseudo class :target
619         https://bugs.webkit.org/show_bug.cgi?id=131904
620
621         Reviewed by Andreas Kling.
622
623         The pseudo class :target is trivial, it just compare the current element with
624         Document::cssTarget().
625
626         * cssjit/SelectorCompiler.cpp:
627         (WebCore::SelectorCompiler::addPseudoType):
628         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
629         (WebCore::SelectorCompiler::getDocument):
630         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
631         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsTarget):
632         * dom/Document.h:
633         (WebCore::Document::cssTargetMemoryOffset):
634
635 2014-04-20  Benjamin Poulain  <benjamin@webkit.org>
636
637         Rename the CSSSelector PseudoType to PseudoClassType
638         https://bugs.webkit.org/show_bug.cgi?id=131907
639
640         Reviewed by Andreas Kling.
641
642         Pseudo Elements and Page Pseudo Classes have been moved out of PseudoType in previous patches.
643         The remaining values in the PseudoType enumeration are the pseudo classes.
644
645         This patch is the final clean up, PseudoType is renamed to PseudoClassType.
646
647         * css/CSSGrammar.y.in:
648         * css/CSSParserValues.cpp:
649         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
650         * css/CSSParserValues.h:
651         (WebCore::CSSParserSelector::pseudoClassType):
652         (WebCore::CSSParserSelector::pseudoType): Deleted.
653         * css/CSSSelector.cpp:
654         (WebCore::CSSSelector::specificityForOneSelector):
655         (WebCore::appendPseudoClassFunctionTail):
656         (WebCore::CSSSelector::selectorText):
657         * css/CSSSelector.h:
658         (WebCore::CSSSelector::pseudoClassType):
659         (WebCore::CSSSelector::pseudoElementType):
660         (WebCore::CSSSelector::pagePseudoClassType):
661         (WebCore::pseudoClassIsRelativeToSiblings):
662         (WebCore::CSSSelector::isSiblingSelector):
663         (WebCore::CSSSelector::CSSSelector):
664         (WebCore::CSSSelector::pseudoType): Deleted.
665         * css/RuleSet.cpp:
666         (WebCore::RuleSet::findBestRuleSetAndAdd):
667         * css/SelectorChecker.cpp:
668         (WebCore::SelectorChecker::checkOne):
669         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
670         (WebCore::SelectorChecker::determineLinkMatchType):
671         (WebCore::SelectorChecker::matchesFocusPseudoClass):
672         * css/SelectorChecker.h:
673         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
674         * css/SelectorCheckerFastPath.cpp:
675         (WebCore::SelectorCheckerFastPath::commonPseudoClassSelectorMatches):
676         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
677         * css/SelectorPseudoTypeMap.h:
678         * css/StyleResolver.cpp:
679         (WebCore::StyleResolver::styleForElement):
680         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
681         (enumerablePseudoType):
682         * cssjit/SelectorCompiler.cpp:
683         (WebCore::SelectorCompiler::addPseudoClassType):
684         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
685         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
686         (WebCore::SelectorCompiler::addPseudoType): Deleted.
687         * inspector/InspectorCSSAgent.cpp:
688         (WebCore::computePseudoClassMask):
689         (WebCore::InspectorCSSAgent::forcePseudoState):
690         * inspector/InspectorCSSAgent.h:
691         * inspector/InspectorInstrumentation.cpp:
692         (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
693         * inspector/InspectorInstrumentation.h:
694         (WebCore::InspectorInstrumentation::forcePseudoState):
695
696 2014-04-19  Alexey Proskuryakov  <ap@apple.com>
697
698         Crashes in HTMLFormElement::submit.
699         https://bugs.webkit.org/show_bug.cgi?id=131910
700         <rdar://problem/15661790>
701
702         Based on a patch by Kent Tamura.
703
704         Reviewed by Anders Carlsson.
705
706         Tests: fast/forms/form-submission-crash-2.html
707                fast/forms/form-submission-crash.html
708
709         Code that executes arbitrary JS needs to protect objects that it uses afterwards.
710
711         * html/HTMLFormElement.cpp:
712         (WebCore::HTMLFormElement::prepareForSubmission):
713         (WebCore::HTMLFormElement::submit):
714         * loader/FrameLoader.cpp:
715         (WebCore::FrameLoader::submitForm):
716
717 2014-04-20  Antti Koivisto  <antti@apple.com>
718
719         Text bounding box computation for simple line layout is wrong
720         https://bugs.webkit.org/show_bug.cgi?id=131912
721
722         Reviewed by Andreas Kling.
723
724         Top-left is currently the first line top-left which is not always correct.
725
726         * WebCore.exp.in:
727         * rendering/RenderText.cpp:
728         (WebCore::RenderText::firstRunLocation):
729         (WebCore::RenderText::firstRunOrigin): Deleted.
730         (WebCore::RenderText::firstRunX): Deleted.
731         (WebCore::RenderText::firstRunY): Deleted.
732         
733             Keep just one accessor and rename it.
734             Encapsulate the line box and simple line versions.
735
736         * rendering/RenderText.h:
737         * rendering/RenderTextLineBoxes.cpp:
738         (WebCore::RenderTextLineBoxes::firstRunLocation):
739
740             Line box version.
741
742         * rendering/RenderTextLineBoxes.h:
743         * rendering/RenderTreeAsText.cpp:
744         
745             Simplify RenderText dumping.
746
747         (WebCore::RenderTreeAsText::writeRenderObject):
748         * rendering/SimpleLineLayoutFunctions.cpp:
749         (WebCore::SimpleLineLayout::computeTextBoundingBox):
750         
751             Return the correct x position.
752
753         (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
754         
755             Simple line version.
756
757         * rendering/SimpleLineLayoutFunctions.h:
758         * rendering/svg/SVGRenderTreeAsText.cpp:
759         (WebCore::writeSVGInlineText):
760
761 2014-04-19  Zalan Bujtas  <zalan@apple.com>
762
763         Subpixel rendering: RenderLayer's clipping should snap to device pixel boundaries.
764         https://bugs.webkit.org/show_bug.cgi?id=131466
765
766         Reviewed by Simon Fraser.
767
768         Fractional pixel clipping can produce cruft on RenderLayers. Since RenderLayer
769         sizing and painting are snapped, painting clip rect needs to be snapped the same way.
770
771         Test: fast/clip/clip-when-rect-has-fractional-pixel-value.html
772
773         * rendering/RenderLayer.cpp:
774         (WebCore::RenderLayer::clipToRect):
775
776 2014-04-19  Brent Fulgham  <bfulgham@apple.com>
777
778         Latched scrolling may interact badly with custom programmatic scrolling
779         https://bugs.webkit.org/show_bug.cgi?id=131869
780         <rdar://problem/16249557>
781
782         Reviewed by Darin Adler.
783
784         * dom/Element.cpp:
785         (WebCore::Element::setScrollLeft): Mark scrollable area as having
786         been scrolled programmatically.
787         (WebCore::Element::setScrollTop): Ditto.
788         * page/EventHandler.cpp:
789         (WebCore::EventHandler::handleWheelEvent): Check for programmatic scroll, and
790         clear latched state if the handler manually scrolled. Clear programmatic
791         scroll state at the end of event handling.
792         (WebCore::EventHandler::clearLatchedState): Refactored code.
793         * page/EventHandler.h:
794         * page/mac/EventHandlerMac.mm:
795         (WebCore::EventHandler::platformPrepareForWheelEvents): Check
796         if scrollable area was scrolled programmatically. If it was, do
797         not honor latching behavior.
798         * platform/ScrollableArea.cpp:
799         (WebCore::ScrollableArea::ScrollableArea): Initialize new member.
800         * platform/ScrollableArea.h:
801         (WebCore::ScrollableArea::isScrolledProgrammatically): Added.
802         (WebCore::ScrollableArea::setScrolledProgrammatically): Added.
803
804 2014-04-19  Chris Fleizach  <cfleizach@apple.com>
805
806         AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
807         https://bugs.webkit.org/show_bug.cgi?id=131819
808
809         Reviewed by Darin Adler.
810
811         Test: accessibility/table-with-missing-aria-role-rows.html
812
813         If a table is using role="grid", and it has <tr> elements that do not have
814         role="row", we should still treat them as row elements.
815
816         * accessibility/AccessibilityARIAGrid.cpp:
817         (WebCore::AccessibilityARIAGrid::addTableCellChild):
818
819 2014-04-19  Chris Fleizach  <cfleizach@apple.com>
820
821         AX: Malformed tables exposing incorrect col and colSpans
822         https://bugs.webkit.org/show_bug.cgi?id=131796
823
824         Reviewed by Darin Adler.
825
826         Test: accessibility/table-incorrect-colspan-cell.html
827
828         When a developer has specified malformed colspans, accessibility is reporting those values instead of the effective column information.
829
830         * accessibility/AccessibilityTableCell.cpp:
831         (WebCore::AccessibilityTableCell::columnIndexRange):
832
833 2014-04-19  Benjamin Poulain  <bpoulain@apple.com>
834
835         Make the CSS JIT compile for ARM64
836         https://bugs.webkit.org/show_bug.cgi?id=131834
837
838         Reviewed by Gavin Barraclough.
839
840         Add the CPU specific code required to compile SelectorCompiler on ARM64.
841         The code is absolutely non-functional, it would crash immediately, but it compiles.
842
843         * cssjit/FunctionCall.h:
844         (WebCore::FunctionCall::FunctionCall):
845         (WebCore::FunctionCall::callAndBranchOnCondition):
846         * cssjit/RegisterAllocator.h:
847         What am I supposed to do with all those registers? There are so many of them :)
848         The array calleeSavedRegisters is defined for compatibility but it cannot be reached at the moment.
849
850         (WebCore::RegisterAllocator::isValidRegister):
851         * cssjit/SelectorCompiler.cpp:
852         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
853         Implement modulo by doing dividend - (divisor * int(dividend/divisor)).
854
855         * cssjit/StackAllocator.h:
856         StackAllocator will need a small redesign to handle the 16 bytes alligned stack of
857         ARM64.
858         The code has been modified to build but it is pretty useless.
859
860         (WebCore::StackAllocator::allocateUninitialized):
861         (WebCore::StackAllocator::push):
862         (WebCore::StackAllocator::pop):
863         (WebCore::StackAllocator::popAndDiscard):
864         (WebCore::StackAllocator::popAndDiscardUpTo):
865         (WebCore::StackAllocator::alignStackPreFunctionCall):
866         (WebCore::StackAllocator::unalignStackPostFunctionCall):
867
868 2014-04-19  Simon Fraser  <simon.fraser@apple.com>
869
870         [UI-side compositing] Implement blend modes
871         https://bugs.webkit.org/show_bug.cgi?id=131891
872         <rdar://problem/16490085>
873
874         Reviewed by Tim Horton.
875
876         Implement blend modes with UI-side compositing.
877         
878         PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
879         PlatformCALayerMac and PlatformCALayerRemote.
880         PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
881         layer, so it can be called from the UI process on a CALayer*.
882         
883         Fix an issue with GraphicsLayerCA::LayerChange flags. 1 << 31 shifts
884         a signed integer, so it ended up setting all the high bits in m_uncommittedChanges,
885         causing us to push blend modes to the UI process for every layer. Fix by shifting
886         an unsigned long long (1LLU << 31). This should also fix a build warning on Windows.
887
888         * WebCore.exp.in:
889         * platform/graphics/ca/GraphicsLayerCA.h:
890         * platform/graphics/ca/PlatformCAFilters.h:
891         * platform/graphics/ca/PlatformCALayer.h:
892         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
893         (PlatformCAFilters::setBlendingFiltersOnLayer):
894         * platform/graphics/ca/mac/PlatformCALayerMac.h:
895         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
896         (PlatformCALayerMac::setFilters):
897         (PlatformCALayerMac::setBlendMode):
898         (PlatformCALayer::setBlendMode): Deleted.
899
900 2014-04-19  Joseph Pecoraro  <pecoraro@apple.com>
901
902         Fix AVPlayerController leak on pages with video
903         https://bugs.webkit.org/show_bug.cgi?id=131878
904
905         Reviewed by Eric Carlson.
906
907         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
908         (-[WebAVPlayerController init]):
909         Assigning to the retain property will increment the count,
910         so balance the alloc with an autorelease.
911
912 2014-04-19  Andreas Kling  <akling@apple.com>
913
914         Slap ALWAYS_INLINE on Element attribute lookup things.
915         <https://webkit.org/b/131892>
916
917         Most of the "inline" helpers for setting/getting attributes were not
918         actually getting inlined by the compiler, so let's make that happen.
919
920         Reviewed by Geoffrey Garen.
921
922         * dom/Element.cpp:
923         (WebCore::Element::synchronizeAttribute):
924         * dom/ElementData.h:
925         (WebCore::ElementData::findAttributeByName):
926         (WebCore::ElementData::findAttributeIndexByName):
927
928 2014-04-19  Darin Adler  <darin@apple.com>
929
930         Telephone number detection should respect its setting consistently
931         https://bugs.webkit.org/show_bug.cgi?id=131893
932         rdar://problem/16597639
933
934         Reviewed by Tim Horton.
935
936         * editing/Editor.cpp:
937         (WebCore::Editor::respondToChangedSelection): Only start the timer
938         if shouldDetectTelephoneNumbers returns true.
939         (WebCore::Editor::shouldDetectTelephoneNumbers): Added. Calls both
940         isTelephoneNumberParsingEnabled and TelephoneNumberDetector::isSupported.
941         (WebCore::Editor::scanSelectionForTelephoneNumbers): Use
942         shouldDetectTelephoneNumbers.
943         (WebCore::Editor::clearDataDetectedTelephoneNumbers): Use document()
944         instead of m_frame.document().
945
946         * editing/Editor.h: Added declaration of shouldDetectTelephoneNumbers.
947
948 2014-04-19  Andrei Bucur  <abucur@adobe.com>
949
950         [CSS Regions] Harden the layout in case there are no regions
951         https://bugs.webkit.org/show_bug.cgi?id=131517
952
953         Reviewed by Mihnea Ovidenie.
954
955         The patch fixes the cases when the content of a flow thread is not
956         properly invalidated when all the regions of its chain are removed.
957
958         Test: fast/regions/simplified-layout-no-regions.html
959
960         * rendering/RenderFlowThread.cpp:
961         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
962         * rendering/RenderRegion.cpp:
963         (WebCore::RenderRegion::ensureOverflowForBox):
964
965 2014-04-19  Zalan Bujtas  <zalan@apple.com>
966
967         https://bugs.webkit.org/show_bug.cgi?id=131594
968         Subpixel rendering: WK1: Wrong repaint rect is calculated when layer has non-compositing transform.
969
970         Reviewed by Simon Fraser.
971
972         We need to snap the repaint rect for transformed object the same way when we paint them.
973
974         Test: fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html
975
976         * rendering/RenderBox.cpp:
977         (WebCore::RenderBox::computeRectForRepaint):
978
979 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
980
981         Use 'override' in GraphicsLayerCA
982         https://bugs.webkit.org/show_bug.cgi?id=131882
983
984         Reviewed by Tim Horton.
985
986         Add 'override' to all overridden functions. Found a few that need
987         not have been virtual. Removed "allowTiledLayer" stuff that was
988         never called.
989
990         * WebCore.exp.in:
991         * platform/graphics/ca/GraphicsLayerCA.cpp:
992         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
993         (WebCore::GraphicsLayerCA::requiresTiledLayer):
994         (WebCore::GraphicsLayerCA::setAllowTiledLayer): Deleted.
995         * platform/graphics/ca/GraphicsLayerCA.h:
996         (WebCore::GraphicsLayerCA::platformCALayer):
997         (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
998         (WebCore::GraphicsLayerCA::allowTiledLayer): Deleted.
999         (WebCore::GraphicsLayerCA::isGraphicsLayerCA): Deleted.
1000         (WebCore::GraphicsLayerCA::platformCALayerLayoutSublayersOfLayer): Deleted.
1001         (WebCore::GraphicsLayerCA::platformCALayerRespondsToLayoutChanges): Deleted.
1002         (WebCore::GraphicsLayerCA::platformCALayerContentsOrientation): Deleted.
1003         (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders): Deleted.
1004         (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount): Deleted.
1005         (WebCore::GraphicsLayerCA::platformCALayerContentsOpaque): Deleted.
1006         (WebCore::GraphicsLayerCA::platformCALayerDrawsContent): Deleted.
1007         (WebCore::GraphicsLayerCA::platformCALayerLayerDidDisplay): Deleted.
1008
1009 2014-04-18  Timothy Hatcher  <timothy@apple.com>
1010
1011         Web Inspector: Move InspectorProfilerAgent to JavaScriptCore
1012         https://bugs.webkit.org/show_bug.cgi?id=131673
1013
1014         Passes existing profiler and inspector tests.
1015
1016         Reviewed by Joseph Pecoraro.
1017
1018         * CMakeLists.txt:
1019         * DerivedSources.make:
1020         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Added.
1021         * WebCore.exp.in:
1022         * WebCore.vcxproj/WebCore.vcxproj:
1023         * WebCore.vcxproj/WebCore.vcxproj.filters:
1024         * WebCore.xcodeproj/project.pbxproj:
1025         * bindings/js/ScriptProfile.cpp: Removed.
1026         * bindings/js/ScriptProfile.h:
1027         * bindings/js/ScriptProfiler.cpp: Removed.
1028         * bindings/js/ScriptProfiler.h: Removed.
1029         * inspector/InspectorAllInOne.cpp:
1030         * inspector/InspectorConsoleInstrumentation.h:
1031         (WebCore::InspectorInstrumentation::profilerEnabled):
1032         (WebCore::InspectorInstrumentation::startProfiling):
1033         (WebCore::InspectorInstrumentation::stopProfiling):
1034         * inspector/InspectorController.cpp:
1035         (WebCore::InspectorController::InspectorController):
1036         * inspector/InspectorController.h:
1037         * inspector/InspectorInstrumentation.cpp:
1038         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1039         (WebCore::InspectorInstrumentation::startProfilingImpl):
1040         (WebCore::InspectorInstrumentation::stopProfilingImpl):
1041         (WebCore::InspectorInstrumentation::consoleTimeStampImpl): Deleted.
1042         * inspector/InspectorInstrumentation.h:
1043         * inspector/InspectorProfilerAgent.cpp: Removed.
1044         * inspector/InspectorProfilerAgent.h: Removed.
1045         * inspector/InspectorTimelineAgent.cpp:
1046         (WebCore::startProfiling):
1047         (WebCore::stopProfiling):
1048         (WebCore::InspectorTimelineAgent::willCallFunction):
1049         (WebCore::InspectorTimelineAgent::didCallFunction):
1050         (WebCore::InspectorTimelineAgent::willEvaluateScript):
1051         (WebCore::InspectorTimelineAgent::didEvaluateScript):
1052         (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
1053         * inspector/InstrumentingAgents.h:
1054         (WebCore::InstrumentingAgents::inspectorProfilerAgent):
1055         (WebCore::InstrumentingAgents::setInspectorProfilerAgent):
1056         * inspector/PageDebuggerAgent.cpp:
1057         (WebCore::PageDebuggerAgent::sourceMapURLForScript): Deleted.
1058         * inspector/PageDebuggerAgent.h:
1059         * inspector/PageProfilerAgent.cpp: Added.
1060         (WebCore::PageProfilerAgent::PageProfilerAgent):
1061         (WebCore::PageProfilerAgent::profilingGlobalExecState):
1062         * inspector/PageProfilerAgent.h: Added.
1063         (WebCore::PageProfilerAgent::~PageProfilerAgent):
1064         * inspector/ScriptProfile.idl:
1065         * inspector/TimelineRecordFactory.cpp:
1066         (WebCore::TimelineRecordFactory::appendProfile):
1067         * inspector/TimelineRecordFactory.h:
1068         * inspector/WebConsoleAgent.cpp:
1069         * inspector/WebProfilerAgent.cpp: Added.
1070         (WebCore::WebProfilerAgent::WebProfilerAgent):
1071         (WebCore::WebProfilerAgent::enable):
1072         (WebCore::WebProfilerAgent::disable):
1073         * inspector/WebProfilerAgent.h: Added.
1074         (WebCore::WebProfilerAgent::~WebProfilerAgent):
1075         * inspector/WorkerInspectorController.cpp:
1076         (WebCore::WorkerInspectorController::WorkerInspectorController):
1077         * inspector/WorkerProfilerAgent.cpp: Added.
1078         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
1079         (WebCore::WorkerProfilerAgent::profilingGlobalExecState):
1080         * inspector/WorkerProfilerAgent.h: Added.
1081         (WebCore::WorkerProfilerAgent::~WorkerProfilerAgent):
1082         * loader/appcache/ApplicationCacheGroup.cpp:
1083         * page/PageConsole.cpp:
1084         (WebCore::PageConsole::profile):
1085         (WebCore::PageConsole::profileEnd):
1086         (WebCore::PageConsole::time): Deleted.
1087         (WebCore::PageConsole::timeEnd): Deleted.
1088         (WebCore::PageConsole::timeStamp): Deleted.
1089         * page/PageConsole.h:
1090         * testing/Internals.cpp:
1091         * testing/Internals.h:
1092         * xml/XMLHttpRequest.cpp:
1093
1094 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
1095
1096         Contents of directly composited image layers are sometimes missing
1097         https://bugs.webkit.org/show_bug.cgi?id=131880
1098
1099         Reviewed by Tim Horton.
1100         
1101         RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
1102         GraphicsLayer had a contents layer to determine whether to call code
1103         that updates the contents rect. However, on Mac, we don't make a contents
1104         layer until later at layer flush time. That would result in an empty
1105         contentsRect being set.
1106         
1107         Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
1108         and on Mac consulting the m_contentsLayerPurpose flag, which is set
1109         at the appropriate time.
1110
1111         Test: compositing/images/update-content-rect.html
1112
1113         * platform/ScrollView.cpp:
1114         (WebCore::positionScrollbarLayer):
1115         * platform/graphics/GraphicsLayer.cpp:
1116         (WebCore::GraphicsLayer::getDebugBorderInfo):
1117         * platform/graphics/GraphicsLayer.h:
1118         (WebCore::GraphicsLayer::usesContentsLayer):
1119         (WebCore::GraphicsLayer::hasContentsLayer): Deleted.
1120         * platform/graphics/ca/GraphicsLayerCA.h:
1121         (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
1122         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1123         (WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
1124         (WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
1125         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1126         * rendering/RenderLayerBacking.cpp:
1127         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1128         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1129         (WebCore::RenderLayerBacking::compositingLayerType):
1130
1131 2014-04-18  Commit Queue  <commit-queue@webkit.org>
1132
1133         Unreviewed, rolling out r167527.
1134         https://bugs.webkit.org/show_bug.cgi?id=131883
1135
1136         Broke 32-bit build (Requested by ap on #webkit).
1137
1138         Reverted changeset:
1139
1140         "[Mac] implement WebKitDataCue"
1141         https://bugs.webkit.org/show_bug.cgi?id=131799
1142         http://trac.webkit.org/changeset/167527
1143
1144 2014-04-18  Eric Carlson  <eric.carlson@apple.com>
1145
1146         [Mac] implement WebKitDataCue
1147         https://bugs.webkit.org/show_bug.cgi?id=131799
1148
1149         Reviewed by Dean Jackson.
1150
1151         Tests: http/tests/media/track-in-band-hls-metadata.html
1152                media/track/track-datacue-value.html
1153
1154         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
1155         * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
1156
1157         * CMakeLists.txt: Add JSDataCueCustom.cpp.
1158         * bindings/js/JSBindingsAllInOne.cpp:
1159         * WebCore.xcodeproj/project.pbxproj: Add new files.
1160
1161         * bindings/js/JSDataCueCustom.cpp: Added.
1162         (WebCore::JSDataCue::value): 
1163         (WebCore::JSDataCue::setValue):
1164         (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
1165
1166         * html/HTMLMediaElement.cpp:
1167         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
1168             events when paused, don't call sort on an Vector that can't be sorted.
1169
1170         * html/track/DataCue.cpp:
1171         (WebCore::DataCue::DataCue): Initialize m_type.
1172         (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
1173         (WebCore::DataCue::data): Ask the platform value for data if non-null.
1174         (WebCore::DataCue::setData): Clear m_platformValue and m_value.
1175         (WebCore::DataCue::isEqual): New.
1176         (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
1177             to the constructor/set by script.
1178         (WebCore::DataCue::setValue): Set m_value.
1179         * html/track/DataCue.h:
1180         * html/track/DataCue.idl:
1181
1182         * html/track/InbandDataTextTrack.cpp:
1183         (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
1184         (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
1185         (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
1186         (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
1187         * html/track/InbandDataTextTrack.h:
1188
1189         * html/track/InbandGenericTextTrack.cpp:
1190         (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
1191             of VTTCue.
1192         * html/track/InbandTextTrack.h:
1193
1194         * html/track/InbandWebVTTTextTrack.cpp:
1195         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
1196
1197         * html/track/TextTrack.cpp:
1198         (WebCore::TextTrack::hasCue): Ditto.
1199         * html/track/TextTrack.h:
1200
1201         * html/track/TextTrackCue.cpp:
1202         (WebCore::TextTrackCue::isEqual): New, test base class equality.
1203         * html/track/TextTrackCue.h:
1204
1205         * html/track/TextTrackCueGeneric.cpp:
1206         (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
1207         * html/track/TextTrackCueGeneric.h:
1208
1209         * html/track/VTTCue.cpp:
1210         (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
1211         * html/track/VTTCue.h:
1212
1213         * platform/SerializedPlatformRepresentation.h: Added.
1214         (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
1215         (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
1216
1217         * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
1218
1219         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
1220         (WebCore::InbandMetadataTextTrackPrivateAVF::create):
1221         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
1222         (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
1223         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
1224         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
1225         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
1226         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
1227
1228         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1229         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
1230         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
1231         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
1232         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1233         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
1234         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
1235
1236         Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
1237         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1238         (WebCore::AVFWrapper::currentTextTrack):
1239         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
1240         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
1241         (WebCore::AVFWrapper::setCurrentTextTrack):
1242         (WebCore::AVFWrapper::AVFWrapper):
1243         (WebCore::AVFWrapper::processCue):
1244         (WebCore::AVFWrapper::currentTrack): Deleted.
1245         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
1246         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
1247         (WebCore::AVFWrapper::setCurrentTrack): Deleted.
1248         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1249
1250         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1252         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1253         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
1254         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
1255         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
1256         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
1257         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
1258         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
1259         (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
1260         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
1261         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1262         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
1263
1264         Create a JSValue representation from an AVMetadataItem.
1265         * platform/mac/SerializedPlatformRepresentationMac.h: Added.
1266         (WebCore::SerializedPlatformRepresentationMac::platformType):
1267         (WebCore::SerializedPlatformRepresentationMac::nativeValue):
1268         * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
1269         (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
1270         (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
1271         (WebCore::SerializedPlatformRepresentationMac::create):
1272         (WebCore::SerializedPlatformRepresentationMac::data):
1273         (WebCore::SerializedPlatformRepresentationMac::deserialize):
1274         (WebCore::SerializedPlatformRepresentationMac::isEqual):
1275         (WebCore::toSerializedPlatformRepresentationMac):
1276         (WebCore::jsValueWithValueInContext):
1277         (WebCore::jsValueWithDataInContext):
1278         (WebCore::jsValueWithArrayInContext):
1279         (WebCore::jsValueWithDictionaryInContext):
1280         (WebCore::jsValueWithAVMetadataItemInContext):
1281
1282 2014-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
1283
1284         Harden RenderInline::inlineElementContinuation()
1285
1286         <https://bugs.webkit.org/show_bug.cgi?id=131858>
1287
1288         Reviewed by Sam Weinig.
1289
1290         No new tests, as there are no known cases of this happening.
1291
1292         * rendering/RenderInline.cpp:
1293         (WebCore::RenderInline::inlineElementContinuation):
1294         Return nullptr if the continuation is neither a RenderInline nor a
1295         RenderBlock.
1296
1297 2014-04-18  Stephanie Lewis  <slewis@apple.com>
1298
1299         We shouldn’t create page throttlers for other pages than WebKit2 pages.
1300         Part of <rdar://problem/16473045> Visibility state counters are often incorrect
1301         https://bugs.webkit.org/show_bug.cgi?id=131696
1302
1303         Reviewed by Gavin Barraclough.
1304
1305         No new test since not web exposed.
1306
1307         Page throttlers were being created for SVG images and other page instances that
1308         were not accurately tracking the states that enable and disable page throttling.
1309         Make the throttler an unique ptr and only initialize it for WebKit2.
1310
1311         This also fixes an inefficiency where we would throttle a new page on creation because 
1312         we assumed it was visible even if that was not the case.
1313
1314         * WebCore.exp.in:
1315         * html/HTMLMediaElement.cpp:
1316         (WebCore::HTMLMediaElement::parseAttribute): Check page throttler exists.
1317         * loader/FrameLoader.cpp:
1318         (WebCore::FrameLoader::started): ditto
1319         * page/Page.cpp:
1320         (WebCore::Page::Page): Don’t automatically create page throttler.
1321         (WebCore::Page::createPageThrottler): Create page throttler.
1322         (WebCore::Page::setViewState): Check page throttler exists.
1323         * page/Page.h:
1324         (WebCore::Page::pageThrottler): Make the page throttler a unique ptr.
1325         * page/PageThrottler.h:
1326         * page/Settings.cpp: 
1327         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Check page throttler exists.
1328
1329 2014-04-18  Stephanie Lewis  <slewis@apple.com>
1330
1331         Move DOM throttling out of the page throttler
1332         <rdar://problem/16473004>
1333         https://bugs.webkit.org/show_bug.cgi?id=131697
1334
1335         Reviewed by Gavin Barraclough.
1336
1337         No new tests since it's not web exposed.
1338
1339         DOM timer throttling is currently part of the page throttler which uses per process 
1340         state and per page state to determine when to throttle.  This led us to being overly 
1341         conservative when turning DOM throttling off.  It should only respond to view state changes.
1342
1343         Additionally since creating extra page throttlers SVG images caused bugs 
1344         in tracking state we'll reserve the page throttler for WebKit2 views.  To avoid regressing 
1345         WebKit1 we should move DOM timer throttling back to the page.
1346
1347         * page/Page.cpp:
1348         (WebCore::Page::Page): set DOM timer throttling.
1349         (WebCore::Page::setIsVisuallyIdleInternal): ditto.
1350         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): ditto.
1351         (WebCore::Page::setIsVisible): Update view state masks for WebKit1 to include IsVisibleOrOccluded and IsVisuallyIdle
1352         * page/Page.h:
1353         * page/PageThrottler.cpp:
1354         (WebCore::PageThrottler::PageThrottler): remove DOM timer throttling.
1355         (WebCore::PageThrottler::started): ditto.
1356         (WebCore::PageThrottler::stopped): ditto.
1357         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged): Deleted.
1358         * page/PageThrottler.h:
1359         * page/Settings.cpp:
1360         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
1361
1362 2014-04-18  Dean Jackson  <dino@apple.com>
1363
1364         [WebGL] Limit maximum texture sizes on older Intel hardware
1365         https://bugs.webkit.org/show_bug.cgi?id=131867
1366
1367         Reviewed by Geoffrey Garen.
1368
1369         Both Chrome and Firefox limit the MAX_TEXTURE_SIZE on
1370         older Intel hardware to be at most 4096. This does the
1371         same for WebKit.
1372
1373         * platform/graphics/Extensions3D.h: Add requiresRestrictedMaximumTextureSize() accessor.
1374         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1375         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): Record the value of GL_RENDERER
1376         and test for "Intel HD Graphics 3000", which is the problematic hardware.
1377         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
1378         (WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize): Getter.
1379         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1380         (WebCore::GraphicsContext3D::getIntegerv): If you're asking for MAX_TEXTURE_SIZE or
1381         MAX_CUBE_MAP_TEXTURE_SIZE, and you're on problematic hardware, return a clamped value
1382         (4096 and 1024 respectively).
1383
1384 2014-04-18  Hans Muller  <hmuller@adobe.com>
1385
1386         [CSS Shapes] Add parsing support for gradients
1387         https://bugs.webkit.org/show_bug.cgi?id=131444
1388
1389         Reviewed by Bem Jones-Bey.
1390
1391         Added support for shape-outside gradient values.
1392
1393         Test: fast/shapes/shape-outside-floats/shape-outside-linear-gradient.html
1394
1395         * css/DeprecatedStyleBuilder.cpp:
1396         (WebCore::ApplyPropertyShape::applyValue): Accept generated images as shape-outside values.
1397         * rendering/shapes/ShapeOutsideInfo.cpp:
1398         (WebCore::checkShapeImageOrigin): Generated images get a pass, others do not.
1399         (WebCore::getShapeImageAndRect): Use StyleImage::image() to get a generated image.
1400         (WebCore::ShapeOutsideInfo::isEnabledFor):
1401         * rendering/style/ShapeValue.h:
1402         (WebCore::ShapeValue::isImageValid): Generated images are always considered valid.
1403
1404 2014-04-18  Brady Eidson  <beidson@apple.com>
1405
1406         REGRESSION (r155700): Pasting an image into content-editable regions is broken.
1407         <rdar://problem/16654156> and https://bugs.webkit.org/show_bug.cgi?id=131844
1408
1409         Reviewed by Enrica Casucci.
1410
1411         * editing/mac/EditorMac.mm:
1412         (WebCore::Editor::createFragmentForImageResourceAndAddResource): Add the ArchiveResource before
1413           creating the element that uses it.
1414
1415 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
1416
1417         [iOS WK2] Make window.scroll() and window.scrollBy() work
1418         https://bugs.webkit.org/show_bug.cgi?id=131848
1419         <rdar://problem/16638319>
1420
1421         Reviewed by Beth Dakin.
1422
1423         The scrolling-related functions in DOMWindow were #ifdeffed for iOS
1424         to use the hacky WK1-specific "actual scroll" functions, which do nothing
1425         in WK2.
1426         
1427         Fix by adding a scroll position wrapper (contentsScrollPosition) which does
1428         the right thing on WK1 and WK2, and change almost all the places that used "actualScrollPosition"
1429         to us it (with the exception of contentsScrollOffset() in MouseRelatedEvent.cpp, which has
1430         confusing scaling behavior).
1431
1432         * dom/MouseRelatedEvent.cpp:
1433         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1434         * dom/TreeScope.cpp:
1435         (WebCore::nodeFromPoint): Remove #ifdefs. 
1436         * html/HTMLBodyElement.cpp:
1437         (WebCore::HTMLBodyElement::scrollLeft):
1438         (WebCore::HTMLBodyElement::scrollTop):
1439         * page/DOMWindow.cpp:
1440         (WebCore::DOMWindow::scrollX):
1441         (WebCore::DOMWindow::scrollY):
1442         (WebCore::DOMWindow::scrollBy):
1443         (WebCore::DOMWindow::scrollTo):
1444         * platform/ScrollView.cpp:
1445         (WebCore::ScrollView::contentsScrollPosition):
1446         (WebCore::ScrollView::setContentsScrollPosition):
1447         * platform/ScrollView.h:
1448
1449 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
1450
1451         Worse animation performance on pages with 3D transforms
1452         https://bugs.webkit.org/show_bug.cgi?id=131838
1453         <rdar://problem/16428630&15705876>
1454
1455         Reviewed by Dean Jackson.
1456         
1457         r155977 added logic to adjust the contentsScale of compositing layers
1458         based on a root-relative transform. However, this resulted in
1459         the contentsScale continually changing on layers whose transforms
1460         are changed dynamically, which caused lots of expensive painting.
1461         
1462         Fix by bucketing the part of the scale computed from the root-relative transform
1463         into buckets of 0.25 via rounding.
1464
1465         Test: compositing/contents-scale/rounded-contents-scale.html
1466
1467         * platform/graphics/ca/GraphicsLayerCA.cpp:
1468         (WebCore::clampedContentsScaleForScale):
1469         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1470         (WebCore::GraphicsLayerCA::updateContentsScale):
1471         (WebCore::GraphicsLayerCA::updateContentsVisibility): Deleted.
1472         (WebCore::GraphicsLayerCA::animatedLayerClones): Deleted.
1473
1474 2014-04-18  Simon Fraser  <simon.fraser@apple.com>
1475
1476         Remove some includes from image-related headers, and Document.h
1477         https://bugs.webkit.org/show_bug.cgi?id=131797
1478
1479         Reviewed by Martin Robinson.
1480
1481         Remove some #includes from Document.h, DragImage.h, GradientImage.h,
1482         Image.h, and ImageBuffer.h and deal with the fallout.
1483
1484         * dom/ContainerNode.h:
1485         * dom/Document.cpp:
1486         (WebCore::Document::setInputCursor):
1487         * dom/Document.h:
1488         (WebCore::Document::inputCursor):
1489         * dom/MutationObserverRegistration.cpp:
1490         * html/canvas/WebGLRenderingContext.cpp:
1491         * page/FrameSnapshotting.cpp:
1492         * page/Page.cpp:
1493         * platform/DragImage.h:
1494         * platform/graphics/BitmapImage.cpp:
1495         * platform/graphics/GradientImage.cpp:
1496         (WebCore::GradientImage::GradientImage):
1497         (WebCore::GradientImage::~GradientImage):
1498         * platform/graphics/GradientImage.h:
1499         * platform/graphics/Image.h:
1500         * platform/graphics/ImageBuffer.cpp:
1501         * platform/graphics/ImageBuffer.h:
1502         (WebCore::ImageBuffer::create):
1503         (WebCore::ImageBuffer::internalSize):
1504         (WebCore::ImageBuffer::logicalSize):
1505         (WebCore::ImageBuffer::baseTransform):
1506         (WebCore::ImageBuffer::spaceSize):
1507         (WebCore::ImageBuffer::setSpaceSize):
1508         * rendering/RenderThemeMac.mm:
1509         * rendering/shapes/Shape.cpp:
1510         * rendering/svg/RenderSVGContainer.cpp:
1511         * svg/SVGURIReference.h:
1512
1513 2014-04-18  Gabor Rapcsanyi  <rgabor@webkit.org>
1514
1515         Unreviewed. ARM64 buildfix after r167473.
1516
1517         * platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.
1518
1519 2014-04-18  Radu Stavila  <stavila@adobe.com>
1520
1521         [CSSRegions] Incorrect background paint on positioned element hover
1522         https://bugs.webkit.org/show_bug.cgi?id=131617
1523
1524         Reviewed by Andrei Bucur.
1525
1526         When computing the repaint rect for absolute elements flowed into regions, the Y location of the
1527         region within the flow thread must no longer be added to the repaint rect's location because absolute
1528         positioned elements get pushed down through the regions by their absolute top. So adding the region's
1529         position in the flow thread and then adding the element's absolute top would cause us to add
1530         something twice.
1531
1532         Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html
1533
1534         * rendering/RenderBox.cpp:
1535         (WebCore::RenderBox::computeRectForRepaint):
1536
1537 2014-04-18  Philippe Normand  <pnormand@igalia.com>
1538
1539         Remove NETWORK_INFO support
1540         https://bugs.webkit.org/show_bug.cgi?id=131841
1541
1542         Reviewed by Gyuyoung Kim.
1543
1544         * CMakeLists.txt:
1545         * Modules/networkinfo/NavigatorNetworkInfoConnection.cpp: Removed.
1546         * Modules/networkinfo/NavigatorNetworkInfoConnection.h: Removed.
1547         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Removed.
1548         * Modules/networkinfo/NetworkInfo.cpp: Removed.
1549         * Modules/networkinfo/NetworkInfo.h: Removed.
1550         * Modules/networkinfo/NetworkInfoClient.h: Removed.
1551         * Modules/networkinfo/NetworkInfoConnection.cpp: Removed.
1552         * Modules/networkinfo/NetworkInfoConnection.h: Removed.
1553         * Modules/networkinfo/NetworkInfoConnection.idl: Removed.
1554         * Modules/networkinfo/NetworkInfoController.cpp: Removed.
1555         * Modules/networkinfo/NetworkInfoController.h: Removed.
1556         * PlatformEfl.cmake:
1557         * dom/EventTargetFactory.in:
1558         * platform/efl/NetworkInfoProviderEfl.cpp: Removed.
1559         * platform/efl/NetworkInfoProviderEfl.h: Removed.
1560         * testing/Internals.cpp:
1561         (WebCore::Internals::setNetworkInformation): Deleted.
1562         * testing/Internals.h:
1563         * testing/Internals.idl:
1564
1565 2014-04-17  Commit Queue  <commit-queue@webkit.org>
1566
1567         Unreviewed, rolling out r167478.
1568         https://bugs.webkit.org/show_bug.cgi?id=131840
1569
1570         Broke multicol tests (Requested by ap on #webkit).
1571
1572         Reverted changeset:
1573
1574         "[New Multicolumn] Pagination mode messed up with non-inline
1575         axis and reversed direction."
1576         https://bugs.webkit.org/show_bug.cgi?id=131811
1577         http://trac.webkit.org/changeset/167478
1578
1579 2014-04-17  Daniel Bates  <dabates@apple.com>
1580
1581         [iOS] Hook up screen.{availHeight, availWidth, height, width}
1582         https://bugs.webkit.org/show_bug.cgi?id=131821
1583         <rdar://problem/16413795>
1584
1585         Reviewed by Benjamin Poulain and Tim Horton.
1586
1587         Implement support for screen.{availHeight, availWidth, height, width} in WebKit2 for iOS.
1588
1589         Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
1590
1591         * WebCore.exp.in: Export symbol for WebCore System Interface function
1592         _wkGetAvailableScreenSize.
1593         * dom/Document.cpp:
1594         (WebCore::Document::processViewport): Modified to call Chrome::screenSize(); formerly it
1595         called ChromeClient::viewportScreenSize().
1596         * page/Chrome.cpp:
1597         (WebCore::Chrome::screenSize): Added; turns around and calls ChromeClient::screenSize().
1598         (WebCore::Chrome::availableScreenSize): Added; turns around and calls ChromeClient::availableScreenSize().
1599         * page/Chrome.h:
1600         * page/ChromeClient.h:
1601         (WebCore::ChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
1602         (WebCore::ChromeClient::availableScreenSize): Added; default implementation, which
1603         returns the size of Chrome::windowRect().
1604         * page/ViewportConfiguration.cpp:
1605         (WebCore::ViewportConfiguration::textDocumentParameters):
1606         * platform/HostWindow.h: Added declarations for availableScreenSize() and screenSize()
1607         so that a caller (e.g. WebCore::screenRect()) can query for such screen information using
1608         only the HostWindow interface. That is, a caller doesn't need to know about ChromeClient.
1609         * platform/ios/PlatformScreenIOS.mm:
1610         (WebCore::screenRect): Modified to query HostWindow::screenSize() when computing the
1611         screen rectangle in WebKit2 for iOS.
1612         (WebCore::screenAvailableRect): Modified to query HostWindow::availableScreenSize()
1613         when computing the available screen rectangle in WebKit2 for iOS.
1614         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1615         * platform/mac/WebCoreSystemInterface.h:
1616
1617 2014-04-17  Darin Adler  <darin@apple.com>
1618
1619         origin spoofing possible (HTTP Origin, postMessage event.origin) due to inappropriate URL escape sequence decoding
1620         https://bugs.webkit.org/show_bug.cgi?id=131837
1621         rdar://problem/15211936
1622
1623         Reviewed by Anders Carlsson and Dave Hyatt.
1624
1625         Tests: fast/dom/DOMURL/parsing.html
1626                fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html
1627
1628         * platform/URL.cpp:
1629         (WebCore::URL::host): Removed unnecessary call to decodeURLEscapeSequences, which caused
1630         problems and was not needed.
1631
1632 2014-04-17  David Hyatt  <hyatt@apple.com>
1633
1634         [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
1635         https://bugs.webkit.org/show_bug.cgi?id=131811
1636
1637         Reviewed by Dean Jackson.
1638
1639         Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
1640         
1641         With block axis pagination mode, it is possible to set a column height that is not the same
1642         as the available fill height for a block. The new multi-column code had the assumption that
1643         the column height was the same as the amount of fill room you had available. This is not
1644         the case.
1645         
1646         To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
1647         available column height as a separate variable from the computed column height. This allows
1648         the pagination API to specify a different column height that is not the same as the view's
1649         content height.
1650
1651         Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
1652         RenderView to work with the new column code as well.
1653
1654         * rendering/RenderMultiColumnSet.cpp:
1655         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1656         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
1657         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
1658         * rendering/RenderMultiColumnSet.h:
1659         * rendering/RenderView.cpp:
1660         (WebCore::RenderView::pageOrViewLogicalHeight):
1661
1662 2014-04-17  Anders Carlsson  <andersca@apple.com>
1663
1664         Build fix.
1665
1666         * svg/animation/SMILTime.h:
1667
1668 2014-04-17  Bem Jones-Bey  <bjonesbe@adobe.com>
1669
1670         Unreviewed, rolling out r167384.
1671
1672         Sounds like this isn't the right fix, and causes generation to
1673         run far too often.
1674
1675         Reverted changeset:
1676
1677         "Fix CodeGenerator.pm to only write files if the generated
1678         content has changed"
1679         https://bugs.webkit.org/show_bug.cgi?id=131756
1680         http://trac.webkit.org/changeset/167384
1681
1682 2014-04-17  Ryuan Choi  <ryuan.choi@samsung.com>
1683
1684         Remove unnecessary MathExtras.h includes
1685         https://bugs.webkit.org/show_bug.cgi?id=131789
1686
1687         Reviewed by Anders Carlsson.
1688
1689         * platform/FileSystem.h:
1690         * platform/Scrollbar.h:
1691         * platform/animation/AnimationUtilities.h:
1692         * platform/audio/DenormalDisabler.h:
1693         * platform/graphics/Font.h:
1694         * platform/graphics/IntPoint.h: Included cmath instad of MathExtras.h.
1695         * platform/graphics/LayoutPoint.h:
1696         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1697         * rendering/svg/SVGMarkerData.h:
1698         * svg/animation/SMILTime.h:
1699
1700 2014-04-16  Huang Dongsung  <luxtella@company100.net>
1701
1702         Make RenderLayerBacking get the timingFunction of the correct animation.
1703         https://bugs.webkit.org/show_bug.cgi?id=100632
1704
1705         Reviewed by Simon Fraser.
1706
1707         When an element has multiple animations that have different timingFunctions,
1708         the progress of each animation should be calculated using its respective
1709         timingFunction. But at this point, the timingFunction of the first animation is
1710         only used in RenderLayerBacking::startAnimation(), regardless of how many
1711         animations the element has.
1712
1713         getAnimationFromStyleByName() was introduced in r89462 so that the
1714         timingFunction of the correct animation searched by its name would be
1715         used. This patch moves the function to KeyframeValue::timingFunction()
1716         so that RenderLayerBacking reuses this method.
1717
1718         Test: animations/keyframe-multiple-timing-functions-transform.html
1719
1720         * page/animation/KeyframeAnimation.cpp:
1721         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1722         * rendering/RenderLayerBacking.cpp:
1723         (WebCore::RenderLayerBacking::startAnimation):
1724         * rendering/style/KeyframeList.cpp:
1725         (WebCore::KeyframeValue::timingFunction):
1726         (WebCore):
1727         * rendering/style/KeyframeList.h:
1728         (WebCore):
1729         (KeyframeValue):
1730
1731 2014-04-17  Andreas Kling  <akling@apple.com>
1732
1733         Rollout: Add a way to cache never-changing IDL attributes in the wrapper.
1734         <https://webkit.org/b/131759>
1735
1736         This behavior may be observable from the web, so we can't do it this way.
1737
1738         * bindings/scripts/CodeGeneratorJS.pm:
1739         (GenerateImplementation):
1740         * bindings/scripts/IDLAttributes.txt:
1741         * bindings/scripts/test/*:
1742         * dom/Element.idl:
1743         * dom/Node.idl:
1744
1745 2014-04-17  Andreas Kling  <akling@apple.com>
1746
1747         Cheesy Mountain Lion build fix.
1748
1749         * platform/MemoryPressureHandler.h:
1750         (WebCore::MemoryPressureHandler::ReliefLogger::logString):
1751
1752 2014-04-17  David Hyatt  <hyatt@apple.com>
1753
1754         [New Multicolumn] Column rules don't respect the specified stacking order.
1755         https://bugs.webkit.org/show_bug.cgi?id=131804
1756
1757         Reviewed by Beth Dakin.
1758
1759         Added fast/multicol/newmulticol/compare_with_old_impl/column-rules-stacking.html
1760
1761         * rendering/RenderBlockFlow.cpp:
1762         (WebCore::RenderBlockFlow::paintBoxDecorations):
1763         * rendering/RenderBlockFlow.h:
1764         Override paintBoxDecorations for block flows so that we can iterate over our column sets
1765         and paint their rules just after painting our background and border. We can't wait until
1766         the child column sets paint their backgrounds, since that is specified as being above negative
1767         z-index children. We have to pretend that the column sets don't exist as
1768         far as column rule painting is concerned.
1769
1770         * rendering/RenderMultiColumnSet.cpp:
1771         (WebCore::RenderMultiColumnSet::paintObject): Deleted.
1772         * rendering/RenderMultiColumnSet.h:
1773         Turn paintObject in RenderMultiColumnSet into an override that doesn't paint anything.
1774
1775 2014-04-17  Beth Dakin  <bdakin@apple.com>
1776
1777         Hit-testing is incorrect for plugins inside iframes when there is a 
1778         topContentInset
1779         https://bugs.webkit.org/show_bug.cgi?id=131826
1780         -and corresponding-
1781         <rdar://problem/16649996>
1782
1783         Reviewed by Tim Horton.
1784
1785         I missed one coordinate-conversion spot when getting hit-testing to work. Like 
1786         headerHeight() which also manipulates the location of the root layer, 
1787         topContentInset() has to be factored into all of these conversions.
1788         * page/FrameView.cpp:
1789         (WebCore::FrameView::convertFromRenderer):
1790
1791 2014-04-17  Andreas Kling  <akling@apple.com>
1792
1793         Stub out MemoryPressureHandler::ReliefLogger on older OS X'es.
1794
1795         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1796         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
1797         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
1798
1799 2014-04-17  Dirk Schulze  <krit@webkit.org>
1800
1801         Remove CANVAS_PATH where possible
1802         https://bugs.webkit.org/show_bug.cgi?id=131788
1803
1804         Reviewed by Dean Jackson.
1805
1806         Since Firefox and Chrome ship the same interoperable subset of Path2D soon, 
1807         it is time to remove CANVAS_PATH where possible.
1808
1809         * html/canvas/CanvasRenderingContext2D.cpp:
1810         (WebCore::CanvasRenderingContext2D::clip):
1811         (WebCore::CanvasRenderingContext2D::isPointInStroke):
1812         * html/canvas/CanvasRenderingContext2D.h:
1813         * html/canvas/CanvasRenderingContext2D.idl:
1814         * html/canvas/DOMPath.h:
1815         * html/canvas/DOMPath.idl:
1816
1817 2014-04-17  Brendan Long  <b.long@cablelabs.com>
1818
1819         [GStreamer] Store TrackPrivateBaseGStreamer's label and language as AtomicStrings
1820         https://bugs.webkit.org/show_bug.cgi?id=130404
1821
1822         Reviewed by Philippe Normand.
1823
1824         No new tests, this just makes things more efficient.
1825
1826         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1827         (WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
1828         (WebCore::TrackPrivateBaseGStreamer::getTag):
1829         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1830
1831 2014-04-17  Andreas Kling  <akling@apple.com>
1832
1833         Fix Cocoa build.
1834
1835         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1836         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
1837
1838 2014-04-17  Rik Cabanier  <cabanier@adobe.com>
1839
1840         [CSS Blending] Remove the -webkit- prefix for mix-blend-mode and isolation CSS properties
1841         https://bugs.webkit.org/show_bug.cgi?id=131355
1842
1843         Reviewed by Dean Jackson.
1844
1845         Removed webkit prefix from mix-blend-mode and isolation. These properties
1846         never shipped and their spec is now in CR.
1847
1848         Covered by existing tests.
1849
1850         * css/CSSComputedStyleDeclaration.cpp:
1851         (WebCore::ComputedStyleExtractor::propertyValue):
1852         * css/CSSParser.cpp:
1853         (WebCore::isValidKeywordPropertyAndValue):
1854         (WebCore::isKeywordPropertyID):
1855         (WebCore::CSSParser::parseValue):
1856         * css/CSSPropertyNames.in:
1857         * css/DeprecatedStyleBuilder.cpp:
1858         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1859
1860 2014-04-17  David Kilzer  <ddkilzer@apple.com>
1861
1862         Tidy up isIsolatedInline() and highestContainingIsolateWithinRoot()
1863         <http://webkit.org/b/131117>
1864
1865         Reviewed by Daniel Bates.
1866
1867         Based on review feedback for r166650.
1868
1869         * rendering/InlineIterator.h:
1870         (WebCore::isIsolatedInline):
1871         - Switch argument to a reference since it is never called with a
1872           nullptr.
1873         (WebCore::highestContainingIsolateWithinRoot):
1874         - Switch first argument to a reference since it's never a
1875           nullptr.
1876         - Use nullptr for pointer initialization.
1877         - Switch while() loop to for() loop. Pass reference to
1878           isIsolatedInline().
1879         (WebCore::numberOfIsolateAncestors):
1880         - Switch while() loop to for() loop. Pass reference to
1881           isIsolatedInline().
1882         * rendering/RenderBlockLineLayout.cpp:
1883         (WebCore::constructBidiRunsForSegment):
1884         - Rename startObj to startObject.
1885         - No longer need to pass the address of startObject here.
1886
1887 2014-04-17  Andreas Kling  <akling@apple.com>
1888
1889         Log number of bytes reclaimed at each step of memory pressure relief.
1890         <https://webkit.org/b/131751>
1891
1892         Reviewed by Antti Koivisto.
1893
1894         * platform/MemoryPressureHandler.h:
1895         * platform/MemoryPressureHandler.cpp:
1896         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
1897         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
1898         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
1899         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
1900         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1901         (WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformMemoryUsage):
1902         (WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformLog):
1903
1904             Add a simple RAII helper to check memory usage before and after
1905             a block of code, and then dump the delta to system log.
1906
1907         (WebCore::MemoryPressureHandler::releaseMemory):
1908         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1909         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1910
1911             Use ReliefLogger to annotate the various attempts to reduce
1912             our memory footprint. This will help us understand the efficiency
1913             of our current strategy.
1914
1915 2014-04-17  David Hyatt  <hyatt@apple.com>
1916
1917         [New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
1918         https://bugs.webkit.org/show_bug.cgi?id=131740
1919
1920         Reviewed by Enrica Casucci.
1921         
1922         I took the opportunity to clean this code up while adding support for the new columns.
1923         columnNumberForOffset only applied for paginated RenderViews and was really about
1924         pages and not columns. It also only returns an actual page number if the columns are
1925         block progressed (e.g., right-to-left vertical Japanese books).
1926         
1927         Therefore I renamed columnNumberForOffset to pageNumberForBlockProgressionOffset and
1928         moved it to RenderView.
1929         
1930         I also renamed the member variable of SelectionRect to be pageNumber instead of
1931         columnNumber in order to make it more obvious that this isn't about columns per se
1932         (since the fact that we implemented RenderView's pagination mode using columns is an
1933         implementation detail).
1934
1935         * dom/Range.cpp:
1936         (WebCore::coalesceSelectionRects):
1937         (WebCore::Range::collectSelectionRects):
1938         * platform/ios/SelectionRect.h:
1939         (WebCore::SelectionRect::pageNumber):
1940         (WebCore::SelectionRect::columnNumber): Deleted.
1941         * rendering/RenderImage.cpp:
1942         (WebCore::RenderImage::collectSelectionRects):
1943         * rendering/RenderObject.cpp:
1944         (WebCore::RenderObject::collectSelectionRects):
1945         (WebCore::RenderObject::columnNumberForOffset): Deleted.
1946         * rendering/RenderObject.h:
1947         * rendering/RenderText.cpp:
1948         (WebCore::RenderText::collectSelectionRects):
1949         * rendering/RenderView.cpp:
1950         (WebCore::RenderView::pageNumberForBlockProgressionOffset):
1951         * rendering/RenderView.h:
1952
1953 2014-04-16  Brent Fulgham  <bfulgham@apple.com>
1954
1955         [Win] A few final cleanups to the DataObject classes.
1956         https://bugs.webkit.org/show_bug.cgi?id=131784
1957
1958         Reviewed by Anders Carlsson.
1959
1960         * platform/win/WCDataObject.cpp:
1961         (WebCore::WCDataObject::clearData): Use 'last()' method.
1962
1963 2014-04-15  Jer Noble  <jer.noble@apple.com>
1964
1965         Fullscreen media controls are unusable in pagination mode
1966         https://bugs.webkit.org/show_bug.cgi?id=131705
1967
1968         Reviewed by Darin Adler.
1969
1970         When pagination mode is enabled, the full screen media will (depending on the width of the
1971         pagination columns) overflow its column, and hit testing will be clipped to the column. In extreme
1972         cases, where the column width < 0.5 * media element width, the media controls will be entirely
1973         unclickable.
1974
1975         Rather than making the RenderFullScreen a child of the full screen element's parent's renderer,
1976         make it a child of the RenderView, putting it outside of the columns entirely. Always create and
1977         insert the fullscreenRenderer's placeholder, using it as the remembered insertion point for the
1978         fullscreen element's renderer when we exit full screen.
1979
1980         Drive-by fix: don't wrap the full screen element's renderer in webkitWillEnterFullScreenForElement();
1981         it will just be re-wrapped in createRendererIfNeeded().
1982
1983         * dom/Document.cpp:
1984         (WebCore::Document::webkitWillEnterFullScreenForElement): Don't wrap the full screen element's renderer.
1985         (WebCore::Document::setFullScreenRenderer): Call setPlaceholderStyle.
1986         * rendering/RenderFullScreen.cpp:
1987         (WebCore::RenderFullScreenPlaceholder::willBeDestroyed): Call clearPlaceholder.
1988         (WebCore::RenderFullScreen::wrapRenderer): Make fullscreenRenderer a child of the view().
1989         (WebCore::RenderFullScreen::unwrapRenderer): Return the children to the parent of the placeholder().
1990         (WebCore::RenderFullScreen::clearPlaceholder): Renamed from setPlaceholder().
1991         (WebCore::RenderFullScreen::ensurePlaceholder): Added. 
1992         (WebCore::RenderFullScreen::setPlaceholderStyle): Renamed from createPlaceholder().
1993         (WebCore::RenderFullScreen::setPlaceholder): Deleted.
1994         (WebCore::RenderFullScreen::createPlaceholder): Deleted.
1995         * rendering/RenderFullScreen.h:
1996
1997 2014-04-16  Jer Noble  <jer.noble@apple.com>
1998
1999         [MSE] Multiple initialization segments with same codecs in tracks fail validation.
2000         https://bugs.webkit.org/show_bug.cgi?id=131768
2001
2002         Additional initialization segments added to the same SourceBuffer with the same
2003         codec values will fail validation. Update the validation check to add the correct
2004         codec information for the initial segment, and check against the correct codecs during
2005         the validation step.
2006
2007         Additionally, after validation, if successful update the Audio, Video, and TextTracks
2008         for the SourceBuffer with the updated initialization segment information.
2009
2010         Reviewed by Eric Carlson.
2011
2012         Test: media/media-source/media-source-multiple-initialization-segments.html
2013
2014         * Modules/mediasource/SourceBuffer.cpp:
2015         (WebCore::SourceBuffer::appendBufferTimerFired): m_source may have been cleared
2016             as a result of the append, so check it before using.
2017         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Call streamEndedWithError
2018             instead of endOfStream as the latter is safe to call within an update.
2019         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto.
2020             Update the track lists if validation succeeds.
2021         (WebCore::SourceBuffer::validateInitializationSegment): Switch the audio and video
2022             codec checks.
2023
2024         Add the ability for Audio, Video, and InbandTextTracks to replace their private tracks:
2025         * html/track/AudioTrack.cpp:
2026         (WebCore::AudioTrack::AudioTrack): Call updateKindFromPrivate().
2027         (WebCore::AudioTrack::setPrivate):
2028         (WebCore::AudioTrack::updateKindFromPrivate): Split out from constructor.
2029         * html/track/AudioTrack.h:
2030         * html/track/InbandTextTrack.cpp:
2031         (WebCore::InbandTextTrack::InbandTextTrack): Call updateKindFromPrivate().
2032         (WebCore::InbandTextTrack::setPrivate):
2033         (WebCore::InbandTextTrack::setMode): Split up into setModeInternal().
2034         (WebCore::InbandTextTrack::setModeInternal): Broke out from setMode().
2035         (WebCore::InbandTextTrack::updateKindFromPrivate): Split out from constructor.
2036         * html/track/InbandTextTrack.h:
2037         * html/track/TextTrack.h:
2038         (WebCore::TextTrack::isInband): Added, returns false.
2039         * html/track/VideoTrack.cpp:
2040         (WebCore::VideoTrack::VideoTrack): Call updateKindFromPrivate().
2041         (WebCore::VideoTrack::setPrivate):
2042         (WebCore::VideoTrack::updateKindFromPrivate):  Split out from constructor.
2043         * html/track/VideoTrack.h:
2044
2045 2014-04-17  David Hyatt  <hyatt@apple.com>
2046
2047         [New Multicolumn] Column sets below spanners don't repaint properly.
2048         https://bugs.webkit.org/show_bug.cgi?id=131778
2049
2050         Reviewed by Beth Dakin.
2051
2052         Added fast/repaint/spanner-with-margins.html.
2053
2054         * rendering/RenderBox.cpp:
2055         (WebCore::RenderBox::computeRectForRepaint):
2056         Turn off some code that was running for in-flow RenderFlowThreads that made no sense.
2057         I'm not convinced the code is right for other types of RenderFlowThreads either,
2058         but will leave that to the named flow thread experts. :)
2059
2060 2014-04-17  Koji Ishii  <kojishi@gmail.com>
2061
2062         Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
2063         https://bugs.webkit.org/show_bug.cgi?id=131175
2064
2065         Reviewed by Darin Adler.
2066
2067         Tests: html5lib/resources/ruby.dat
2068                html5lib/resources/tests19.dat
2069
2070         This patch makes WebKit HTML parser to match to the tag omission rules of HTML5 CR Feb 2014:
2071         http://www.w3.org/TR/2014/CR-html5-20140204/syntax.html#syntax-tag-omission
2072         with the support for two new elements (rb, rtc) which were also defined in the spec:
2073         http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rb-element
2074         http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rtc-element
2075         to better support use cases presented by W3C I18N WG:
2076         http://www.w3.org/TR/ruby-use-cases/
2077
2078         * html/HTMLTagNames.in: rb and rtc added as HTMLElement interfaces.
2079         * html/parser/HTMLConstructionSite.cpp:
2080         (WebCore::hasImpliedEndTag): the spec says rb and rtc have implied end tags.
2081         * html/parser/HTMLTreeBuilder.cpp:
2082         (WebCore::HTMLTreeBuilder::processStartTagForInBody): rb and rtc added. rt excludes rtc from its implied end tags.
2083
2084 2014-04-17  Darin Adler  <darin@apple.com>
2085
2086         Try to fix EFL and GTK builds.
2087
2088         * workers/WorkerGlobalScope.idl: Touch file to make it rebuild, assuming that
2089         module dependencies aren't working right with CMake. Tweaked formatting quite a
2090         bit while I was in here.
2091
2092 2014-04-17  David Hyatt  <hyatt@apple.com>
2093
2094         [New Multicolumn] REGRESSION: Column set styles don't update when zooming etc.
2095         https://bugs.webkit.org/show_bug.cgi?id=131777
2096
2097         Reviewed by Enrica Casucci.
2098
2099         Added fast/multicol/zoom-test.html
2100
2101         * rendering/RenderBlockFlow.cpp:
2102         (WebCore::RenderBlockFlow::styleDidChange):
2103         Put back in the code that propagates new styles to the flow thread and column sets
2104         when styles change. This propagation was removed when the column span code landed.
2105         This patch puts it back in but qualifies the types of objects that get styles
2106         propagated to avoid accidentally propagating the wrong style to column spans.
2107
2108 2014-04-17  Darin Adler  <darin@apple.com>
2109
2110         Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
2111         https://bugs.webkit.org/show_bug.cgi?id=131785
2112         rdar://problem/16003108
2113
2114         Reviewed by Brady Eidson.
2115
2116         * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
2117
2118         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Use the new conditional
2119         instead of the old one.
2120         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Ditto.
2121         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Ditto.
2122
2123 2014-04-17  Dan Bernstein  <mitz@apple.com>
2124
2125         WebCore part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
2126         https://bugs.webkit.org/show_bug.cgi?id=131783
2127
2128         Reviewed by Tim Horton.
2129
2130         * loader/NavigationAction.cpp:
2131         (WebCore::NavigationAction::NavigationAction): Initialize m_processingUserGesture to
2132         ScriptController::processingUserGesture() at the time the NavigationAction is constructed.
2133         * loader/NavigationAction.h:
2134         Added boolean member variable m_processionUserGesture
2135         (WebCore::NavigationAction::processingUserGesture): Added this getter.
2136
2137 2014-04-17  Ion Rosca  <rosca@adobe.com>
2138
2139         [CSS Blending] Isolation descendant dependent flags are not updated correctly
2140         https://bugs.webkit.org/show_bug.cgi?id=130892
2141
2142         Reviewed by Dean Jackson.
2143
2144         The isolation descendant dependent flag (m_hasUnisolatedBlendingDescendants)
2145         will help us to determine if a layer should isolate blending descendants or not.
2146         The m_hasUnisolatedBlendingDescendants flag should be set for layers that have blending descendant layers
2147         not isolated by descendant stacking contexts.
2148         An element isolatesBlending() if it has this flag set and creates stacking context.
2149
2150         Tests: css3/compositing/blend-mode-isolation-flags-append-non-stacking-context-blending.html
2151                css3/compositing/blend-mode-isolation-flags-append-stacking-context-blending.html
2152                css3/compositing/blend-mode-isolation-flags-remove-non-stacking-context-blending.html
2153                css3/compositing/blend-mode-isolation-flags-remove-stacking-context-blending.html
2154                css3/compositing/blend-mode-isolation-flags-turn-off-blending-no-isolation.html
2155                css3/compositing/blend-mode-isolation-flags-turn-off-blending.html
2156                css3/compositing/blend-mode-isolation-flags-turn-off-stacking-context.html
2157                css3/compositing/blend-mode-isolation-flags-turn-on-blending.html
2158                css3/compositing/blend-mode-isolation-flags-turn-on-stacking-context.html
2159
2160         * rendering/RenderLayer.cpp:
2161         (WebCore::RenderLayer::RenderLayer):
2162         (WebCore::RenderLayer::updateBlendMode):
2163         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
2164             When a layer has blending and it hasn't had it before, we set the isolation
2165         flag for all its ancestors up to the first layer creating stacking context.
2166         I removed the isComposited() check here. Isolation flags should be correct regardless
2167         of compositing state. Moreover, if this method is called from styleChanged(),
2168         the compositing state might not be accurate, it's going to be recalculated afterwards.  
2169         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
2170             When a layer doesn't have blending, but it used to have it before, we mark
2171         the isolation flag as dirty for all its ancestors up to the first layer
2172         creating stacking context. The isolation flags will be recalculated by
2173         RenderLayer::updateDescendantDependentFlags.
2174         (WebCore::RenderLayer::updateDescendantDependentFlags):
2175             Evaluates if the layer has unisolated blending descendants by traversing
2176         the layer subtree.
2177         (WebCore::RenderLayer::addChild):
2178             When adding a subtree that has blending or has some unisolated descendants,
2179         we set the flag for all the ancestors, up to the stacking context layer.
2180         (WebCore::RenderLayer::removeChild):
2181             When removing a subtree that had blending or had some unisolated descendants,
2182         we dirty the flag so that it could be reevaluated.
2183         (WebCore::RenderLayer::calculateClipRects):
2184         (WebCore::RenderLayer::updateTransform):
2185         * rendering/RenderLayer.h:
2186             Rename m_hasBlendedElementInChildStackingContext => m_hasUnisolatedBlendingDescendants
2187         and m_hasBlendedElementInChildStackingContextStatusDirty => m_hasUnisolatedBlendingDescendantsStatusDirty,
2188         * rendering/RenderLayerCompositor.cpp:
2189         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2190             Add an assert to make sure that if m_hasUnisolatedCompositedBlendingDescendants is true,
2191         then m_hasUnisolatedBlendingDescendants is true as well.
2192
2193 2014-04-17  Tim Horton  <timothy_horton@apple.com>
2194
2195         Uninline blend(Color, Color) to get AnimationUtilities out of Color.h
2196         https://bugs.webkit.org/show_bug.cgi?id=131781
2197
2198         Reviewed by Simon Fraser.
2199
2200         * platform/graphics/Color.cpp:
2201         (WebCore::blend):
2202         Un-inline.
2203
2204         * platform/graphics/Color.h:
2205         No more AnimationUtilities.
2206
2207 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
2208
2209         Fix the build after r167412
2210
2211         * platform/ScrollView.cpp:
2212         (WebCore::ScrollView::updateScrollbars):
2213
2214 2014-04-16  Benjamin Poulain  <bpoulain@apple.com>
2215
2216         [iOS][WK2] Fix annoying scrolling bugs
2217         https://bugs.webkit.org/show_bug.cgi?id=131722
2218
2219         Reviewed by Simon Fraser.
2220
2221         * platform/ScrollView.cpp:
2222         (WebCore::ScrollView::updateScrollbars):
2223         Since ScrollingStateScrollingNode::setRequestedScrollPosition() was added, we see ScrollView::updateScrollbars()
2224         keep changing the scroll position to incorrect values.
2225
2226         On iOS, the scrollbars are handled by the native UI, the code just compute incorrect scroll position. On WebKit1,
2227         the code does not run because there is a platformWidget().
2228
2229         Just #ifdef the whole useless code.
2230
2231 2014-04-16  Alexandru Chiculita  <achicu@adobe.com>
2232
2233         Improve performance of the RenderLayerCompositor::OverlapMap
2234         https://bugs.webkit.org/show_bug.cgi?id=115063
2235
2236         Reviewed by Simon Fraser.
2237
2238         No new tests, no new functionality or behavior.
2239
2240         Do not use the OverlapMap in RenderLayerCompositor::computeCompositingRequirements if the layer already
2241         has a 3D transform. This way we can avoid a potential expensive lookups when we know for sure the layer
2242         is already supposed to be composited. 
2243
2244         Also, added a bounding box of the overlap map, so that it can catch cases when the new layer is not overlapping
2245         any of the previous layers. This is pretty common when having composited layers laid out in a vertical/horizontal list.
2246
2247
2248         * rendering/RenderLayerCompositor.cpp:
2249         (OverlapMapContainer):
2250         (WebCore::OverlapMapContainer::add):
2251         (WebCore::OverlapMapContainer::overlapsLayers):
2252         (WebCore::OverlapMapContainer::unite):
2253         (WebCore):
2254         (WebCore::RenderLayerCompositor::OverlapMap::add):
2255         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
2256         (WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer):
2257         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
2258         (RenderLayerCompositor::OverlapMap):
2259         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2260
2261 2014-04-16  Brian J. Burg  <burg@cs.washington.edu>
2262
2263         Web Replay: memoize fallback time values for document.lastModified
2264         https://bugs.webkit.org/show_bug.cgi?id=131318
2265
2266         Reviewed by Joseph Pecoraro.
2267
2268         If a document's Last-Modified header can't be found or used, then 
2269         document.lastModified is derived from the current system time or
2270         from filesystem data, which is obviously nondeterministic.
2271
2272         It's better to handle this inside Document::lastModified rather than using
2273         MemoizedDOMResult, because only the fallback case is nondeterministic.
2274
2275         Test: http/tests/inspector/replay/document-last-modified-fallback-value.html
2276
2277         The test is skipped for now, as it will be very flaky without the
2278         functionality introduced by bugs 130728 and 129391.
2279
2280         * dom/Document.cpp:
2281         (WebCore::Document::lastModified): Save or reuse memoized fallback value.
2282         * replay/WebInputs.json: Add input DocumentLastModifiedDate.
2283
2284 2014-04-16  David Hyatt  <hyatt@apple.com>
2285
2286         [New Multicolumn] Selection gets confused when the mouse is in the column gaps.
2287         https://bugs.webkit.org/show_bug.cgi?id=131739
2288
2289         Reviewed by Enrica Casucci.
2290
2291         * rendering/RenderBlock.cpp:
2292         (WebCore::RenderBlock::selectionGaps):
2293         Make sure not to paint selection gaps. This matches the old multi-column behavior. Even though
2294         selection gaps *nearly* work with the new multi-column code, I am disabling them so that we
2295         can turn them on without visual regressions.
2296         
2297         (WebCore::isChildHitTestCandidate):
2298         Don't allow in-flow RenderFlowThreads to be descended into from positionForPoint. We always want
2299         to look only at the spanners and at the sets.
2300
2301         * rendering/RenderMultiColumnFlowThread.cpp:
2302         (WebCore::RenderMultiColumnFlowThread::nodeAtPoint):
2303         * rendering/RenderMultiColumnFlowThread.h:
2304         Override nodeAtPoint to disallow the RenderMultiColumnFlowThread from being considered for hit
2305         testing when no DOM node is found. It's better to just let RenderBlock's positionForPoint run
2306         to drill back down into the appropriate column set.
2307
2308         * rendering/RenderMultiColumnSet.cpp:
2309         (WebCore::RenderMultiColumnSet::positionForPoint):
2310         Implement positionForPoint for RenderMultiColumnSets. This is a straight-up port of the
2311         old multi-column code's adjustPointToColumnContents function.
2312
2313         * rendering/RenderMultiColumnSet.h:
2314         Add override of positionForPoint.
2315
2316 2014-04-16  Dean Jackson  <dino@apple.com>
2317
2318         MediaDocument on iOS should be full page
2319         https://bugs.webkit.org/show_bug.cgi?id=131774
2320
2321         Reviewed by Jer Noble.
2322
2323         A MediaDocument on iOS has two problems. It can't rely
2324         on intrinsic size, since it doesn't load the content until
2325         a user gesture. Secondly, on a small screen you want the
2326         media to fill the page.
2327
2328         Add width/height 100% for iOS documents.
2329
2330         Test: platform/iphone-simulator/media/media-document-controls-size.html
2331
2332         * html/MediaDocument.cpp:
2333         (WebCore::MediaDocumentParser::createDocumentStructure):
2334
2335 2014-04-16  Roger Fong  <roger_fong@apple.com>
2336
2337         Add a way for layout tests to determine whether or not a plugin is snapshotted.
2338         https://bugs.webkit.org/show_bug.cgi?id=131650.
2339         <rdar://problem/16615528>
2340
2341         Reviewed by Dean Jackson.
2342
2343         * testing/Internals.cpp:
2344         (WebCore::Internals::isPluginSnapshotted):
2345         * testing/Internals.h:
2346         * testing/Internals.idl:
2347
2348 2014-04-16  Zoltan Horvath  <zoltan@webkit.org>
2349
2350         Vanish unnecessary includes from Shapes.{h|cpp}
2351         https://bugs.webkit.org/show_bug.cgi?id=131762
2352
2353         Reviewed by Andreas Kling.
2354
2355         No new tests, no behavior change.
2356
2357         * rendering/shapes/BoxShape.h:
2358         * rendering/shapes/Shape.cpp:
2359         * rendering/shapes/Shape.h:
2360         * rendering/shapes/ShapeOutsideInfo.h:
2361
2362 2014-04-16  Andreas Kling  <akling@apple.com>
2363
2364         Revert direct caching of tagName and nodeName from r167383.
2365
2366         Ryosuke tells me this is not entirely safe, will need to rethink.
2367
2368         * dom/Element.idl:
2369         * dom/Node.idl:
2370
2371 2014-04-16  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2372
2373         Improve security mitigation added in webkit r94001.
2374         We missed the case where attachLine was called when we already had an inline box wrapper.
2375         https://bugs.webkit.org/show_bug.cgi?id=127285
2376
2377         Reviewed by Brent Fulgham.
2378
2379         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=150697&view=revision
2380
2381         * rendering/RenderBox.cpp:
2382         (WebCore::RenderBox::positionLineBox):
2383         * rendering/RenderBox.h:
2384         (WebCore::RenderBox::setInlineBoxWrapper):
2385
2386 2014-04-16  Bem Jones-Bey  <bjonesbe@adobe.com>
2387
2388         Fix CodeGenerator.pm to only write files if the generated content has changed
2389         https://bugs.webkit.org/show_bug.cgi?id=131756
2390
2391         Reviewed by Sam Weinig.
2392
2393         To improve build speed, don't touch generated files unless the newly
2394         generated content is actually different.
2395
2396         * bindings/scripts/CodeGenerator.pm:
2397         (UpdateFile):
2398
2399 2014-04-16  Andreas Kling  <akling@apple.com>
2400
2401         Add a way to cache never-changing IDL attributes in the wrapper.
2402         <https://webkit.org/b/131759>
2403
2404         Some IDL attributes will always return the same value when queried
2405         on an object, so let's have a way to avoid calling into C++ code
2406         every time they are queried.
2407
2408         This patch adds a custom IDL thingy called "ReturnsCacheableValue"
2409         which causes the code generator to emit code to cache the returned
2410         value directly in the JS wrapper object.
2411
2412         Reviewed by Oliver Hunt.
2413
2414         * bindings/scripts/IDLAttributes.txt:
2415         * bindings/scripts/CodeGeneratorJS.pm:
2416         (GenerateImplementation):
2417
2418             Add ReturnsCacheableValue custom attribute.
2419
2420         * dom/Element.idl:
2421         * dom/Node.idl:
2422
2423             Annotate some attributes that return fully cacheable values.
2424
2425         * bindings/scripts/test/*:
2426
2427             Rebaseline.
2428
2429 2014-04-16  Noel Gordon  <noel.gordon@gmail.com>
2430
2431         Progressive JPEG outputScanlines() calls should handle failure
2432         https://bugs.webkit.org/show_bug.cgi?id=116701
2433
2434         Reviewed by Brent Fulgham.
2435
2436         outputScanlines() can fail and delete |this|. Copy the decoder pointer
2437         member and use that copy to detect and handle the failure case.
2438
2439         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2440         (WebCore::JPEGImageReader::decode):
2441
2442 2014-04-16  Robert Sipka  <sipka@inf.u-szeged.hu>
2443
2444         [curl] Add WEB_TIMING support
2445         https://bugs.webkit.org/show_bug.cgi?id=127555
2446
2447         Reviewed by Brent Fulgham.
2448
2449         Access timing information related to navigation.
2450
2451         * platform/network/curl/ResourceHandleManager.cpp:
2452         (WebCore::milisecondsSinceRequest):
2453         (WebCore::calculateWebTimingInformations):
2454         (WebCore::sockoptfunction):
2455         (WebCore::headerCallback):
2456         (WebCore::ResourceHandleManager::downloadTimerCallback):
2457         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2458         (WebCore::ResourceHandleManager::initializeHandle):
2459
2460 2014-04-16  Zoltan Horvath  <zoltan@webkit.org>
2461
2462         Cleanup header includes in ShapeOutsideInfo.h
2463         https://bugs.webkit.org/show_bug.cgi?id=131750
2464
2465         Reviewed by Antti Koivisto.
2466
2467         Make the build faster by removing unnecessary header includes.
2468
2469         No new tests, no behavior change.
2470
2471         * rendering/shapes/ShapeOutsideInfo.h:
2472
2473 2014-04-16  Simon Fraser  <simon.fraser@apple.com>
2474
2475         Fix the iOS build.
2476
2477         * platform/graphics/cg/BitmapImageCG.cpp:
2478         (WebCore::BitmapImage::draw):
2479
2480 2014-04-16  Alexey Proskuryakov  <ap@apple.com>
2481
2482         DataTransfer should cache its FileList
2483         https://bugs.webkit.org/show_bug.cgi?id=131694
2484
2485         Reviewed by Darin Adler.
2486
2487         Test: fast/events/data-transfer-files-attribute-identity.html
2488
2489         * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readTerminal):
2490         Switched to a new FileList constructor, CloneDeserializer doesn't really need to modify
2491         the FileList with append().
2492
2493         * dom/DataTransfer.h:
2494         * dom/DataTransfer.cpp:
2495         (WebCore::DataTransfer::types): Added a FIXME.
2496         (WebCore::DataTransfer::files): Changed to reuse a cached FileList. It's currently
2497         easy, because we don't support DataTransferItemList. Once we do, making any changes
2498         through it will also require updating the FileList in a way that doesn't replace
2499         File objects for unchanged files.
2500
2501         * fileapi/FileList.h:
2502         (WebCore::FileList::create):
2503         (WebCore::FileList::isEmpty):
2504         (WebCore::FileList::FileList):
2505         (WebCore::FileList::append):
2506         (WebCore::FileList::clear):
2507         Made non-const functions private, because neither DataTransfer nor FileInputType
2508         expect the list to be modified without their knowledge. Added a new Vector based
2509         constructor so that a FileList could be created without the use of append().
2510
2511         * html/FileInputType.cpp: (WebCore::FileInputType::createFileList): Simplified
2512         the code a little bit. FileInputType still needs to modify the list for clear(),
2513         but doesn't need to add to it dynamically - unlike with DataTransfer, it's expected
2514         to create a new FileList when it's modified.
2515
2516 2014-04-15  Brent Fulgham  <bfulgham@apple.com>
2517
2518         [Win] Eliminate use of deleteAllValues in Windows Files
2519         https://bugs.webkit.org/show_bug.cgi?id=131631
2520
2521         Reviewed by Darin Adler.
2522
2523         Update to use std::unique_ptr for object lifetime. Get rid of
2524         deleteAllValues now that it is no loner needed. Use ranged for
2525         loops where possible.
2526
2527         * platform/win/WCDataObject.cpp:
2528         (WebCore::WCEnumFormatEtc::WCEnumFormatEtc):
2529         (WebCore::WCDataObject::~WCDataObject):
2530         (WebCore::WCDataObject::GetData):
2531         (WebCore::WCDataObject::QueryGetData):
2532         (WebCore::WCDataObject::SetData):
2533         (WebCore::WCDataObject::clearData):
2534         * platform/win/WCDataObject.h:
2535
2536 2014-04-16  Chris Fleizach  <cfleizach@apple.com>
2537
2538         AX: Accessing a table cell with an invalid column header crashes
2539         https://bugs.webkit.org/show_bug.cgi?id=131719
2540
2541         Reviewed by Darin Adler.
2542
2543         If no tableCell is available as a column/row header, then do not continue processing.
2544
2545         Test: accessibility/table-missing-column-header-crash.html
2546
2547         * accessibility/AccessibilityTableCell.cpp:
2548         (WebCore::AccessibilityTableCell::columnHeaders):
2549         (WebCore::AccessibilityTableCell::rowHeaders):
2550
2551 2014-04-16  Brendan Long  <b.long@cablelabs.com>
2552
2553         [GTK] Fix unused parameter warnings
2554         https://bugs.webkit.org/show_bug.cgi?id=131721
2555
2556         Reviewed by Darin Adler.
2557
2558         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
2559         (WebCore::toJS): Remove unused 'exec' parameter.
2560
2561 2014-04-16  Simon Fraser  <simon.fraser@apple.com>
2562
2563         Convert the boolean param of Image::startAnimation() to an enum
2564         https://bugs.webkit.org/show_bug.cgi?id=131742
2565
2566         Reviewed by Tim Horton.
2567
2568         Use an enum to make the code more readable.
2569
2570         * platform/graphics/BitmapImage.cpp:
2571         (WebCore::BitmapImage::startAnimation):
2572         * platform/graphics/BitmapImage.h:
2573         * platform/graphics/Image.cpp:
2574         (WebCore::Image::drawTiled):
2575         * platform/graphics/Image.h:
2576         (WebCore::Image::startAnimation):
2577         * svg/graphics/SVGImage.cpp:
2578         (WebCore::SVGImage::startAnimation):
2579         * svg/graphics/SVGImage.h:
2580
2581 2014-04-16  David Hyatt  <hyatt@apple.com>
2582
2583         Make sure to skip the RenderMultiColumnFlowThread when resolving percentage heights inside columns against
2584         containing blocks. The flow thread's auto height should not interfere if a fixed height is specified on
2585         an ancestor.
2586
2587         https://bugs.webkit.org/show_bug.cgi?id=131741
2588
2589         Reviewed by Simon Fraser.
2590
2591         Added fast/multicol/percent-height.html.
2592
2593         * rendering/RenderBox.cpp:
2594         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
2595         Add an isInFlowRenderFlowThread check so that we skip those blocks and don't consider them at all
2596         when resolving percentage heights.
2597
2598 2014-04-16  Daewoong Jang  <daewoong.jang@navercorp.com>
2599
2600         [WinCairo][cURL] Build fix for WinCairo build with USE(CURL).
2601         https://bugs.webkit.org/show_bug.cgi?id=131614
2602
2603         Reviewed by Brent Fulgham.
2604
2605         Build fix, no new tests needed.
2606
2607         * platform/network/curl/CurlCacheEntry.cpp:
2608         (WebCore::CurlCacheEntry::loadResponseHeaders):
2609         * platform/network/curl/CurlCacheManager.cpp:
2610         (WebCore::CurlCacheManager::loadIndex):
2611         * platform/network/soup/ResourceError.h:
2612         * platform/network/soup/SocketStreamHandle.h:
2613
2614 2014-04-16  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
2615
2616         ASSERTION FAILED: x2 >= x1 in WebCore::RenderObject::drawLineForBoxSide
2617         https://bugs.webkit.org/show_bug.cgi?id=127835
2618
2619         In some cases when a negative margin and a positive padding are applied
2620         together to the right and/or left side of the box, the logical width of
2621         the borders can be set to a negative value, making the assertion fire.
2622         The fix checks if the width or height of the box is negative, and if so,
2623         it will not display the borders and shadows of the box.
2624
2625         Reviewed by Darin Adler.
2626
2627         Test: fast/css/padding-margin-negative-border.html
2628
2629         * rendering/RenderBoxModelObject.cpp:
2630         (WebCore::RenderBoxModelObject::paintBorder):
2631
2632 2014-04-16  Jer Noble  <jer.noble@apple.com>
2633
2634         [MSE] Seeks into buffered ranges will never complete.
2635         https://bugs.webkit.org/show_bug.cgi?id=131717
2636
2637         Reviewed by Eric Carlson.
2638
2639         Test: media/media-source/media-source-seek-complete.html
2640
2641         Run the SourceBuffer Monitoring step after initiating a seek.
2642
2643         * Modules/mediasource/SourceBuffer.cpp:
2644         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
2645
2646 2014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
2647
2648         [EFL] Fix problems with the pixel dump.
2649         https://bugs.webkit.org/show_bug.cgi?id=131265
2650
2651         Reviewed by Gyuyoung Kim.
2652
2653         Painting and compositing paths of WebKit-EFL were totally modified from r166768.
2654         However pixel dump codes still call deprecated functions like ewk_view_paint(),
2655         which causes that nothing is drawn.
2656
2657         This patch adds new member functions to AcceleratedCompositingContext to support pixel dump.
2658         One of new functions is AcceleratedCompositingContext::extractImageData(),
2659         which replaces deprecated function calls. Besides the extractImageData() is invoked by
2660         ewk_view_screenshot_contents_get() in order to take the visible content displayed on the EFL webview.
2661
2662         * platform/graphics/cairo/CairoUtilities.cpp:
2663         (WebCore::flipImageSurfaceVertically): Flip pixel data of given cairo_surface_t vertically up/down.
2664         Whereas Cairo uses the top-left corner as being 0,0 of the coordinate system,
2665         OpenGL uses the bottom-left corner being 0,0.
2666         So we need to vertically flip resultant images taken by glReadPixels().
2667         * platform/graphics/cairo/CairoUtilities.h:
2668
2669 2014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
2670
2671         Make page overlay functionality working on coordinated graphics.
2672         https://bugs.webkit.org/show_bug.cgi?id=131425
2673
2674         Reviewed by Darin Adler.
2675
2676         Page overlay functionality did not work on coordinated graphics since r166975.
2677         This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
2678         and makes CoordinatedLayerTreeHost use PageOverlayController.
2679
2680         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2681         (WebCore::CompositingCoordinator::setRootCompositingLayer):
2682         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
2683         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2684
2685 2014-04-10  Roger Fong  <roger_fong@apple.com>
2686
2687         Snapshotted plugins may need to be restarted if style properties are changed after initial load of plugin.
2688         https://bugs.webkit.org/show_bug.cgi?id=131553.
2689         <rdar://problem/15443375>
2690
2691         Reviewed by Timothy Horton.
2692
2693         Test: plugins/snapshotting/set-plugin-size-to-tiny.html
2694
2695         When updating embedded objects during our post layout checks, check for certain style changes
2696         that may result in the plugin needing to be restarted.
2697
2698         * html/HTMLPlugInImageElement.h: 
2699         Add m_plugInDimensionsSpecified field to keep track of whether or not dimensions on the plugin’s renderer have been specified.
2700         * html/HTMLPlugInImageElement.cpp:
2701         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2702         Initialize m_plugInDimensionsSpecified.
2703         (WebCore::isSmallerThanTinySizingThreshold):
2704         Refactoring, move check for whether or not plugin is smaller than the tiny plugin size threshold to this method.
2705         (WebCore::HTMLPlugInImageElement::isTopLevelFullPage): 
2706         Refactoring, move check for whether or not plugin is top level full page to this method.
2707         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): 
2708         Use refactored checks here as well to determine whether or not we need to restart the snapshotted plugin.
2709         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use refactored checks.
2710         If plugin dimensions were specified, set m_plugInDimensionsSpecified to true.
2711
2712 2014-04-15  Andreas Kling  <akling@apple.com>
2713
2714         [iOS WebKit2] Listen for system memory pressure notifications.
2715         <https://webkit.org/b/131653>
2716         <rdar://problem/16208123>
2717
2718         Reviewed by Antti Koivisto.
2719
2720         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2721         (WebCore::MemoryPressureHandler::install):
2722
2723             Use the right invocation to summon the memory pressure handler.
2724
2725         (WebCore::MemoryPressureHandler::install):
2726         (WebCore::MemoryPressureHandler::uninstall):
2727         (WebCore::MemoryPressureHandler::holdOff):
2728         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2729
2730             Make stubbed out functions !PLATFORM(COCOA)
2731
2732 2014-04-14  Morten Stenshorne  <mstensho@opera.com>
2733
2734         [New Multicolumn] Add support for column-span:all
2735         https://bugs.webkit.org/show_bug.cgi?id=129330
2736
2737         Reviewed by Dave Hyatt.
2738
2739         Column spanners are implemented as siblings of RenderMultiColumnSet
2740         objects (i.e. the regions for the column rows). This means that they
2741         are pulled out from the flow thread tree where they would otherwise
2742         live. This causes some complexity, most of which is contained within
2743         the multicol code.
2744
2745         A placeholder is put in the flow thread tree where the spanner's
2746         renderer would otherwise live. This is needed in order make sure that
2747         we interrupt line layout before after the spanner. We also need this
2748         to be able to switch from one multicol set to the next.
2749
2750         Some extra logic is required when dynamically inserting and removing
2751         flow thread descendants now, because we need to figure out if the
2752         renderer added should trigger creation of new multi column sets. If
2753         a spanner is inserted in the middle of a multi column set, we need to
2754         detect this, split the set and put the spanner in the middle.
2755
2756         Wrote a bunch of tests. A few of the tests were copied from existing
2757         (old-impl) tests and put in a separate directory. That directory can
2758         be wiped when we turn on the new multicol implementation by default.
2759
2760         Tests: fast/multicol/newmulticol/adjacent-spanners.html
2761                fast/multicol/newmulticol/block-becomes-spanner.html
2762                fast/multicol/newmulticol/change-spanner-display.html
2763                fast/multicol/newmulticol/change-spanner-parent-display.html
2764                fast/multicol/newmulticol/compare-with-old-impl/anonymous-block-split-crash.html
2765                fast/multicol/newmulticol/compare-with-old-impl/before-child-anonymous-column-block.html
2766                fast/multicol/newmulticol/compare-with-old-impl/clone-before-after-content-crash.html
2767                fast/multicol/newmulticol/compare-with-old-impl/clone-block-children-inline-mismatch-crash.html
2768                fast/multicol/newmulticol/compare-with-old-impl/clone-flexbox.html
2769                fast/multicol/newmulticol/compare-with-old-impl/clone-summary.html
2770                fast/multicol/newmulticol/compare-with-old-impl/column-span-inside-multicol-webkit-box.html
2771                fast/multicol/newmulticol/compare-with-old-impl/continuation-crash.html
2772                fast/multicol/newmulticol/compare-with-old-impl/double-merge-anonymous-block-crash.html
2773                fast/multicol/newmulticol/compare-with-old-impl/empty-anonymous-block-split-crash.html
2774                fast/multicol/newmulticol/compare-with-old-impl/float-not-removed-crash.html
2775                fast/multicol/newmulticol/compare-with-old-impl/list-multi-column-crash.html
2776                fast/multicol/newmulticol/compare-with-old-impl/positioned-child-not-removed-crash.html
2777                fast/multicol/newmulticol/compare-with-old-impl/positioned-objects-not-removed-crash.html
2778                fast/multicol/newmulticol/compare-with-old-impl/recursive-split-flow-crash.html
2779                fast/multicol/newmulticol/compare-with-old-impl/removal-of-multicol-span-crash.html
2780                fast/multicol/newmulticol/compare-with-old-impl/remove-child-split-flow-crash.html
2781                fast/multicol/newmulticol/compare-with-old-impl/runin-continuation-crash.html
2782                fast/multicol/newmulticol/compare-with-old-impl/span-as-immediate-child-complex-splitting.html
2783                fast/multicol/newmulticol/compare-with-old-impl/span-as-nested-inline-block-child.html
2784                fast/multicol/newmulticol/compare-with-old-impl/split-flow-anonymous-wrapper-crash.html
2785                fast/multicol/newmulticol/compare-with-old-impl/split-inline-wrong-post-block-crash.html
2786                fast/multicol/newmulticol/compare-with-old-impl/table-multi-column-crash.html
2787                fast/multicol/newmulticol/compare-with-old-impl/textbox-not-removed-crash.html
2788                fast/multicol/newmulticol/compare-with-old-impl/update-after-content-before-child-crash.html
2789                fast/multicol/newmulticol/insert-row-content1.html
2790                fast/multicol/newmulticol/insert-row-content2.html
2791                fast/multicol/newmulticol/insert-row-content3.html
2792                fast/multicol/newmulticol/insert-row-content4.html
2793                fast/multicol/newmulticol/insert-row-content5.html
2794                fast/multicol/newmulticol/insert-row-content6.html
2795                fast/multicol/newmulticol/insert-row-content7.html
2796                fast/multicol/newmulticol/insert-row-content8.html
2797                fast/multicol/newmulticol/insert-row-content9.html
2798                fast/multicol/newmulticol/insert-spanner-child1.html
2799                fast/multicol/newmulticol/insert-spanner-child2.html
2800                fast/multicol/newmulticol/insert-spanner-child3.html
2801                fast/multicol/newmulticol/insert-spanner1.html
2802                fast/multicol/newmulticol/insert-spanner2.html
2803                fast/multicol/newmulticol/insert-spanner3.html
2804                fast/multicol/newmulticol/insert-spanner4.html
2805                fast/multicol/newmulticol/insert-spanner5.html
2806                fast/multicol/newmulticol/insert-spanner6.html
2807                fast/multicol/newmulticol/insert-spanner7.html
2808                fast/multicol/newmulticol/insert-spanner8.html
2809                fast/multicol/newmulticol/multicol-with-spanner-becomes-regular-block.html
2810                fast/multicol/newmulticol/remove-row-content1.html
2811                fast/multicol/newmulticol/remove-row-content2.html
2812                fast/multicol/newmulticol/remove-row-content3.html
2813                fast/multicol/newmulticol/remove-row-content4.html
2814                fast/multicol/newmulticol/remove-row-content5.html
2815                fast/multicol/newmulticol/remove-row-content6.html
2816                fast/multicol/newmulticol/remove-row-content7.html
2817                fast/multicol/newmulticol/remove-row-content8.html
2818                fast/multicol/newmulticol/remove-row-content9.html
2819                fast/multicol/newmulticol/remove-spanner1.html
2820                fast/multicol/newmulticol/remove-spanner2.html
2821                fast/multicol/newmulticol/remove-spanner3.html
2822                fast/multicol/newmulticol/remove-spanner4.html
2823                fast/multicol/newmulticol/remove-spanner5.html
2824                fast/multicol/newmulticol/remove-spanner6.html
2825                fast/multicol/newmulticol/sole-spanner.html
2826                fast/multicol/newmulticol/span-between-text.html
2827                fast/multicol/newmulticol/spanner-becomes-regular-block.html
2828                fast/multicol/newmulticol/spanner-first.html
2829                fast/multicol/newmulticol/spanner-img.html
2830                fast/multicol/newmulticol/spanner-inline-block.html
2831                fast/multicol/newmulticol/spanner-last.html
2832                fast/multicol/newmulticol/spanner-nested-dynamic.html
2833                fast/multicol/newmulticol/spanner-nested.html
2834                fast/multicol/newmulticol/spanner-pseudo-after1.html
2835                fast/multicol/newmulticol/spanner-pseudo-after2.html
2836                fast/multicol/newmulticol/spanner-pseudo-after3.html
2837                fast/multicol/newmulticol/spanner-pseudo-after4.html
2838                fast/multicol/newmulticol/spanner-pseudo-before-after1.html
2839                fast/multicol/newmulticol/spanner-pseudo-before-after2.html
2840                fast/multicol/newmulticol/spanner-pseudo-before-after3.html
2841                fast/multicol/newmulticol/spanner-pseudo-before-after4.html
2842                fast/multicol/newmulticol/spanner-pseudo-before1.html
2843                fast/multicol/newmulticol/spanner-pseudo-before2.html
2844                fast/multicol/newmulticol/spanner-pseudo-before3.html
2845                fast/multicol/newmulticol/spanner-pseudo-before4.html
2846                fast/multicol/newmulticol/spanner-table.html
2847                fast/multicol/newmulticol/spanner-with-margin.html
2848                fast/multicol/newmulticol/spanner1.html
2849                fast/multicol/newmulticol/spanner2.html
2850                fast/multicol/newmulticol/spanner3.html
2851                fast/multicol/newmulticol/spanner4.html
2852                fast/multicol/newmulticol/spanner5.html
2853                fast/multicol/newmulticol/spanner6.html
2854                fast/multicol/newmulticol/spanner7.html
2855                fast/multicol/newmulticol/spanner8.html
2856                fast/multicol/newmulticol/spanner9.html
2857                fast/multicol/newmulticol/trailing-margin-with-spanner.html
2858                fast/multicol/newmulticol/trailing-margin-with-spanner2.html
2859
2860         * CMakeLists.txt:
2861         * WebCore.vcxproj/WebCore.vcxproj:
2862         * WebCore.vcxproj/WebCore.vcxproj.filters:
2863         * rendering/RenderBlock.cpp:
2864         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2865         Disable the old anonymous multicol container and spanner anonymous
2866         block generation machinery when the new multicol implementation is
2867         enabled.
2868         * rendering/RenderBlockFlow.cpp:
2869         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
2870         (WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
2871         (WebCore::RenderBlockFlow::layoutBlockChild): Need to notify the
2872         flow thread when a descendant's final position is known. Spanner
2873         placeholders need to know where to terminate the column set that
2874         it follows.
2875         (WebCore::RenderBlockFlow::styleDidChange): Remove old code that
2876         isn't needed anymore. The renderers in question (flow thread and
2877         column sets) set display:block on themselves already. This code
2878         caused problems for spanners, which got all their style wiped.
2879         (WebCore::RenderBlockFlow::setMultiColumnFlowThread): If setting
2880         the flow thread to nullptr, there's no need to create the "rare
2881         data" structure.
2882         (WebCore::RenderBlockFlow::relayoutForPagination):
2883         (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
2884         (WebCore::RenderBlockFlow::addChild): beforeChild is retrieved via
2885         the DOM. If it is a spanner, we need to locate the placeholder
2886         here, because that's the correct location to insert siblings,
2887         DOM-wise.
2888         (WebCore::RenderBlockFlow::removeChild): The multicol flow thread
2889         needs to know when children disappear.
2890         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
2891         Don't modify the height back and forth when calculating the
2892         multicol container's final height, as that messes up balancing.
2893         (WebCore::RenderBlockFlow::insertedIntoTree): Deleted.
2894         (WebCore::RenderBlockFlow::willBeDestroyed): Deleted.
2895         (WebCore::RenderBlockFlow::styleWillChange): Deleted.
2896         (WebCore::RenderBlockFlow::lineAtIndex): Deleted.
2897         * rendering/RenderBlockFlow.h:
2898         * rendering/RenderElement.cpp:
2899         (WebCore::RenderElement::insertedIntoTree): Set up an element's
2900         layer before notifying the flow thread. The multicol flow thread
2901         may decide to move the element (if it's a spanner), which may
2902         involve re-insertion of layers.  Calling
2903         RenderObject::insertedIntoTree() last instead of first also better
2904         matches the order we used to have prior to the introduction of
2905         RenderElement, FWIW.
2906         * rendering/RenderFlowThread.cpp:
2907         (WebCore::RenderFlowThread::layout):
2908         (WebCore::RenderFlowThread::removeRegionFromThread): Deleted.
2909         (WebCore::RenderFlowThread::invalidateRegions): Deleted.
2910         * rendering/RenderFlowThread.h:
2911         * rendering/RenderMultiColumnFlowThread.cpp:
2912         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
2913         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): When
2914         a flow thread descendant is inserted, the multicol flow thread
2915         needs to be notified.
2916         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
2917         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
2918         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
2919         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
2920         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
2921         (WebCore::RenderMultiColumnFlowThread::layout):
2922         (WebCore::RenderMultiColumnFlowThread::findSetRendering):
2923         (WebCore::RenderMultiColumnFlowThread::populate):
2924         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
2925         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
2926         (WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree):
2927         Need to detach column sets here, since they have pointers to their
2928         flow thread.
2929         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
2930         (WebCore::isValidColumnSpanner):
2931         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2932         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
2933         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
2934         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
2935         Nothing to be done here for the time being. Column sets are now
2936         created during box creation. We are going to need to add some code
2937         here again once multicol properly supports nested fragmentation
2938         contexts (and you get adjacent column rows because of that).
2939         (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
2940         During layout, don't trust the region interval tree, as that one
2941         depends on the resulting layout.
2942         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox): With
2943         a convenience method to get the last column set, and column sets
2944         now being created during normal box creation, this young method
2945         needs an overhaul.
2946         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
2947         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
2948         * rendering/RenderMultiColumnFlowThread.h:
2949         * rendering/RenderMultiColumnSet.cpp:
2950         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
2951         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
2952         (WebCore::RenderMultiColumnSet::firstRendererInFlowThread):
2953         (WebCore::RenderMultiColumnSet::lastRendererInFlowThread):
2954         (WebCore::precedesRenderer):
2955         (WebCore::RenderMultiColumnSet::containsRendererInFlowThread):
2956         (WebCore::RenderMultiColumnSet::setLogicalTopInFlowThread):
2957         (WebCore::RenderMultiColumnSet::setLogicalBottomInFlowThread):
2958         (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
2959         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
2960         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
2961         (WebCore::RenderMultiColumnSet::addForcedBreak):
2962         (WebCore::RenderMultiColumnSet::recalculateColumnHeight):
2963         Previously only needed if columns were to be balanced, now it's
2964         also needed when not balancing.
2965         (WebCore::RenderMultiColumnSet::recordSpaceShortage): Some layout
2966         elements actually have 0 height. Skip them, since they're not
2967         taking us anywhere.
2968         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2969         (WebCore::RenderMultiColumnSet::requiresBalancing): Column sets
2970         now have individual balancing needs. If they precede a spanner,
2971         they must always be balanced. For the last column set, see if
2972         height is unspecified or column-fill is 'balance' (like before).
2973         (WebCore::RenderMultiColumnSet::prepareForLayout):
2974         (WebCore::RenderMultiColumnSet::beginFlow):
2975         (WebCore::RenderMultiColumnSet::endFlow):
2976         (WebCore::RenderMultiColumnSet::layout):
2977         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
2978         (WebCore::RenderMultiColumnSet::columnRectAt):
2979         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
2980         (WebCore::RenderMultiColumnSet::paintColumnRules):
2981         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting):
2982         (WebCore::RenderMultiColumnSet::collectLayerFragments):
2983         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
2984         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight): Deleted.
2985         (WebCore::RenderMultiColumnSet::findRunWithTallestColumns): Deleted.
2986         (WebCore::RenderMultiColumnSet::clearForcedBreaks): Deleted.
2987         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent): Deleted.
2988         * rendering/RenderMultiColumnSet.h:
2989         * rendering/RenderMultiColumnSpannerPlaceholder.cpp: Added.
2990         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
2991         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
2992         (WebCore::RenderMultiColumnSpannerPlaceholder::renderName):
2993         * rendering/RenderMultiColumnSpannerPlaceholder.h: Added.
2994         * rendering/RenderObject.cpp:
2995         (WebCore::RenderObject::insertedIntoTree): Need to notify the
2996         multicol flow thread when descendants are inserted. That may
2997         trigger insertion of column sets, or, in the case of spanners,
2998         they need to be moved out from the flow thread.
2999         * rendering/RenderObject.h:
3000         (WebCore::RenderObject::isRenderMultiColumnSpannerPlaceholder):
3001         (WebCore::RenderObject::isAnonymousBlock): Exclude column sets
3002         here, so that they don't get involved in anonymous block merging
3003         and other kinds of fun.
3004         * rendering/RenderRegion.h:
3005         * rendering/RenderRegionSet.h:
3006
3007 2014-04-15  Simon Fraser  <simon.fraser@apple.com>
3008
3009         LayerTreeAsTextBehavior should be in the WebCore namespace
3010         https://bugs.webkit.org/show_bug.cgi?id=131683
3011
3012         Reviewed by Andrei Bucur.
3013
3014         Move LayerTreeAsTextBehavior and the bit flags into the WebCore namespace.
3015
3016         * platform/graphics/GraphicsLayer.cpp:
3017         (showGraphicsLayerTree):
3018         * platform/graphics/GraphicsLayer.h:
3019
3020 2014-04-15  Benjamin Poulain  <bpoulain@apple.com>
3021
3022         ViewportConfiguration handles userZoom incorrectly
3023         https://bugs.webkit.org/show_bug.cgi?id=131657
3024
3025         Reviewed by Darin Adler.
3026
3027         * page/ViewportConfiguration.cpp:
3028         (WebCore::viewportArgumentUserZoomIsSet):
3029         (WebCore::ViewportConfiguration::updateConfiguration):
3030         The other viewport values must be strictly positive, userZoom is always either zero, one or minus one.
3031         As a result, the value zero was never set.
3032
3033 2014-04-15  Simon Fraser  <simon.fraser@apple.com>
3034
3035         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
3036         https://bugs.webkit.org/show_bug.cgi?id=131665
3037
3038         Reviewed by Tim Horton.
3039
3040         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
3041         was triggering a compositing layer flush when called with a null rootLayer, which happens
3042         for pages going into the page cache. This would trigger a layer flush that would clobber
3043         the root layer for the visible page, resulting in missing content.
3044         
3045         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
3046         was being added to (and then removed from) every single compositing layers.
3047         
3048         Fix both these by changing to a pull model, where RenderLayerCompositor requests
3049         the overlay layer via ChromeClient, and gets it at the end of every flush,
3050         adding to the children of the root layer.
3051
3052         * WebCore.exp.in:
3053         * page/ChromeClient.h:
3054         (WebCore::ChromeClient::documentOverlayLayerForFrame):
3055         * rendering/RenderLayerCompositor.cpp:
3056         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3057         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Put visibleRect
3058         into a variable for ease of debugging.
3059         (WebCore::RenderLayerCompositor::updateCompositingLayers): Asser
3060         that we're not in the page cache (this would have caught the bug).
3061         (WebCore::RenderLayerCompositor::appendOverlayLayers):
3062         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3063         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer): Deleted.
3064         * rendering/RenderLayerCompositor.h:
3065
3066 2014-04-15  Commit Queue  <commit-queue@webkit.org>
3067
3068         Unreviewed, rolling out r167199 and r167251.
3069         https://bugs.webkit.org/show_bug.cgi?id=131678
3070
3071         Caused a DYEBench regression and does not seem to improve perf
3072         on relevant websites (Requested by rniwa on #webkit).
3073
3074         Reverted changesets:
3075
3076         "Rewrite Function.bind as a builtin"
3077         https://bugs.webkit.org/show_bug.cgi?id=131083
3078         http://trac.webkit.org/changeset/167199
3079
3080         "Update test result"
3081         http://trac.webkit.org/changeset/167251
3082
3083 2014-04-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3084
3085         Remove unnecessary null checking in NavigatorContentUtils
3086         https://bugs.webkit.org/show_bug.cgi?id=131652
3087
3088         Reviewed by Darin Adler.
3089
3090         Some functions have checked if document is null. However, document is always not
3091         null when frame is existed.
3092
3093         No new tests, no behavior changes.
3094
3095         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3096         (WebCore::NavigatorContentUtils::registerProtocolHandler):
3097         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
3098         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
3099
3100 2014-04-15  Commit Queue  <commit-queue@webkit.org>
3101
3102         Unreviewed, rolling out r167298.
3103         https://bugs.webkit.org/show_bug.cgi?id=131670
3104
3105         Broke CSS filters (17 test crashes) (Requested by ap on
3106         #webkit).
3107
3108         Reverted changeset:
3109
3110         "[iOS WK2] Pages often blank on first load if page loaded by
3111         typing the URL"
3112         https://bugs.webkit.org/show_bug.cgi?id=131665
3113         http://trac.webkit.org/changeset/167298
3114
3115 2014-04-14  Pratik Solanki  <psolanki@apple.com>
3116
3117         Unreviewed. Attempt to fix Windows build after r167277.
3118
3119         * page/FrameView.cpp:
3120         (WebCore::FrameView::willPaintContents):
3121
3122 2014-04-14  Commit Queue  <commit-queue@webkit.org>
3123
3124         Unreviewed, rolling out r167261.
3125         https://bugs.webkit.org/show_bug.cgi?id=131667
3126
3127         broke many navigation tests (Requested by ap on #webkit).
3128
3129         Reverted changeset:
3130
3131         "Web Replay: memoize fallback time values for
3132         document.lastModified"
3133         https://bugs.webkit.org/show_bug.cgi?id=131318
3134         http://trac.webkit.org/changeset/167261
3135
3136 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
3137
3138         [iOS WK2] Pages often blank on first load if page loaded by typing the URL
3139         https://bugs.webkit.org/show_bug.cgi?id=131665
3140
3141         Reviewed by Tim Horton.
3142
3143         The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
3144         was triggering a compositing layer flush when called with a null rootLayer, which happens
3145         for pages going into the page cache. This would trigger a layer flush that would clobber
3146         the root layer for the visible page, resulting in missing content.
3147         
3148         Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
3149         was being added to (and then removed from) every single compositing layers.
3150         
3151         Fix both these by changing to a pull model, where RenderLayerCompositor requests
3152         the overlay layer via ChromeClient, and gets it at the end of every flush,
3153         adding to the children of the root layer.
3154
3155         * WebCore.exp.in:
3156         * page/ChromeClient.h:
3157         (WebCore::ChromeClient::documentOverlayLayerForFrame):
3158         * rendering/RenderLayerCompositor.cpp:
3159         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3160         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Put visibleRect
3161         into a variable for ease of debugging.
3162         (WebCore::RenderLayerCompositor::updateCompositingLayers): Asser
3163         that we're not in the page cache (this would have caught the bug).
3164         (WebCore::RenderLayerCompositor::appendOverlayLayers):
3165         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3166         (WebCore::RenderLayerCompositor::setDocumentOverlayRootLayer): Deleted.
3167         * rendering/RenderLayerCompositor.h:
3168
3169 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
3170
3171         Assertion failure under FEImage::determineAbsolutePaintRect()
3172
3173         <https://bugs.webkit.org/show_bug.cgi?id=131660>
3174         <rdar://problem/15669294>
3175
3176         This patch merges Chromium r149536 (see
3177         <https://chromiumcodereview.appspot.com/14701012>), which moves
3178         m_absoluteTransform out of SVGFilter and into the base Filter class, so
3179         that it isn't necessary to cast a Filter to SVGFilter to get the
3180         absolute transform.
3181
3182         Reviewed by Geoffrey Garen.
3183
3184         Test: svg/filters/feImage-filter-assertion.html
3185
3186         * platform/graphics/filters/Filter.h:
3187         (WebCore::Filter::Filter):
3188         Changed to take the absolute transform.
3189         (WebCore::Filter::absoluteTransform):
3190         Moved from SVGFilter.
3191         (WebCore::Filter::mapAbsolutePointToLocalPoint):
3192         Ditto.
3193
3194         * rendering/FilterEffectRenderer.cpp:
3195         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
3196         Pass a default AffineTransform() to the Filter base class.
3197
3198         * svg/graphics/filters/SVGFEImage.cpp:
3199         (WebCore::FEImage::determineAbsolutePaintRect):
3200         Use the Filter without casting it to SVGFilter.
3201         (WebCore::FEImage::platformApplySoftware):
3202         Ditto.
3203
3204         * svg/graphics/filters/SVGFilter.cpp:
3205         (WebCore::SVGFilter::SVGFilter):
3206         Pass the transform to the base class, and remove initialization of a
3207         removed member var.
3208
3209         * svg/graphics/filters/SVGFilter.h:
3210         Member var moved to Filter.h.
3211
3212 2014-04-14  Darin Adler  <darin@apple.com>
3213
3214         REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an <input> in a <fieldset>
3215         https://bugs.webkit.org/show_bug.cgi?id=126322
3216
3217         Reviewed by Ryosuke Niwa.
3218
3219         One additional tweak to the fix for the bug above.
3220         Fixes crash in editing/editability/ignored-content.html test.
3221
3222         * html/HTMLObjectElement.cpp:
3223         (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to
3224         HTMLElement::canContainRangeEndPoint, bypassing HTMLPlugInElement override
3225         that always returns false. Without this change, this function was always
3226         returning false.
3227
3228 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
3229
3230         Crash in TileController::tileRevalidationTimerFired
3231         https://bugs.webkit.org/show_bug.cgi?id=131656
3232         <rdar://problem/16583166>
3233
3234         Reviewed by Sam Weinig.
3235
3236         It's possible for the TileController revalidation timer to fire after
3237         the GraphicsLayer has been destroyed, so the PlatformCALayer no longer
3238         has an owningGraphicsLayer.
3239         
3240         Bail from the timer callback if owningGraphicsLayer() is null.
3241         
3242         Also some drive-by 0 -> nullptr changes.
3243
3244         * platform/graphics/ca/GraphicsLayerCA.cpp:
3245         (WebCore::GraphicsLayerCA::willBeDestroyed):
3246         * platform/graphics/ca/PlatformCALayer.cpp:
3247         (WebCore::PlatformCALayer::~PlatformCALayer):
3248         * platform/graphics/ca/mac/TileController.mm:
3249         (WebCore::TileController::tileRevalidationTimerFired):
3250
3251 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
3252
3253         [CSS Shapes] Remove some leftover shape-inside code
3254         https://bugs.webkit.org/show_bug.cgi?id=131641
3255
3256         Reviewed by Dean Jackson.
3257
3258         I discovered that some code had been leftover from the shape-inside
3259         removal. This removes that leftover code.
3260
3261         No new tests, no behavior change.
3262
3263         * platform/text/BidiResolver.h:
3264         * rendering/BidiRun.cpp:
3265         (WebCore::BidiRun::BidiRun):
3266         * rendering/RenderBlockFlow.h:
3267         * rendering/RenderBlockLineLayout.cpp:
3268         (WebCore::RenderBlockFlow::createLineBoxes):
3269         (WebCore::RenderBlockFlow::constructLine):
3270         (WebCore::computeExpansionForJustifiedText):
3271         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3272
3273 2014-04-14  Jer Noble  <jer.noble@apple.com>
3274
3275         [MSE][Mac] video.currentTime is sometimes negative.
3276         https://bugs.webkit.org/show_bug.cgi?id=131644
3277
3278         Reviewed by Eric Carlson.
3279
3280         AVSampleBufferRenderSynchronizer will occasionally return slightly negative values
3281         when beginning playback. Clamp the return value to 0.
3282
3283         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3284         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
3285
3286 2014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
3287
3288         [CSSExclusions] Remove FIXME referencing closed bug
3289         https://bugs.webkit.org/show_bug.cgi?id=131645
3290
3291         Reviewed by Dean Jackson.
3292
3293         This is silly, but the comment is really confusing as it's entirely
3294         wrong now.
3295
3296         No new tests, no behavior change.
3297
3298         * rendering/style/RenderStyle.cpp:
3299         (WebCore::RenderStyle::changeRequiresRepaint):
3300
3301 2014-04-14  Andreas Kling  <akling@apple.com>
3302
3303         Build fixage.
3304
3305         * page/FrameView.cpp:
3306
3307 2014-04-14  Jon Honeycutt  <jhoneycutt@apple.com>
3308
3309         Assertion failure !node || node->isElementNode() in
3310         WebCore::RenderBlock::inlineElementContinuation
3311   
3312         https://bugs.webkit.org/show_bug.cgi?id=108829
3313         <rdar://problem/13666405>
3314   
3315         I can't reproduce this assertion failure, but there seems to be an
3316         invalid assumption in RenderBlock::inlineElementContinuation() that
3317         anything with the "isInline()" bit set is a RenderInline.
3318         
3319         No new test because the test case in the bug does not repro for me.
3320
3321         Reviewed by Brent Fulgham.
3322
3323         * rendering/RenderBlock.cpp:
3324         (WebCore::RenderBlock::inlineElementContinuation):
3325         Dave Hyatt says that this function should only return RenderInline
3326         objects (not non-RenderInline inline objects), so update the checks
3327         from isInline() to isRenderInline() before casting with
3328         toRenderInline().
3329
3330         * rendering/RenderInline.cpp:
3331         (WebCore::RenderInline::inlineElementContinuation):
3332         Ditto.
3333
3334 2014-04-14  Andreas Kling  <akling@apple.com>
3335
3336         Do more things under memory pressure on non-iOS platforms.
3337         <https://webkit.org/b/131625>
3338
3339         Reviewed by Antti Koivisto.
3340
3341         Rename hasReceivedMemoryPressure() to isUnderMemoryPressure() and
3342         make it use std::atomic<bool> instead of OSAtomic primitives.
3343
3344         Unmask most of the PLATFORM(IOS) blocks so all platforms can take
3345         advantage of optimizations done while under pressure. Note that
3346         isUnderMemoryPressure() will still always return false on platforms
3347         other than iOS/WK1, but this will change soon.
3348
3349         * history/PageCache.cpp:
3350         (WebCore::PageCache::canCache):
3351         * loader/FrameLoader.cpp:
3352         (WebCore::FrameLoader::commitProvisionalLoad):
3353         * page/FrameView.cpp:
3354         (WebCore::FrameView::willPaintContents):
3355         (WebCore::FrameView::didPaintContents):
3356         * platform/MemoryPressureHandler.cpp:
3357         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
3358         * platform/MemoryPressureHandler.h:
3359         (WebCore::MemoryPressureHandler::isUnderMemoryPressure):
3360         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3361         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
3362         (WebCore::MemoryPressureHandler::clearMemoryPressure):
3363         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
3364         (WebCore::MemoryPressureHandler::hasReceivedMemoryPressure): Deleted.
3365         * platform/graphics/FontCache.cpp:
3366         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
3367         * platform/ios/LegacyTileCache.mm:
3368         (WebCore::LegacyTileCache::createTilesInActiveGrid):
3369         * platform/ios/LegacyTileGrid.mm:
3370         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
3371         * platform/ios/LegacyTileLayerPool.mm:
3372         (WebCore::LegacyTileLayerPool::addLayer):
3373         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
3374         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
3375
3376 2014-04-14  Beth Dakin  <bdakin@apple.com>
3377
3378         RenderLayerCompositor's m_layerForOverhangAreas should be offset by the 
3379         topContentInset
3380         https://bugs.webkit.org/show_bug.cgi?id=131632
3381         -and corresponding-
3382         <rdar://problem/16609602>
3383
3384         Reviewed by Tim Horton.
3385
3386         Offset m_layerForOverhangAreas by the topContentInset. 
3387         * rendering/RenderLayerCompositor.cpp:
3388         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3389
3390 2014-04-14  Alexey Proskuryakov  <ap@apple.com>
3391
3392         Eliminate CachedFrame::m_mousePressNode
3393         https://bugs.webkit.org/show_bug.cgi?id=131626
3394
3395         Reviewed by Brady Eidson.
3396
3397         I couldn't find any observable effect of this change.
3398
3399         * history/CachedFrame.cpp:
3400         (WebCore::CachedFrameBase::CachedFrameBase):
3401         (WebCore::CachedFrameBase::restore):
3402         (WebCore::CachedFrame::clear):
3403         * history/CachedFrame.h:
3404         (WebCore::CachedFrame::documentLoader):
3405         (WebCore::CachedFrame::mousePressNode): Deleted.
3406         Eliminated m_mousePressNode, accessor, and code that reached out to EventHandler.
3407
3408         * page/EventHandler.cpp:
3409         (WebCore::EventHandler::mousePressNode): Deleted.
3410         (WebCore::EventHandler::setMousePressNode): Deleted.
3411         * page/EventHandler.h:
3412         (WebCore::EventHandler::setMousePressed): Deleted. This function was already unused.
3413
3414 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
3415
3416         Run filter animations in the UI process with UI-side compositing
3417    &nbs