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