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