REGRESSION(r171526): [GTK] Massive crashes.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-24  Pratik Solanki  <psolanki@apple.com>
2
3         REGRESSION(r171526): [GTK] Massive crashes.
4         https://bugs.webkit.org/show_bug.cgi?id=135283
5
6         Unreviewed. GTK build fix after r171526. Initialize m_buffer in SharedBuffer constructor.
7
8         * platform/soup/SharedBufferSoup.cpp:
9         (WebCore::SharedBuffer::SharedBuffer):
10
11 2014-07-24  Tim Horton  <timothy_horton@apple.com>
12
13         Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
14         https://bugs.webkit.org/show_bug.cgi?id=135281
15         <rdar://problem/17803347>
16
17         Reviewed by Ryosuke Niwa.
18
19         * editing/Editor.cpp:
20         (WebCore::Editor::scanSelectionForTelephoneNumbers):
21         toNormalizedRange is not guaranteed to return a non-null range.
22         If it returns null, pass the empty markedRanges down to the client as our new set.
23
24 2014-07-24  Dan Bernstein  <mitz@apple.com>
25
26         WebCore part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
27         https://bugs.webkit.org/show_bug.cgi?id=135129
28
29         Reviewed by Darin Adler.
30
31         * WebCore.exp.in: Exported equalIgnoringFragmentIdentifier(const URL&, const URL&).
32
33 2014-07-24  Simon Fraser  <simon.fraser@apple.com>
34
35         [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
36         https://bugs.webkit.org/show_bug.cgi?id=135254
37         <rdar://problem/17781423>
38
39         Reviewed by Tim Horton.
40
41         Test: fast/css/viewport-units-dynamic.html
42         
43         In WebKit1 on iOS, we want to resolve viewport units against the visible
44         viewport, not the legacy WK1 notion of the "viewport" which is the entire document.
45         
46         Fixes rendering of medium.com articles in WK1 views on iPad.
47
48         * page/FrameView.cpp:
49         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
50
51 2014-07-24  Myles C. Maxfield  <mmaxfield@apple.com>
52
53         Crash when measuring a glyphs from a fallback SVG font
54         https://bugs.webkit.org/show_bug.cgi?id=135264
55
56         Reviewed by Simon Fraser.
57
58         We can't realize font data for all fallback fonts ahead
59         of time, but we don't have all the necessary context to
60         realize SVG fallback data when it's needed. For now, we
61         can just bail; however, a larger, more invasive fix is
62         in order.
63
64         Test: svg/text/svg-fallback-font-crash.html
65
66         * platform/graphics/WidthIterator.cpp:
67         (WebCore::applyFontTransforms):
68
69 2014-07-24  Daniel Bates  <dabates@apple.com>
70             And Alexey Proskuryakov  <ap@apple.com>
71
72         [iOS] REGRESSION (WebKit2): Can't login to Wordpress.com, facebook.com when always allowing cookies
73         https://bugs.webkit.org/show_bug.cgi?id=135273
74         <rdar://problem/17598815>
75
76         Reviewed by Alexey Proskuryakov.
77
78         Fixes an issue where cookies may be created in the wrong cookie store.
79
80         Currently, when we update the CFURLRequest object associated with a ResourceRequest object
81         we explicitly set a cookie storage, cookie accept policy, and SSL properties based on the
82         corresponding values in the old CFURLRequest object (if we have one). This ultimately leads
83         to CFNetwork associating the cookies for the request with a different cookie store when we
84         handle the request in the NetworkProcess. Instead, we shouldn't set these properties
85         explicitly as we already copy them implicitly earlier (via CFURLRequestCreateMutableCopy()).
86
87         * platform/network/cf/ResourceRequestCFNet.cpp:
88         (WebCore::ResourceRequest::doUpdatePlatformRequest):
89
90 2014-07-24  Peyton Randolph  <prandolph@apple.com>
91
92         Rename feature flag for long-press gesture on Mac.                                                                   
93         https://bugs.webkit.org/show_bug.cgi?id=135259                                                                  
94
95         Reviewed by Beth Dakin.
96
97         * Configurations/FeatureDefines.xcconfig:
98         Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
99
100 2014-07-24  Dan Bernstein  <mitz@apple.com>
101
102         Fixed Windows build fix.
103
104         * platform/network/cf/AuthenticationCF.cpp:
105
106 2014-07-24  Dan Bernstein  <mitz@apple.com>
107
108         Attempted Windows build fix.
109
110         * platform/network/cf/AuthenticationCF.cpp:
111         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
112         * platform/network/cf/CredentialStorageCFNet.cpp:
113         (WebCore::CredentialStorage::getFromPersistentStorage):
114         * platform/network/cf/ProtectionSpaceCFNet.cpp:
115         (WebCore::ProtectionSpace::receivesCredentialSecurely):
116         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Deleted.
117
118 2014-07-24  Dan Bernstein  <mitz@apple.com>
119
120         <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
121         https://bugs.webkit.org/show_bug.cgi?id=135229
122
123         Reviewed by Alexey Proskuryakov.
124
125         * CMakeLists.txt: Updated for rename of a source file.
126
127         * WebCore.exp.in: Updated.
128
129         * WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
130         ProtectionSpaceCFNet.{cpp,h}.
131         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
132
133         * WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
134         ProtectionSpaceCococa.{h.mm}.
135
136         * platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
137         * platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
138         in its place added a generic ProtectionSpace class that just derives from
139         ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
140         instead of the generic class.
141
142         * platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
143         (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
144         (WebCore::ProtectionSpaceBase::host): Ditto.
145         (WebCore::ProtectionSpaceBase::port): Ditto.
146         (WebCore::ProtectionSpaceBase::serverType): Ditto.
147         (WebCore::ProtectionSpaceBase::isProxy): Ditto.
148         (WebCore::ProtectionSpaceBase::realm): Ditto.
149         (WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
150         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
151         which is now implemented in ProtectionSpaceCFNet.cpp.
152         (WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
153         ProtectionSpace::platformCompare at the end if needed.
154
155         * platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
156         (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
157         implementation that returns false, for ProtectionSpace implementations to override.
158         (WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
159         returns true, for ProtectionSpace implementations to override.
160         (WebCore::operator==): Changed to call compare.
161
162         * platform/network/cf/AuthenticationCF.cpp:
163         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
164         ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
165         (WebCore::createCF): Changed to use ProtectionSpace::cfSpace.
166
167         * platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
168         Cocoa with #if PLATFORM(WIN).
169
170         * platform/network/cf/CredentialStorageCFNet.cpp:
171         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
172         ProtectionSpace::cfSpace.
173         (WebCore::CredentialStorage::saveToPersistentStorage): Ditto.
174
175         * platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
176         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
177         CFNetwork-specific test that was previously in ProtectionSpace.cpp.
178
179         * platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
180         Declare ProtectionSpace and override receivesCredentialSecurely.
181
182         * platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
183         * platform/network/mac/AuthenticationMac.mm:
184         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
185         ProtectionSpace constructor that takes an NSURLProtectionSpace.
186         (WebCore::mac): Changed to use ProtectionSpace::nsSpace.
187
188         * platform/network/mac/CredentialStorageMac.mm:
189         (WebCore::CredentialStorage::getFromPersistentStorage): Ditto.
190
191         * platform/network/mac/ResourceHandleMac.mm:
192         (WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
193         constructor that takes an NSURLProtectionSpace.
194
195         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
196         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
197         Ditto.
198
199         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
200         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
201         Ditto.
202
203 2014-07-24  Benjamin Poulain  <benjamin@webkit.org>
204
205         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
206         https://bugs.webkit.org/show_bug.cgi?id=135227
207         <rdar://problem/17279500>
208
209         Reviewed by Simon Fraser.
210
211         Keep track of the creation/destruction of Fixed and Sticky nodes in the ScrollingTree.
212
213         * page/scrolling/ScrollingTree.cpp:
214         (WebCore::ScrollingTree::ScrollingTree):
215         * page/scrolling/ScrollingTree.h:
216         (WebCore::ScrollingTree::hasFixedOrSticky):
217         (WebCore::ScrollingTree::fixedOrStickyNodeAdded):
218         (WebCore::ScrollingTree::fixedOrStickyNodeRemoved):
219         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
220         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
221         (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
222         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
223         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
224         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
225
226 2014-07-24  Wenson Hsieh  <wenson_hsieh@apple.com>
227
228         Let WheelEvent wrap a PlatformWheelEvent
229         https://bugs.webkit.org/show_bug.cgi?id=135244
230
231         When WheelEvent is initialized with a PlatformWheelEvent, store that PlatformWheelEvent for future use.
232
233         Reviewed by Beth Dakin.
234
235         No new tests because behavior should not have changed.
236
237         * dom/WheelEvent.cpp: Added method to access the PlatformWheelEvent.
238         (WebCore::WheelEvent::WheelEvent):
239         * dom/WheelEvent.h: Added field to store PlatformWheelEvent, if initialized via PlatformWheelEvent.
240         (WebCore::WheelEvent::wheelEvent):
241
242 2014-07-24  Brian J. Burg  <burg@cs.washington.edu>
243
244         Web Replay: don't encode/decode primitive types that lack explicit sizes
245         https://bugs.webkit.org/show_bug.cgi?id=133430
246
247         Reviewed by Anders Carlsson.
248
249         Remove uses of unsigned long in encode/decode methods because the type lacks an
250         explicit size. Move frame index serialization away from using unsigned long.
251
252         * replay/ReplayController.cpp:
253         (WebCore::logDispatchedDOMEvent): Fix the format string.
254         * replay/SerializationMethods.cpp:
255         (WebCore::frameIndexFromDocument):
256         (WebCore::frameIndexFromFrame):
257         (WebCore::documentFromFrameIndex):
258         (WebCore::frameFromFrameIndex):
259         (JSC::EncodingTraits<PluginData>::encodeValue):
260         (JSC::EncodingTraits<PluginData>::decodeValue):
261         * replay/SerializationMethods.h:
262         * replay/WebInputs.json: Remove primitive types without explicit sizes.
263
264 2014-07-24  Pratik Solanki  <psolanki@apple.com>
265
266         Sharing SharedBuffer between WebCore and ImageIO is racy and crash prone
267         https://bugs.webkit.org/show_bug.cgi?id=135069
268         <rdar://problem/17470655>
269
270         Reviewed by Simon Fraser.
271
272         When passing image data to ImageIO for decoding, we pass an NSData subclass that is a wraper
273         around SharedBuffer. This can be a problem when ImageIO tries to access the data on the CA
274         thread. End result is data corruption on large image loads and potential crashes. The fix is
275         to have SharedBuffer create a copy of its data if the data has been passed to ImageIO and
276         might be accessed concurrently.
277
278         Since Vector is not refcounted, we do this by having a new refcounted object in SharedBuffer
279         that contains the buffer and we pass that in our NSData subclass WebCoreSharedBufferData.
280         Code that would result in the Vector memory moving e.g. append(), resize(), now checks to
281         see if the buffer was shared and if so, will create a new copy of the vector. This ensures
282         that the main thread does not end up invalidating the vector memory that we have passed it
283         to ImageIO.
284
285         No new tests because no functional changes.
286
287         * loader/cache/CachedResource.cpp:
288         (WebCore::CachedResource::makePurgeable):
289             Remove early return - createPurgeableMemory() has the correct check now.
290         * platform/SharedBuffer.cpp:
291         (WebCore::SharedBuffer::SharedBuffer):
292         (WebCore::SharedBuffer::adoptVector):
293         (WebCore::SharedBuffer::createPurgeableBuffer):
294             Don't create purgeable buffer if we are sharing the buffer.
295         (WebCore::SharedBuffer::append):
296         (WebCore::SharedBuffer::clear):
297         (WebCore::SharedBuffer::copy):
298         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Added.
299             Create a new copy of the data if we have shared the buffer and if appending to it would
300             exceed the capacity of the vector resulting in memmove.
301         (WebCore::SharedBuffer::appendToInternalBuffer): Added.
302         (WebCore::SharedBuffer::clearInternalBuffer): Added.
303         (WebCore::SharedBuffer::buffer):
304             Create a new copy of the buffer if we have shared it.
305         (WebCore::SharedBuffer::getSomeData):
306         * platform/SharedBuffer.h:
307         * platform/cf/SharedBufferCF.cpp:
308         (WebCore::SharedBuffer::SharedBuffer):
309         (WebCore::SharedBuffer::singleDataArrayBuffer):
310         (WebCore::SharedBuffer::maybeAppendDataArray):
311         * platform/mac/SharedBufferMac.mm:
312             Pass the InternalBuffer object to WebCoreSharedBufferData
313         (-[WebCoreSharedBufferData dealloc]):
314         (-[WebCoreSharedBufferData initWithSharedBufferInternalBuffer:]):
315         (-[WebCoreSharedBufferData length]):
316         (-[WebCoreSharedBufferData bytes]):
317         (WebCore::SharedBuffer::createNSData):
318             Call createCFData() instead of duplicating code.
319         (WebCore::SharedBuffer::createCFData):
320             If the data is in purgeable memory, make a copy of it since m_buffer was cleared when
321             creating the purgeable buffer.
322         (-[WebCoreSharedBufferData initWithSharedBuffer:]): Deleted.
323
324 2014-07-24  peavo@outlook.com  <peavo@outlook.com>
325
326         [Curl] Enable file logging.
327         https://bugs.webkit.org/show_bug.cgi?id=135202
328
329         Reviewed by Alex Christensen.
330
331         The Curl api offers the possibility to write log messages to file. Enable this for debugging purposes.
332
333         * platform/network/curl/ResourceHandleManager.cpp:
334         (WebCore::ResourceHandleManager::ResourceHandleManager):
335         (WebCore::ResourceHandleManager::~ResourceHandleManager):
336         (WebCore::ResourceHandleManager::initializeHandle):
337         * platform/network/curl/ResourceHandleManager.h:
338
339 2014-07-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
340
341         Sort WebCore.exp.in after r171252
342         https://bugs.webkit.org/show_bug.cgi?id=135239
343
344         Reviewed by Csaba Osztrogonác.
345
346         * WebCore.exp.in:
347
348 2014-07-24  Mihnea Ovidenie  <mihnea@adobe.com>
349
350         [New Multicolumn] Assertion failure when an input element has multicolumn style
351         https://bugs.webkit.org/show_bug.cgi?id=135234
352
353         Reviewed by Andrei Bucur.
354
355         Restrict the assertion in RenderBlock::canComputeRegionRangeForBox
356         only to RenderNamedFlowThread objects since for RenderMultiColumnFlowThread
357         objects we can compute a range of regions during their parent block layout.   
358
359         Test: fast/multicol/newmulticol/input-as-multicol.html
360
361         * rendering/RenderBlock.cpp:
362         (WebCore::canComputeRegionRangeForBox):
363
364 2014-07-23  Jeremy Jones  <jeremyj@apple.com>
365
366         Transparent fullscreen background when video is not present.
367         https://bugs.webkit.org/show_bug.cgi?id=135226
368
369         Reviewed by Simon Fraser.
370
371         Set background to black just before beginning the animation to fullscreen.
372
373         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
374         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): set background color black.
375
376 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
377
378         ScriptController::updateDocument ASSERT mutating map while iterating map
379         https://bugs.webkit.org/show_bug.cgi?id=135211
380
381         Reviewed by Oliver Hunt.
382
383         Avoid iterating over m_windowShells in more places. This prevents
384         the possibility of a collection during JSC allocation which might
385         cause a mutation to m_windowShells (HTMLMediaElement destruction).
386
387         Have ScriptController defriend ScriptCachedFrameData by providing
388         a getter for the list of window shells.
389
390         * bindings/js/ScriptCachedFrameData.cpp:
391         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
392         (WebCore::ScriptCachedFrameData::restore):
393         * bindings/js/ScriptController.cpp:
394         (WebCore::ScriptController::windowShells):
395         (WebCore::ScriptController::clearWindowShell):
396         (WebCore::ScriptController::attachDebugger):
397         (WebCore::ScriptController::updateDocument):
398         * bindings/js/ScriptController.h:
399
400 2014-07-23  Commit Queue  <commit-queue@webkit.org>
401
402         Unreviewed, rolling out r171498.
403         https://bugs.webkit.org/show_bug.cgi?id=135223
404
405         It will regress some scroll position restoration on navigation
406         (r167916). (Requested by smfr on #webkit).
407
408         Reverted changeset:
409
410         "[iOS WK2] Header bar on nytimes articles lands in the wrong
411         place after rubberbanding"
412         https://bugs.webkit.org/show_bug.cgi?id=135221
413         http://trac.webkit.org/changeset/171498
414
415 2014-07-23  Tim Horton  <timothy_horton@apple.com>
416
417         REGRESSION (r171376): Sometimes we detect less than the whole phone number
418         https://bugs.webkit.org/show_bug.cgi?id=135220
419         <rdar://problem/17783423>
420
421         Reviewed by Brady Eidson.
422
423         * editing/Editor.cpp:
424         (WebCore::Editor::scanSelectionForTelephoneNumbers):
425         Use the visible selection's start and end instead of base and extent, because they'll
426         always be in the right order in the case of a directional selection (base can be *after* extent
427         if you select from right to left). This fixes the code that expands the selection.
428
429         Pass the *entire* expanded selection to DataDetectors, instead of using TextIterator.
430         This way, we will find each number only once, and will never get part of a phone number once
431         and then the whole phone number later.
432
433 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
434
435         [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
436         https://bugs.webkit.org/show_bug.cgi?id=135221
437
438         Reviewed by Tim Horton.
439
440         Add a function on GraphicsLayer to force a flush of the layer position
441         to the underlying graphics system, so that when layers cease being
442         scroll-coordinated, we can ensure that their layers are repositioned
443         in the correct location.
444
445         * WebCore.exp.in:
446         * platform/graphics/GraphicsLayer.h:
447         (WebCore::GraphicsLayer::forcePositionUpdate):
448         * platform/graphics/ca/GraphicsLayerCA.cpp:
449         (WebCore::GraphicsLayerCA::forcePositionUpdate):
450         * platform/graphics/ca/GraphicsLayerCA.h:
451         * rendering/RenderLayerCompositor.cpp:
452         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
453
454 2014-07-23  Pratik Solanki  <psolanki@apple.com>
455
456         Get rid of SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator
457         https://bugs.webkit.org/show_bug.cgi?id=135219
458
459         Reviewed by Anders Carlsson.
460
461         No new tests because no functional changes.
462
463         * loader/ResourceBuffer.h:
464         * loader/mac/ResourceBuffer.mm:
465         (WebCore::ResourceBuffer::createNSData):
466         * platform/SharedBuffer.h:
467         (WebCore::SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator::NSDataRetainPtrWithoutImplicitConversionOperator): Deleted.
468         * platform/mac/SharedBufferMac.mm:
469         (WebCore::SharedBuffer::createNSData):
470
471 2014-07-23  Zalan Bujtas  <zalan@apple.com>
472
473         Subpixel rendering: Cleanup RenderLayerCompositor::deviceScaleFactor()
474         https://bugs.webkit.org/show_bug.cgi?id=135208
475
476         Reviewed by Simon Fraser.
477
478         Use m_renderView.document() to retrieve device scale factor value. m_renderView.document()
479         is always available while this->page() is not.
480
481         No change in behavior.
482
483         * rendering/RenderLayerBacking.cpp:
484         (WebCore::RenderLayerBacking::updateTransform):
485         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
486         * rendering/RenderLayerCompositor.cpp:
487         (WebCore::RenderLayerCompositor::deviceScaleFactor):
488
489 2014-07-23  peavo@outlook.com  <peavo@outlook.com>
490
491         [WinCairo] Gstreamer rendering is not working.
492         https://bugs.webkit.org/show_bug.cgi?id=135201
493
494         Reviewed by Alex Christensen.
495
496         WinCairo does not support accelerated rendering yet.
497
498         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
499         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
500
501 2014-07-23  Commit Queue  <commit-queue@webkit.org>
502
503         Unreviewed, rolling out r171455.
504         https://bugs.webkit.org/show_bug.cgi?id=135209
505
506         completely broke selection highlight invalidation (Requested
507         by thorton on #webkit).
508
509         Reverted changeset:
510
511         "REGRESSION (r169105): Crash in selection"
512         https://bugs.webkit.org/show_bug.cgi?id=134303
513         http://trac.webkit.org/changeset/171455
514
515 2014-07-23  Alex Christensen  <achristensen@webkit.org>
516
517         Compile window-inactive and fullscreen pseudoclasses in css selectors.
518         https://bugs.webkit.org/show_bug.cgi?id=135200
519
520         Reviewed by Benjamin Poulain.
521
522         * css/SelectorChecker.cpp:
523         (WebCore::SelectorChecker::checkOne):
524         Removed the check of context.hasSelectionPseudo for a window-inactive pseudoclass.
525         Moved logic to SelectorCheckerTestFunctions.h to share with the selector compiler.
526         * css/SelectorCheckerTestFunctions.h:
527         (WebCore::isWindowInactive):
528         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
529         (WebCore::matchesFullScreenAncestorPseudoClass):
530         (WebCore::matchesFullScreenDocumentPseudoClass):
531         Added from SelectorChecker.cpp.
532         * cssjit/SelectorCompiler.cpp:
533         (WebCore::SelectorCompiler::addPseudoClassType):
534         Added unoptimized pseudoclass cases for window-inactive and fullscreen pseudoclasses.
535         Explicitly listed uncompiled pseudoclasses for future work instead of using a default.
536
537 2014-07-23  Brent Fulgham  <bfulgham@apple.com>
538
539         [Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
540         https://bugs.webkit.org/show_bug.cgi?id=13519
541
542         Reviewed by Mark Lam.
543
544         * svg/SVGZoomAndPan.h: Add NO_RETURN_DUE_TO_CRASH to
545         header so function declarations match implementation.
546
547 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
548
549         JSDOMWindowShell leaks on pages with media elements
550         https://bugs.webkit.org/show_bug.cgi?id=135178
551
552         Reviewed by Oliver Hunt.
553
554         The DOMWindowWorld for HTMLMediaElements with MEDIA_CONTROLS_SCRIPT
555         was not getting cleared and removed.
556
557         * bindings/js/ScriptController.cpp:
558         (WebCore::ScriptController::clearWindowShell):
559         Iterate over a copy of the values. A sweep / garbage collection caused by
560         any JSC allocation during iteration could trigger a mutation of the m_windowShells
561         table that was being iterating. So instead iterate a list that won't mutate.
562
563         * html/HTMLMediaElement.cpp:
564         (WebCore::HTMLMediaElement::~HTMLMediaElement):
565         If we had an isolated world, release as much memory as possible.
566
567 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
568
569         Ensure we compute the min and max height of replaced elements to 'none' or 0 when appropriate.
570         https://bugs.webkit.org/show_bug.cgi?id=135181
571
572         Reviewed by David Hyatt.
573
574         If a replaced element has a percentage min or max height specified then that height value should
575         compute to 'none' for max-height and 0 for min-height when its containing block
576         does not have a height 'specified explicitly'.
577
578         This is based on a Blink patch by Robert Hogan.
579
580         Tests: css2.1/20110323/max-height-percentage-003.html
581                fast/replaced/max-height-percentage-quirks.html
582                fast/replaced/min-height-percentage-quirks.html
583                fast/replaced/min-height-percentage.html
584
585         * rendering/RenderBox.cpp:
586         (WebCore::RenderBox::logicalHeightComputesAsNone):
587         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
588         * rendering/RenderBox.h:
589
590 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
591
592         Remove CSS_EXCLUSIONS compile flag and leftover code
593         https://bugs.webkit.org/show_bug.cgi?id=135175
594
595         Reviewed by Zoltan Horvath.
596
597         At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
598         stubs. This removes the flag and the useless code.
599
600         No new tests, just removing code.
601
602         * Configurations/FeatureDefines.xcconfig:
603         * bindings/generic/RuntimeEnabledFeatures.cpp:
604         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
605         * bindings/generic/RuntimeEnabledFeatures.h:
606         (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled): Deleted.
607         (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled): Deleted.
608         * testing/InternalSettings.cpp:
609         (WebCore::InternalSettings::Backup::Backup):
610         (WebCore::InternalSettings::Backup::restoreTo):
611         (WebCore::InternalSettings::setCSSExclusionsEnabled): Deleted.
612         * testing/InternalSettings.h:
613         * testing/InternalSettings.idl:
614
615 2014-07-23  Jer Noble  <jer.noble@apple.com>
616
617         [MSE][Mac] Support abort() in SourceBufferPrivateAVFObjC.
618         https://bugs.webkit.org/show_bug.cgi?id=135163
619
620         Reviewed by Brent Fulgham.
621
622         Recreate the parser when asked to abort().
623
624         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
625         (WebCore::SourceBufferPrivateAVFObjC::abort):
626
627 2014-07-23  Myles C. Maxfield  <mmaxfield@apple.com>
628
629         Migrate accessibility/ to using nullptr instead of 0
630         https://bugs.webkit.org/show_bug.cgi?id=135185
631
632         Reviewed by Simon Fraser.
633
634         No new tests because there is no behavior change.
635
636         * accessibility/AXObjectCache.cpp:
637         (WebCore::AXObjectCache::focusedImageMapUIElement):
638         (WebCore::AXObjectCache::focusedUIElementForPage):
639         (WebCore::AXObjectCache::get):
640         (WebCore::AXObjectCache::getOrCreate):
641         (WebCore::AXObjectCache::rootObject):
642         (WebCore::AXObjectCache::rootObjectForFrame):
643         * accessibility/AXObjectCache.h:
644         (WebCore::AXObjectCache::focusedUIElementForPage):
645         (WebCore::AXObjectCache::get):
646         (WebCore::AXObjectCache::getOrCreate):
647         (WebCore::AXObjectCache::rootObject):
648         (WebCore::AXObjectCache::rootObjectForFrame):
649         (WebCore::AXObjectCache::rootAXEditableElement):
650         * accessibility/AccessibilityARIAGridRow.cpp:
651         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
652         * accessibility/AccessibilityImageMapLink.cpp:
653         (WebCore::AccessibilityImageMapLink::AccessibilityImageMapLink):
654         (WebCore::AccessibilityImageMapLink::parentObject):
655         * accessibility/AccessibilityListBox.cpp:
656         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
657         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
658         * accessibility/AccessibilityListBoxOption.cpp:
659         (WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
660         (WebCore::AccessibilityListBoxOption::parentObject):
661         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
662         * accessibility/AccessibilityMenuListPopup.cpp:
663         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
664         * accessibility/AccessibilityMockObject.cpp:
665         (WebCore::AccessibilityMockObject::AccessibilityMockObject):
666         * accessibility/AccessibilityMockObject.h:
667         * accessibility/AccessibilityNodeObject.cpp:
668         (WebCore::AccessibilityNodeObject::detach):
669         (WebCore::AccessibilityNodeObject::firstChild):
670         (WebCore::AccessibilityNodeObject::lastChild):
671         (WebCore::AccessibilityNodeObject::previousSibling):
672         (WebCore::AccessibilityNodeObject::nextSibling):
673         (WebCore::AccessibilityNodeObject::parentObject):
674         (WebCore::AccessibilityNodeObject::document):
675         (WebCore::AccessibilityNodeObject::anchorElement):
676         (WebCore::nativeActionElement):
677         (WebCore::AccessibilityNodeObject::actionElement):
678         (WebCore::AccessibilityNodeObject::mouseButtonListener):
679         (WebCore::AccessibilityNodeObject::labelForElement):
680         (WebCore::AccessibilityNodeObject::menuItemElementForMenu):
681         (WebCore::AccessibilityNodeObject::menuButtonForMenu):
682         * accessibility/AccessibilityObject.cpp:
683         (WebCore::AccessibilityObject::AccessibilityObject):
684         (WebCore::AccessibilityObject::detach):
685         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
686         (WebCore::AccessibilityObject::findMatchingObjects):
687         (WebCore::renderListItemContainerForNode):
688         (WebCore::AccessibilityObject::accessibilityObjectForPosition):
689         (WebCore::AccessibilityObject::document):
690         (WebCore::AccessibilityObject::page):
691         (WebCore::AccessibilityObject::documentFrameView):
692         (WebCore::AccessibilityObject::anchorElementForNode):
693         (WebCore::AccessibilityObject::headingElementForNode):
694         (WebCore::AccessibilityObject::firstAnonymousBlockChild):
695         (WebCore::AccessibilityObject::element):
696         (WebCore::AccessibilityObject::focusedUIElement):
697         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
698         * accessibility/AccessibilityObject.h:
699         (WebCore::AccessibilityObject::node):
700         (WebCore::AccessibilityObject::renderer):
701         (WebCore::AccessibilityObject::selectedRadioButton):
702         (WebCore::AccessibilityObject::selectedTabItem):
703         (WebCore::AccessibilityObject::accessibilityHitTest):
704         (WebCore::AccessibilityObject::firstChild):
705         (WebCore::AccessibilityObject::lastChild):
706         (WebCore::AccessibilityObject::previousSibling):
707         (WebCore::AccessibilityObject::nextSibling):
708         (WebCore::AccessibilityObject::parentObjectIfExists):
709         (WebCore::AccessibilityObject::observableObject):
710         (WebCore::AccessibilityObject::titleUIElement):
711         (WebCore::AccessibilityObject::correspondingLabelForControlElement):
712         (WebCore::AccessibilityObject::correspondingControlForLabelElement):
713         (WebCore::AccessibilityObject::scrollBar):
714         (WebCore::AccessibilityObject::anchorElement):
715         (WebCore::AccessibilityObject::actionElement):
716         (WebCore::AccessibilityObject::widget):
717         (WebCore::AccessibilityObject::widgetForAttachmentView):
718         (WebCore::AccessibilityObject::activeDescendant):
719         (WebCore::AccessibilityObject::mathRadicandObject):
720         (WebCore::AccessibilityObject::mathRootIndexObject):
721         (WebCore::AccessibilityObject::mathUnderObject):
722         (WebCore::AccessibilityObject::mathOverObject):
723         (WebCore::AccessibilityObject::mathNumeratorObject):
724         (WebCore::AccessibilityObject::mathDenominatorObject):
725         (WebCore::AccessibilityObject::mathBaseObject):
726         (WebCore::AccessibilityObject::mathSubscriptObject):
727         (WebCore::AccessibilityObject::mathSuperscriptObject):
728         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
729         * accessibility/AccessibilityProgressIndicator.cpp:
730         (WebCore::AccessibilityProgressIndicator::progressElement):
731         (WebCore::AccessibilityProgressIndicator::meterElement):
732         * accessibility/AccessibilityRenderObject.cpp:
733         (WebCore::AccessibilityRenderObject::detach):
734         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
735         (WebCore::AccessibilityRenderObject::firstChild):
736         (WebCore::AccessibilityRenderObject::lastChild):
737         (WebCore::startOfContinuations):
738         (WebCore::childBeforeConsideringContinuations):
739         (WebCore::AccessibilityRenderObject::previousSibling):
740         (WebCore::AccessibilityRenderObject::nextSibling):
741         (WebCore::nextContinuation):
742         (WebCore::AccessibilityRenderObject::renderParentObject):
743         (WebCore::AccessibilityRenderObject::parentObject):
744         (WebCore::AccessibilityRenderObject::anchorElement):
745         (WebCore::AccessibilityRenderObject::textUnderElement):
746         (WebCore::AccessibilityRenderObject::node):
747         (WebCore::AccessibilityRenderObject::labelElementContainer):
748         (WebCore::AccessibilityRenderObject::internalLinkElement):
749         (WebCore::AccessibilityRenderObject::titleUIElement):
750         (WebCore::AccessibilityRenderObject::setFocused):
751         (WebCore::AccessibilityRenderObject::topRenderer):
752         (WebCore::AccessibilityRenderObject::document):
753         (WebCore::AccessibilityRenderObject::widget):
754         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
755         (WebCore::AccessibilityRenderObject::documentFrameView):
756         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
757         (WebCore::AccessibilityRenderObject::rootEditableElementForPosition):
758         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
759         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
760         (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest):
761         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
762         (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
763         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
764         (WebCore::AccessibilityRenderObject::observableObject):
765         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
766         (WebCore::AccessibilityRenderObject::detachRemoteSVGRoot):
767         (WebCore::AccessibilityRenderObject::addHiddenChildren):
768         (WebCore::AccessibilityRenderObject::setAccessibleName):
769         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
770         (WebCore::AccessibilityRenderObject::mathRadicandObject):
771         (WebCore::AccessibilityRenderObject::mathRootIndexObject):
772         (WebCore::AccessibilityRenderObject::mathNumeratorObject):
773         (WebCore::AccessibilityRenderObject::mathDenominatorObject):
774         (WebCore::AccessibilityRenderObject::mathUnderObject):
775         (WebCore::AccessibilityRenderObject::mathOverObject):
776         (WebCore::AccessibilityRenderObject::mathBaseObject):
777         (WebCore::AccessibilityRenderObject::mathSubscriptObject):
778         (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
779         * accessibility/AccessibilitySVGRoot.cpp:
780         (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
781         * accessibility/AccessibilityScrollView.cpp:
782         (WebCore::AccessibilityScrollView::detach):
783         (WebCore::AccessibilityScrollView::scrollBar):
784         (WebCore::AccessibilityScrollView::updateScrollbars):
785         (WebCore::AccessibilityScrollView::addChildScrollbar):
786         (WebCore::AccessibilityScrollView::clearChildren):
787         (WebCore::AccessibilityScrollView::webAreaObject):
788         (WebCore::AccessibilityScrollView::accessibilityHitTest):
789         (WebCore::AccessibilityScrollView::documentFrameView):
790         (WebCore::AccessibilityScrollView::parentObject):
791         (WebCore::AccessibilityScrollView::parentObjectIfExists):
792         * accessibility/AccessibilityScrollbar.cpp:
793         (WebCore::AccessibilityScrollbar::document):
794         * accessibility/AccessibilitySpinButton.cpp:
795         (WebCore::AccessibilitySpinButton::AccessibilitySpinButton):
796         * accessibility/AccessibilityTable.cpp:
797         (WebCore::AccessibilityTable::AccessibilityTable):
798         (WebCore::AccessibilityTable::clearChildren):
799         (WebCore::AccessibilityTable::cellForColumnAndRow):
800         * accessibility/AccessibilityTableCell.cpp:
801         (WebCore::AccessibilityTableCell::parentTable):
802         (WebCore::AccessibilityTableCell::titleUIElement):
803         * accessibility/AccessibilityTableColumn.cpp:
804         (WebCore::AccessibilityTableColumn::headerObject):
805         (WebCore::AccessibilityTableColumn::headerObjectForSection):
806         * accessibility/AccessibilityTableRow.cpp:
807         (WebCore::AccessibilityTableRow::parentTable):
808         (WebCore::AccessibilityTableRow::headerObject):
809         * accessibility/ios/AXObjectCacheIOS.mm:
810         (WebCore::AXObjectCache::detachWrapper):
811         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
812         (-[WebAccessibilityObjectWrapper detach]):
813         (-[WebAccessibilityObjectWrapper tableCellParent]):
814         (-[WebAccessibilityObjectWrapper tableParent]):
815         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
816         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
817         (rendererForView):
818         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
819         * accessibility/mac/AXObjectCacheMac.mm:
820         (WebCore::AXObjectCache::detachWrapper):
821         * accessibility/mac/AccessibilityObjectMac.mm:
822         (WebCore::AccessibilityObject::detachFromParent):
823         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
824         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
825         (-[WebAccessibilityObjectWrapperBase detach]):
826         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
827         (CreateCGColorIfDifferent):
828         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
829         (rendererForView):
830         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
831         * accessibility/win/AccessibilityObjectWrapperWin.h:
832         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
833
834 2014-07-23  Mihnea Ovidenie  <mihnea@adobe.com>
835
836         ASSERTION FAILED: generatingElement() in WebCore::RenderNamedFlowFragment::regionOversetState
837         https://bugs.webkit.org/show_bug.cgi?id=135153
838
839         Reviewed by David Hyatt.
840
841         Even though the CSSRegions spec defines the behaviour of a multicolumn region,
842         we currently do not support this functionality. This patch ensures that a multicolumn
843         element does not become a region. In the future, when we will implement the multicolumn
844         as region functionality, http://dev.w3.org/csswg/css-regions/#multi-column-regions, we
845         will remove this restriction.
846
847         Test: fast/regions/multicol-as-region-prevented.html
848
849         * rendering/RenderBlockFlow.cpp:
850         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
851
852 2014-07-23  Zan Dobersek  <zdobersek@igalia.com>
853
854         [CMake] Avoid building WebCore with ANGLE's OpenGL/EGL headers
855         https://bugs.webkit.org/show_bug.cgi?id=135167
856
857         Reviewed by Martin Robinson.
858
859         * CMakeLists.txt: Don't add ANGLE/include to the WebCore_INCLUDE_DIRECTORIES list
860         as this results in ANGLE's OpenGL and EGL headers being included, instead of the
861         headers that are provided by the system. Only the ANGLESupport library should be built
862         with that specific header inclusion path.
863
864 2014-07-10  Radu Stavila  <stavila@adobe.com>
865
866         REGRESSION (r169105): Crash in selection
867         https://bugs.webkit.org/show_bug.cgi?id=134303
868
869         Reviewed by David Hyatt.
870
871         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
872         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
873         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
874         we get inconsistent data.
875
876         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
877         method first iterates through all subtrees and performs the "clear" method and then starts all over again
878         and performs the "apply" method.
879
880         Also, the selectionStart/End members in RenderView have been renamed to fix problems caused by the fact that
881         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
882
883         Test: fast/regions/selection/crash-deselect.html
884
885         * WebCore.xcodeproj/project.pbxproj:
886         * rendering/RenderBlock.cpp:
887         (WebCore::RenderBlock::isSelectionRoot):
888         * rendering/RenderSelectionInfo.h:
889         * rendering/RenderView.cpp:
890         (WebCore::RenderView::RenderView):
891         (WebCore::RenderView::setSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
892         (WebCore::RenderView::splitSelectionBetweenSubtrees):
893         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
894         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
895         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
896         (WebCore::RenderView::getSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
897         (WebCore::RenderView::setSubtreeSelection): Deleted.
898         * rendering/RenderView.h:
899         * rendering/SelectionSubtreeRoot.cpp:
900         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
901         * rendering/SelectionSubtreeRoot.h:
902         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
903
904 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
905
906         [Win] Build fix for bot.
907
908         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
909         (WebCore::createLegibleOutputSubtypes): Declare 'wvtt' locally, rather
910         than relying on potentially unavailable declaration.
911
912 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
913
914         [Win] Build fix for Windows bots
915
916         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Provide missing
917         structure definition when needed by bot.
918
919 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
920
921         [Win] Build fix for EWS bots.
922
923         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Forward declare
924         structure definition.
925
926 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
927
928         [Win] Fix Crash when handling Legible Output callbacks
929         https://bugs.webkit.org/show_bug.cgi?id=134946
930
931         Reviewed by Dean Jackson.
932
933         Relanding after adding fixes to support build bots.
934
935         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
936         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
937         Windows-specific 'ASSERT_NOT_REACHED' code path.
938         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
939         (WebCore::createLegibleOutputSubtypes): Added.
940         (WebCore::AVFWrapper::createPlayerItem): Updated to request native
941         samples from AVFoundationCF.
942
943 2014-07-16  Myles C. Maxfield  <mmaxfield@apple.com>
944
945         Copying and pasting trivial H2 content causes a crash in firstPositionInNode
946         https://bugs.webkit.org/show_bug.cgi?id=134897
947
948         Reviewed by Ryosuke Niwa.
949
950         ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder() attempts
951         to move pasted headings out of existed headings, with out regard to if the existing
952         heading is the contenteditable root.
953
954         Test: editing/pasteboard/heading-crash.html
955
956         * editing/ReplaceSelectionCommand.cpp:
957         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
958
959 2014-07-22  Ryuan Choi  <ryuan.choi@samsung.com>
960
961         Remove dead APIs from TiledBackingStore
962         https://bugs.webkit.org/show_bug.cgi?id=135158
963
964         Reviewed by Gyuyoung Kim.
965
966         setContentsFrozen and related code of TiledBackingStore are not used since Qt port is removed.
967
968         * platform/graphics/TiledBackingStore.cpp:
969         (WebCore::TiledBackingStore::TiledBackingStore):
970         (WebCore::TiledBackingStore::updateTileBuffers):
971         (WebCore::TiledBackingStore::setContentsScale):
972         (WebCore::TiledBackingStore::createTiles):
973         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
974         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
975         (WebCore::TiledBackingStore::commitScaleChange): Deleted.
976         (WebCore::TiledBackingStore::isBackingStoreUpdatesSuspended): Deleted.
977         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended): Deleted.
978         (WebCore::TiledBackingStore::setContentsFrozen): Deleted.
979         * platform/graphics/TiledBackingStore.h:
980         (WebCore::TiledBackingStore::contentsFrozen): Deleted.
981
982 2014-07-22  Alex Christensen  <achristensen@webkit.org>
983
984         Fix window-inactive css selectors when using querySelector.
985         https://bugs.webkit.org/show_bug.cgi?id=135149
986
987         Reviewed by Tim Horton.
988
989         Test: fast/selectors/querySelector-window-inactive.html
990
991         * css/SelectorChecker.cpp:
992         (WebCore::SelectorChecker::checkOne):
993         Removed default and implemented case PseudoClassWindowInactive.
994
995 2014-07-22  Tim Horton  <timothy_horton@apple.com>
996
997         REGRESSION (r171016): Reproducible infinite spin selecting phone number
998         https://bugs.webkit.org/show_bug.cgi?id=135183
999         <rdar://problem/17727342>
1000
1001         Reviewed by Ryosuke Niwa.
1002
1003         * editing/Editor.cpp:
1004         (WebCore::Editor::scanRangeForTelephoneNumbers):
1005         Make use of TextIterator::subrange, which knows how to make a subrange from character positions,
1006         instead of assuming that our character positions translate directly to positions in the incoming range.
1007         Make use of DocumentMarkerController::addMarker, which takes a range and applies the marker to
1008         all text nodes inside the range as appropriate.
1009         Fix naming of the shadowed 'length' local.
1010         Fix a typo in the comment.
1011
1012 2014-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
1013
1014         [iOS] [OSX] Don't transcode WOFF on platforms that support it natively
1015         https://bugs.webkit.org/show_bug.cgi?id=134904
1016
1017         Reviewed by Andreas Kling.
1018
1019         No new tests because there is no behavior change.
1020
1021         * loader/cache/CachedFont.cpp:
1022         (WebCore::CachedFont::ensureCustomFontData):
1023
1024 2014-07-22  peavo@outlook.com  <peavo@outlook.com>
1025
1026         [Win] Crash after plugin is unloaded.
1027         https://bugs.webkit.org/show_bug.cgi?id=119044
1028
1029         Reviewed by Darin Adler.
1030
1031         We need to invalidate all runtime objects when a plugin view is destroyed, in case the plugin is unloaded,
1032         and one of these runtime objects accesses the plugin function table upon destruction afterwards, which will cause a crash.
1033         If we use the weak pointer to the runtime object when invalidating, it will be null if it's in the WeakImpl::Dead state.
1034         This means the runtime object will not be invalidated, possibly causing a crash if the plugin is unloaded.
1035         It should be safe to use the raw pointer to the runtime object when invalidating, since finalized runtime objects
1036         will be removed from the set of runtime objects in the method RootObject::finalize().
1037
1038         * bridge/runtime_root.cpp:
1039         (JSC::Bindings::RootObject::invalidate): Make sure all runtime objects are invalidated by getting the raw runtime object pointer from the hash key.
1040
1041 2014-07-22  Enrica Casucci  <enrica@apple.com>
1042
1043         REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
1044         https://bugs.webkit.org/show_bug.cgi?id=135180
1045         <rdar://problem/16721055>
1046
1047         Reviewed by Simon Fraser.
1048
1049         AsyncScrollingCoordinator will force a selection update on iOS
1050         when scrolling terminates in an overflow scroll.
1051
1052         * loader/EmptyClients.h:
1053         * page/EditorClient.h:
1054         * page/scrolling/AsyncScrollingCoordinator.cpp:
1055         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1056         * page/scrolling/ScrollingTree.h:
1057         (WebCore::ScrollingTree::scrollingTreeNodeWillStartScroll):
1058         (WebCore::ScrollingTree::scrollingTreeNodeDidEndScroll):
1059
1060 2014-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
1061
1062         [Mac] Cocoa throws exception when the return type of NSAccessibilityLinkedUIElementsAttribute is not an array
1063         https://bugs.webkit.org/show_bug.cgi?id=135165
1064
1065         Reviewed by Simon Fraser.
1066
1067         Return an empty array instead of nil.
1068
1069         Updated tests.
1070
1071         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1072         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1073
1074 2014-07-22  Commit Queue  <commit-queue@webkit.org>
1075
1076         Unreviewed, rolling out r171357.
1077         https://bugs.webkit.org/show_bug.cgi?id=135173
1078
1079         broke Windows build. (Requested by bfulgham on #webkit).
1080
1081         Reverted changeset:
1082
1083         "[Win] Fix Crash when handling Legible Output callbacks"
1084         https://bugs.webkit.org/show_bug.cgi?id=134946
1085         http://trac.webkit.org/changeset/171357
1086
1087 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
1088
1089         [Win] Fix Crash when handling Legible Output callbacks
1090         https://bugs.webkit.org/show_bug.cgi?id=134946
1091
1092         Reviewed by Dean Jackson.
1093
1094         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1095         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Remove
1096         Windows-specific 'ASSERT_NOT_REACHED' code path.
1097         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1098         (WebCore::createLegibleOutputSubtypes): Added.
1099         (WebCore::AVFWrapper::createPlayerItem): Updated to request native
1100         samples from AVFoundationCF.
1101
1102 2014-07-21  Sam Weinig  <sam@webkit.org>
1103
1104         [Cocoa] WKScriptMessageHandlers don't seem to function properly after navigating
1105         https://bugs.webkit.org/show_bug.cgi?id=135148
1106
1107         Reviewed by Geoffrey Garen.
1108
1109         The "webkit" property on the window was not getting installed for subsequent
1110         loads due to intricate dance playing setting the JSDOMWindow where the DOMWindow
1111         object is not yet in a Frame when the JSDOMWindow is created. Since we were
1112         adding the "webkit" property on construction, the property was returning null
1113         thinking it had no Frame and was in a bad state. We can fix this by making the
1114         "webkit" property behave like all the other window properties moving its getting
1115         to JSDOMWindow::getOwnPropertySlot.
1116
1117         Added API test (WebKit2Cocoa/UserContentController).
1118
1119         * bindings/js/JSDOMWindowBase.cpp:
1120         (WebCore::JSDOMWindowBase::finishCreation):
1121         * bindings/js/JSDOMWindowCustom.cpp:
1122         (WebCore::jsDOMWindowWebKit):
1123         (WebCore::JSDOMWindow::getOwnPropertySlot):
1124
1125 2014-07-22  Brent Fulgham  <bfulgham@apple.com>
1126
1127         [Win] Fix Leak in WebCore::createGlobalImageFileDescriptor 
1128         https://bugs.webkit.org/show_bug.cgi?id=134423
1129         <rdar://problem/17492758>
1130
1131         Reviewed by Geoffrey Garen.
1132
1133         * platform/win/PasteboardWin.cpp:
1134         (WebCore::createGlobalImageFileDescriptor): Unlock and release the
1135         HGLOBAL when exiting early.
1136
1137 2014-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
1138
1139         Clicking on links while accessibility is enabled sometimes crashes
1140         https://bugs.webkit.org/show_bug.cgi?id=135074
1141
1142         Reviewed by Chris Fleizach.
1143
1144         When an accessibility request comes in from the system, we call updateBackingStore() on the
1145         relevant AccessibilityObject, which triggers a relayout of the entire document. This relayout
1146         might delete that accessibility node and its parent, which would cause the node to be deleted.
1147         After the stack unwinds, we then call a member function on the node without checking for this
1148         condition.
1149
1150         Test: accessibility/parent-delete.html
1151
1152         * accessibility/AccessibilityObject.cpp:
1153         (WebCore::AccessibilityObject::updateBackingStore): Retain the node for the duration of the
1154         function.
1155
1156 2014-07-22  Jeremy Jones  <jeremyj@apple.com>
1157
1158         Don't create new UIWindow for video fullscreen.
1159         https://bugs.webkit.org/show_bug.cgi?id=135038
1160
1161         Reviewed by Darin Adler.
1162
1163         * WebCore.exp.in:
1164         * platform/ios/WebVideoFullscreenControllerAVKit.h: use UIView instead of UIScreen.
1165         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1166         (-[WebVideoFullscreenController enterFullscreen:]): provide parent UIView.
1167         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: remove UIWindow.
1168         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
1169         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto 
1170         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
1171         (WebVideoFullscreenInterfaceAVKit::invalidate): ditto
1172         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
1173
1174 2014-07-22  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1175
1176         [GTK] Rollout r170529 due to ~10% performance regression on the
1177         perf test Animation/balls.
1178         https://bugs.webkit.org/show_bug.cgi?id=134972
1179
1180         Reviewed by Martin Robinson.
1181
1182         Reverted changeset:
1183         "Increase priority on SharedTimer source."
1184         https://trac.webkit.org/r170529
1185
1186 2014-07-18  Dirk Schulze  <krit@webkit.org>
1187
1188         Turn width/height to presentation attributes
1189         https://bugs.webkit.org/show_bug.cgi?id=135046
1190
1191         Reviewed by Dean Jackson.
1192
1193         The elements <svg>, <image>, <pattern>, <mask> and <foreignObject> have the
1194         'width' and 'height' attributes. So far they can just be set by SVG DOM or
1195         setAttribute. Furthermore, animations just work with SVG Animation - No support
1196         for CSS Animations and CSS Transitions. We started to turn the width and height
1197         attributes on SVG roots to presentation attributes already. A presentation
1198         attribute is a CSS property that can also be set by DOM (or now by SVG DOM).
1199
1200         This patch turns all width and height attributes to presentation attributes. It
1201         basically allows authors to style width and height with CSS as well. Width and
1202         height can now be set with CSS style sheets and can be animated with CSS.
1203
1204         To some degree it made it possible to remove code duplication. However, since
1205         SVG DOM requires us to use SVGLength types and since we did not turn all
1206         SVG attributes to the CSS length values (and our internal Length struct) yet,
1207         we still need a hybrid - a bridge between SVGLength (for SVG DOM) and Length (for
1208         RenderStyle). Once we move all attributes to use the Length struct, we can make SVGLength
1209         a wrapper for Length and can move more code to the render tree.
1210
1211         The current challenge is to synchronize SVG DOM, normal DOM and RenderStyle.
1212         With this patch we handle most part in RenderStyle. SVG DOM changes are
1213         synchronized to DOM and RenderStyle will call needsStyleRecalc. Furthermore,
1214         SVG Animations will continue to animate the SVG DOM (and synchronize the changes
1215         back to RenderStyle) if the element has a JS property for the currently animated
1216         attribute.
1217
1218         Short example:
1219
1220             <rect>
1221                 <animate attributeName="width">
1222             </rect>
1223
1224         The <rect> element has the SVG DOM property 'width'. Therefore, we animate the SVG DOM
1225         property and synchronize RenderStyle.
1226
1227             <ellipse>
1228                 <animate attributeName="width">
1229             </ellipse>
1230
1231         The <ellipse> element does NOT have the SVG DOM property 'width'. Therefore, we
1232         animate the CSS property directly. With synchronizing RenderStyle in all cases, we
1233         make sure that the CSS cascade works even on animating on multiple SVG hierarchy
1234         levels (animation of 'width' on <g> and inheriting the property value on a child
1235         <rect>).
1236
1237         With using presentation attributes, we also inherit the CSS property parsing for
1238         SVG attributes. <rect width="  100px  "> is possible now. (Note the trailing whitespaces.)
1239         This follows a recent resolution of the SVG WG.
1240
1241         Since we turned width and height to presentation attributes, the layout optimization
1242         selfHasRelativeLengths() in the DOM can't be used anymore. selfHasRelativeLengths() was
1243         intended to solve a problem where we did not layout relatively position/sized elements
1244         when the parent changes its size. However, as a side effect it did not call layout
1245         for absolutely positioned/sized elements since the layout does not change. I run
1246         all performance tests that we have and even wrote a test with hundreds of elements
1247         that would be affected by this optimization. The differences were inside the sigma
1248         of a normal test run. (Means I couldn't measure a performance difference.)
1249         Therefore, it is not worth it to keep the "optimization" around and I will probably
1250         remove it entirely for all basic shapes but <path> and <polygon> in future patches.
1251
1252         Tests: svg/css/parse-height.html
1253                svg/css/parse-width.html
1254                svg/css/width-height-presentation-attribute-expected.svg
1255                svg/css/width-height-presentation-attribute.svg
1256
1257         * css/CSSComputedStyleDeclaration.cpp:
1258         (WebCore::ComputedStyleExtractor::propertyValue): We never calculated the computed
1259             value of width/height for SVG elements and returned auto instead. This is based
1260             on a rule of CSS 2 and needs to be fixed in CSS3.
1261         * css/DeprecatedStyleBuilder.cpp:
1262         (WebCore::ApplyPropertyLength::applyValue): Length always incorporates the zoom level.
1263             In SVG we still apply the zoom after all operations by scaling the context. We need
1264             to take this in account for Length and don't apply zoom on SVG inline elements.
1265         * css/StyleResolver.cpp:
1266         (WebCore::StyleResolver::useSVGZoomRulesForLength):
1267             See above.
1268         * css/StyleResolver.h:
1269         * rendering/svg/RenderSVGRect.cpp:
1270         (WebCore::RenderSVGRect::updateShapeFromElement): Do not call width() and height() on
1271             SVG DOM but use the values of RenderStyle instead.
1272         * rendering/svg/SVGPathData.cpp:
1273         (WebCore::updatePathFromRectElement): Ditto.
1274         * svg/SVGAnimateElement.cpp:
1275         (WebCore::SVGAnimateElement::resetAnimatedType): We need to differ between CSS properties
1276             with and without SVG DOM on the current element. In the later case we animate the 
1277             SVG DOM and need to synch RenderStyle.
1278         (WebCore::SVGAnimateElement::clearAnimatedType): Ditto.
1279         (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto.
1280         * svg/SVGAnimationElement.cpp:
1281         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): This checks if the CSS property
1282             has to be synched with SVG DOM.
1283         (WebCore::SVGAnimationElement::shouldApplyAnimation): Ditto.
1284         * svg/SVGAnimationElement.h:
1285         * svg/SVGElement.cpp:
1286         (WebCore::populateAttributeNameToCSSPropertyIDMap): Add width and heigth to the CSS property
1287             list for presentation attributes.
1288         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): CSS properties with
1289             SVG DOM synchronization need to be treated differently. Collect them in a separate map.
1290         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): Caller for the map.
1291         (WebCore::SVGElement::animatedPropertyTypeForAttribute): We need to check both maps here:
1292             CSS properties and CSS properties with SVG DOM synch.
1293         (WebCore::SVGElement::isAnimatableCSSProperty): Ditto.
1294         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Just return true if the property name
1295             is in the map of properties with SVG DOM for the current element.
1296         * svg/SVGElement.h:
1297         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): Call needsStyleRecalc.
1298         * svg/SVGFilterElement.cpp: Make width/height presentation attribute.
1299         (WebCore::SVGFilterElement::svgAttributeChanged):
1300         (WebCore::SVGFilterElement::selfHasRelativeLengths): Deleted.
1301         * svg/SVGFilterElement.h: Ditto.
1302         * svg/SVGForeignObjectElement.cpp:
1303         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1304         (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): Deleted.
1305         * svg/SVGForeignObjectElement.h:
1306         * svg/SVGImageElement.cpp: Ditto.
1307         (WebCore::SVGImageElement::svgAttributeChanged):
1308         (WebCore::SVGImageElement::isPresentationAttribute): Deleted.
1309         (WebCore::SVGImageElement::collectStyleForPresentationAttribute): Deleted.
1310         (WebCore::SVGImageElement::selfHasRelativeLengths): Deleted.
1311         * svg/SVGImageElement.h:
1312         * svg/SVGLength.h: Transform an Length value to an absolute value by taking the SVG viewport
1313             into account. (An SVG viewport is not the same as the CSS viewport.)
1314         * svg/SVGLengthContext.cpp: Ditto.
1315         (WebCore::SVGLengthContext::valueForLength):
1316         * svg/SVGLengthContext.h:
1317         * svg/SVGMaskElement.cpp: Make width/height presentation attribute.
1318         (WebCore::SVGMaskElement::svgAttributeChanged):
1319         (WebCore::SVGMaskElement::selfHasRelativeLengths): Deleted.
1320         * svg/SVGMaskElement.h:
1321         * svg/SVGPatternElement.cpp: Ditto.
1322         (WebCore::SVGPatternElement::svgAttributeChanged):
1323         (WebCore::SVGPatternElement::selfHasRelativeLengths): Deleted.
1324         * svg/SVGPatternElement.h:
1325         * svg/SVGRectElement.cpp: Ditto.
1326         (WebCore::SVGRectElement::svgAttributeChanged):
1327         (WebCore::SVGRectElement::selfHasRelativeLengths): Deleted.
1328         * svg/SVGRectElement.h:
1329         * svg/SVGSVGElement.cpp: Ditto.
1330         (WebCore::SVGSVGElement::svgAttributeChanged): Clean up redundant layout calls.
1331         (WebCore::SVGSVGElement::isPresentationAttribute): Deleted.
1332         (WebCore::SVGSVGElement::collectStyleForPresentationAttribute): Deleted.
1333         * svg/SVGSVGElement.h:
1334         * svg/properties/SVGAnimatedProperty.cpp: Synchronize SVG DOM with DOM.
1335         (WebCore::SVGAnimatedProperty::commitChange):
1336
1337 2014-07-22  Adrian Perez de Castro  <aperez@igalia.com>
1338
1339         [GStreamer] [GTK] WebKit does not build with GStreamer 1.4
1340         https://bugs.webkit.org/show_bug.cgi?id=135114
1341
1342         Reviewed by Philippe Normand.
1343
1344         Fix build with GStreamer 1.4
1345
1346         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1347         Change GstMpegTs-prefixed types to use the GstMpegts prefix.
1348         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1349         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1350         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1351         Ditto.
1352
1353 2014-07-21  Benjamin Poulain  <bpoulain@apple.com>
1354
1355         [iOS][WK2] Improve event throttling for Scroll Events
1356         https://bugs.webkit.org/show_bug.cgi?id=135082
1357         <rdar://problem/17445266>
1358
1359         Reviewed by Simon Fraser.
1360
1361         This patch is composed of two parts. The first part in the WebKit layer
1362         track an approximate measurement of the main thread responsiveness.
1363         The second part in WebCore use that information to avoid sending events
1364         if a page is unresponsive.
1365
1366         In WebCore, this patch only consider scroll events so far. Hopefully the concept
1367         should be easy to generalize.
1368
1369         * loader/EmptyClients.h:
1370         * page/ChromeClient.h:
1371         Chrome client provides us with one information: how long an incoming event should be delayed.
1372         Every port is free to implement whatever logic is suitable for them.
1373
1374         * page/FrameView.cpp:
1375         (WebCore::FrameView::FrameView):
1376         (WebCore::FrameView::reset):
1377         (WebCore::FrameView::delayedScrollEventTimerFired):
1378         (WebCore::FrameView::scrollPositionChanged):
1379         (WebCore::FrameView::sendScrollEvent):
1380         * page/FrameView.h:
1381         Scroll events do not have any associated information so they can be coalesced by just skipping
1382         all input hapenning during the throttling delay.
1383
1384         The implementation is done by using a timer to delay the events.
1385
1386 2014-07-21  Tim Horton  <timothy_horton@apple.com>
1387
1388         Avoid putting empty-sized surfaces into IOSurfacePool
1389         https://bugs.webkit.org/show_bug.cgi?id=135136
1390
1391         Reviewed by Simon Fraser.
1392
1393         * platform/graphics/cg/IOSurfacePool.cpp:
1394         (WebCore::IOSurfacePool::addSurface):
1395         Avoid adding 0x0 surfaces to the pool, because they will wreak havoc
1396         when their size is used as the key in the CachedSurfaceMap.
1397         Additionally, avoid any empty sizes, because they're just pointless.
1398
1399 2014-07-21  Beth Dakin  <bdakin@apple.com>
1400
1401         WK1 should always setAcceleratedCompositingForFixedPositionEnabled(true) on 
1402         Yosemite
1403         https://bugs.webkit.org/show_bug.cgi?id=135135
1404
1405         Reviewed by Darin Adler.
1406
1407         This patch gets rid of the ChromeClient function that was introduced with 
1408         http://trac.webkit.org/changeset/171308 We’ll just enable the Setting instead.
1409         * css/StyleResolver.cpp:
1410         (WebCore::StyleResolver::adjustRenderStyle):
1411         (WebCore::fixedPositionCreatesStackingContext): Deleted.
1412         * page/ChromeClient.h:
1413         (WebCore::ChromeClient::requiresAcceleratedCompositingForViewportConstrainedPosition): Deleted.
1414         * rendering/RenderLayerCompositor.cpp:
1415         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1416
1417 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
1418
1419         [iOS WK2] Turn off position:fixed behavior when the keyboard is up
1420         https://bugs.webkit.org/show_bug.cgi?id=132537
1421
1422         Reviewed by Benjamin Poulain.
1423
1424         Export RenderObject::localToContainerPoint().
1425
1426         * WebCore.exp.in:
1427
1428 2014-07-21  Jer Noble  <jer.noble@apple.com>
1429
1430         [MSE] YouTube video decode error when variant-switching
1431         https://bugs.webkit.org/show_bug.cgi?id=135128
1432
1433         Reviewed by Brent Fulgham.
1434
1435         Test: media/media-source/media-source-overlapping-decodetime.html
1436
1437         When variant-switching, the situation can arise where an existing sample with a presentation
1438         timestamp of N and a decode timestamp of M, and a new sample with a presentation timestamp > N
1439         and the same decode timestamp of M, will keep the new sample from being added to the SampleMap.
1440         This can result in a decode error when samples depending on that new, missing sample are enqueued.
1441
1442         The MSE spec is silent on the issue of overlapping decode timestamps. However, it guarantees that
1443         presentation timestamps are non-overlapping. So instead of using just the decode timestamp as a key
1444         for storing the samples in decode order, use both the decode timestamp and the presentation timestamp.
1445         That ensures that samples with different presentation times but equal decode times are both inserted
1446         into the decode queue, and in the correct order.
1447
1448         * Modules/mediasource/SampleMap.cpp:
1449         (WebCore::SampleIsRandomAccess::operator()): Update the parameter type to match the new KeyType.
1450         (WebCore::SampleMap::addSample): Pass both decodeTime and presentationTime as the key to decodeOrder.
1451         (WebCore::SampleMap::removeSample): Ditto.
1452         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeKey): Renamed from findSampleWithDecodeTime.
1453         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeKey): renamed from reverseFindSampleWithDecodeTime.
1454         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Use renamed version of above.
1455         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
1456         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
1457         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Deleted.
1458         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Deleted.
1459         * Modules/mediasource/SampleMap.h:
1460         * Modules/mediasource/SourceBuffer.cpp:
1461         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
1462         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
1463         (WebCore::SourceBuffer::reenqueueMediaForTime): Ditto.
1464
1465 2014-07-21  Andy Estes  <aestes@apple.com>
1466
1467         [iOS] Handle QuickLook ResourceLoaders in the web process
1468         https://bugs.webkit.org/show_bug.cgi?id=135113
1469
1470         Reviewed by David Kilzer.
1471
1472         No new tests. QuickLook is not testable from WebKit.
1473
1474         * WebCore.exp.in:
1475         * loader/ResourceLoadScheduler.cpp:
1476         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Start loading the ResourceLoader if it is for a QuickLook resource.
1477         * loader/ResourceLoadScheduler.h:
1478
1479 2014-07-21  Alexey Proskuryakov  <ap@apple.com>
1480
1481         Case sensitive file system build fix.
1482
1483         * page/scrolling/ScrollingStateTree.cpp:
1484
1485 2014-07-21  Beth Dakin  <bdakin@apple.com>
1486
1487         Put position:fixed elements into layers when a WK1 view is layer-backed
1488         https://bugs.webkit.org/show_bug.cgi?id=135075
1489
1490         Reviewed by Darin Adler.
1491
1492         This patch adds a new ChromeClient function called 
1493         requiresAcceleratedCompositingForViewportConstrainedPosition(). Since a view can 
1494         go in and out of layer backing, we need a ChromeClient method that can be 
1495         dynamically re-evaluated rather than using the existing settings for enabling 
1496         accelerated fixed and fixed that creates a stacking context.
1497
1498         Ensure that fixed elements create a stacking context when 
1499         requiresAcceleratedCompositingForViewportConstrainedPosition is true.
1500         * css/StyleResolver.cpp:
1501         (WebCore::StyleResolver::adjustRenderStyle):
1502
1503         New ChromeClient function.
1504         * page/ChromeClient.h:
1505
1506 2014-07-21  Simon Fraser  <simon.fraser@apple.com>
1507
1508         Add helper functions to dump the scrolling state tree from the debugger
1509         https://bugs.webkit.org/show_bug.cgi?id=135101
1510
1511         Reviewed by Darin Adler.
1512
1513         Add debug-only showScrollingStateTree() functions that take a ScrollingStateTree* and ScrollingStateNode*
1514         for use while debugging.
1515
1516         * page/scrolling/ScrollingStateTree.cpp:
1517         (showScrollingStateTree):
1518         * page/scrolling/ScrollingStateTree.h:
1519
1520 2014-07-20  Simon Fraser  <simon.fraser@apple.com>
1521
1522         [iOS WK1] Single touch div scrolling doesn't work in framesets (breaks Word previews)
1523         https://bugs.webkit.org/show_bug.cgi?id=135103
1524         <rdar://problem/11830219>
1525
1526         Reviewed by Darin Adler.
1527
1528         After r166117 all layer flushing starts on the root frame; we no longer flush layers
1529         for each frame during painting. However, flushing GraphicsLayers can set some state
1530         on a subframe RenderLayerCompositor that is now never processed, which breaks scroll
1531         layer registration.
1532         
1533         Fix by doing a walk of the Frame tree, and calling didFlushLayers() on subframe RenderLayerCompositors
1534         before calling didFlushLayers() on self.
1535
1536         * rendering/RenderLayerCompositor.cpp:
1537         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1538         (WebCore::RenderLayerCompositor::didFlushLayers):
1539         (WebCore::RenderLayerCompositor::notifySubframesAfterLayerFlush):
1540         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers): Drive-by nullptr.
1541         * rendering/RenderLayerCompositor.h:
1542
1543 2014-07-21  Eric Carlson  <eric.carlson@apple.com>
1544
1545         [iOS] a Paused media session is not active
1546         https://bugs.webkit.org/show_bug.cgi?id=135108
1547
1548         Reviewed by Darin Adler.
1549
1550         Activating the shared AudioSession will pause audio playing in another application,
1551         so only report a Playing media sessions as active.
1552
1553         * platform/audio/MediaSessionManager.cpp:
1554         * platform/audio/MediaSessionManager.h:
1555         (WebCore::MediaSessionManager::activeAudioSessionRequired): Renamed from hasActive to make
1556         clear what it does. Only return true for a session that is Playing.
1557
1558         * platform/audio/mac/MediaSessionManagerMac.cpp:
1559         (MediaSessionManager::updateSessionState): hasActive renamed to activeAudioSessionRequired.
1560
1561 2014-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1562
1563         Unreviewed. Update GObject DOM bindings test results after r171285.
1564
1565         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1566         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1567         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1568         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1569         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1570         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1571         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
1572         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1573         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1574         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1575         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1576         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
1577         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1578         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
1579         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1580         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1581         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
1582         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
1583
1584 2014-07-20  Pratik Solanki  <psolanki@apple.com>
1585
1586         Reduce the chances of a race condition when sharing SharedBuffer
1587         https://bugs.webkit.org/show_bug.cgi?id=135060
1588         <rdar://problem/17729444>
1589
1590         Reviewed by Darin Adler.
1591
1592         We currently pass a SharedBuffer wrapped in WebCoreSharedBufferData to ImageIO for image
1593         decoding. This is not thread safe since ImageIO will access this buffer on a separate
1594         thread. We access SharedBuffer::buffer() on the other thread which resizes the Vector
1595         m_buffer if m_size is greater than the vector size. Since the code in SharedBuffer::append()
1596         sets m_size before appending the data to the buffer, m_size is out of sync with the m_buffer
1597         size for the entire duration of the Vector append which could be doing a lot of copying if
1598         the resource is large. While this change does not fix the race condition, we can at least
1599         reduce the chances of SharedBuffer::buffer() calling resize() by setting m_size after the
1600         cector has finished appending.
1601
1602         No new tests because no functional changes.
1603
1604         * platform/SharedBuffer.cpp:
1605         (WebCore::SharedBuffer::append):
1606
1607 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
1608
1609         Fix test crashes when cloning video layer since r171286
1610         https://bugs.webkit.org/show_bug.cgi?id=135112
1611
1612         Unreviewed. Fix crashing tests by conditionalizing inline video layer change.
1613         compositing/video/video-reflection.html [ Crash ]
1614         media/video-layer-crash.html [ Crash ]
1615
1616         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional
1617         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
1618         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto
1619         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto
1620         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto
1621
1622 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
1623
1624         Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
1625         https://bugs.webkit.org/show_bug.cgi?id=134894
1626
1627         Reviewed by Darin Adler.
1628
1629         * WebCore.exp.in: add symbol for canPlayFastReverse
1630         * html/HTMLMediaElement.cpp: Add two new accessors
1631         (WebCore::HTMLMediaElement::nextScanRate): possibly limit scanRate
1632         (WebCore::HTMLMediaElement::canPlayFastForward): added
1633         (WebCore::HTMLMediaElement::canPlayFastReverse): added
1634         * html/HTMLMediaElement.h: declare two new methods
1635         * platform/graphics/MediaPlayer.cpp: Plumb through two new accessors
1636         (WebCore::MediaPlayer::maxFastForwardRate): added
1637         (WebCore::MediaPlayer::minFastReverseRate): added
1638         * platform/graphics/MediaPlayer.h: Declare new methods
1639         * platform/graphics/MediaPlayerPrivate.h: Added two new methods.
1640         (WebCore::MediaPlayerPrivateInterface::maxFastForwardRate): added
1641         (WebCore::MediaPlayerPrivateInterface::minFastReverseRate): added
1642         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: member to cache ff/rw enabled state
1643         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1644         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): observe on item canPlayFastForward canPlayFastReverse
1645         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastForwardDidChange): added
1646         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange): added
1647         (WebCore::itemKVOProperties): observe canPlayFastForward canPlayFastRewind
1648         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): ditto
1649         * platform/ios/WebVideoFullscreenInterface.h: add new method
1650         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto
1651         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: ditto
1652         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): Set value on WebAVPlayerController.
1653         (-[WebAVPlayerController canScanBackward]): Deleted.
1654         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): Deleted.
1655         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1656         (WebVideoFullscreenModelMediaElement::updateForEventName): update canPlayFastReverse.
1657
1658 2014-07-18  Gavin Barraclough  <baraclough@apple.com>
1659
1660         HTMLMediaElement should registerWithDocument on iOS
1661         https://bugs.webkit.org/show_bug.cgi?id=135084
1662         <rdar://problem/17702531>
1663
1664         Reviewed by Andreas Kling.
1665
1666         Otherwise it won't know when the visibility changes!
1667
1668         * html/HTMLMediaElement.cpp:
1669         (WebCore::HTMLMediaElement::registerWithDocument):
1670         (WebCore::HTMLMediaElement::unregisterWithDocument):
1671
1672 2014-07-20  Jeremy Jones  <jeremyj@apple.com>
1673
1674         Decrease flicker when enter and exit fullscreen.
1675         https://bugs.webkit.org/show_bug.cgi?id=134919
1676
1677         Reviewed by Simon Fraser.
1678
1679         Put AVPlayerLayer in a container layer so moving it between inline and fullscreen
1680         is as easy as adding and removing it from a containter layer; no need to do a layout.
1681
1682         Make sure fullscreen layers are transparent before moving moving the AVPlayerLayer
1683         between inline and fullscreen so you don't briefly see the empty fullscreen layers.
1684
1685         * html/HTMLMediaElement.cpp:
1686         (WebCore::HTMLMediaElement::platformLayer): remove fullscreen special case.
1687         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): no need to recalc style
1688         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add inline container layer
1689         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
1690         add WebVideoContainerLayer to contain AVPlayerLayer and keep layout correct.
1691         (-[WebVideoContainerLayer setBounds:]): forward setbounds to set child frame.
1692         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): create the video container layer
1693         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): destroy the video container layer
1694         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): use container layer instead of video layer
1695         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): use transactions to prevent unwanted animation.
1696         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): ditto
1697         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1698         (PlatformCALayerMac::layerTypeForPlatformLayer): WebVideoContainerLayer is a kind of AVPlayerLayer
1699         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1700         (-[WebVideoFullscreenController didCleanupFullscreen]): remove video fullscreen layer first
1701         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1702         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): make background transparent during transition.
1703            dispatch_async to allow CATransaction to complete before calling didSetupFullscreen()
1704
1705 2014-07-20  Ryuan Choi  <ryuan.choi@samsung.com>
1706
1707         Move ExceptionCodeDescription.h into the files that actually need it
1708         https://bugs.webkit.org/show_bug.cgi?id=134968
1709
1710         Reviewed by Darin Adler.
1711
1712         No new tests because no functional changes.
1713
1714         * Modules/indexeddb/IDBDatabaseException.cpp:
1715         * Modules/webdatabase/SQLException.cpp:
1716         * bindings/js/JSDOMBinding.cpp:
1717         * bindings/objc/ExceptionHandlers.mm:
1718         * bindings/scripts/CodeGeneratorGObject.pm:
1719         (Generate):
1720         * dom/DOMCoreException.cpp:
1721         * dom/EventException.cpp:
1722         * dom/ExceptionBase.cpp:
1723         * dom/ExceptionCode.h:
1724         * dom/RangeException.cpp:
1725         * fileapi/FileException.cpp:
1726         * inspector/DOMEditor.cpp:
1727         * inspector/InspectorDOMAgent.cpp:
1728         * svg/SVGException.cpp:
1729         * xml/XMLHttpRequestException.cpp:
1730         * xml/XPathException.cpp:
1731
1732 2014-07-20  Dan Bernstein  <mitz@apple.com>
1733
1734         <rdar://problems/17742611> -[_WKActivatedElementInfo image] is often empty
1735         https://bugs.webkit.org/show_bug.cgi?id=135107
1736
1737         Reviewed by Sam Weinig.
1738
1739         Test: TestWebKitAPI/Tests/mac/RenderedImageFromDOMNode.mm
1740
1741         * page/FrameView.cpp:
1742         (WebCore::FrameView::paintContents): To work around http://webkit.org/b/135106, replace the
1743         paint root with its nearest ancestor that isn’t an inline with culled line boxes, if needed.
1744
1745 2014-07-20  Darin Adler  <darin@apple.com>
1746
1747         Crashes seen in wheel event handling
1748         https://bugs.webkit.org/show_bug.cgi?id=135102
1749
1750         Reviewed by Beth Dakin.
1751
1752         Speculative fix based on guesses about what could be crashing.
1753         The crash seems to be calling ref on an event target, and my guess is that this
1754         has something to do with latching.
1755
1756         * page/EventHandler.cpp:
1757         (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
1758         (WebCore::EventHandler::handleWheelEvent): Refactored a little and made some local
1759         variables use RefPtr instead of raw pointers. Also added some comments.
1760
1761         * page/EventHandler.h: Changed argument types to RefPtr.
1762
1763         * page/mac/EventHandlerMac.mm:
1764         (WebCore::EventHandler::platformPrepareForWheelEvents): Updated argument types.
1765         Also added a FIXME.
1766
1767 2014-07-20  Simon Fraser  <simon.fraser@apple.com>
1768
1769         Print layerIDs in GraphicsLayer dumps
1770         https://bugs.webkit.org/show_bug.cgi?id=135100
1771
1772         Reviewed by Darin Adler.
1773
1774         When calling showGraphicsLayerTree() from the debugger, it's useful to show
1775         layerIDs so they can be correlated with remote layer tree transactions. So
1776         when dumping with debug info, dump the primary layer ID.
1777
1778         * platform/graphics/GraphicsLayer.cpp:
1779         (WebCore::GraphicsLayer::dumpProperties):
1780
1781 2014-07-20  Eric Carlson  <eric.carlson@apple.com>
1782
1783         [iOS] ignore requests to set volume
1784         https://bugs.webkit.org/show_bug.cgi?id=135081
1785
1786         Applied post-review comments from Darin Adler.
1787
1788         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1789         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Don't include unreachable
1790             code on iOS.
1791
1792 2014-07-19  Mark Rowe  <mrowe@apple.com>
1793
1794         <https://webkit.org/b/135085> Ensure that make_names.pl generates the same result when run multiple times.
1795
1796         Perl 5.18 introduced hash randomization. This results in the iteration order of hashes being different
1797         from one run to the next. To ensure identical output we can iterate over the hash keys in sorted order.
1798
1799         Reviewed by Alexey Proskuryakov.
1800
1801         * bindings/scripts/StaticString.pm:
1802         (GenerateStrings):
1803         (GenerateStringAsserts):
1804         * dom/make_names.pl:
1805
1806 2014-07-19  Zan Dobersek  <zdobersek@igalia.com>
1807
1808         Document::unregisterNodeListforInvalidation() and Document::unregisterCollection() have incorrect assertions
1809         https://bugs.webkit.org/show_bug.cgi?id=134869
1810
1811         Reviewed by Darin Adler.
1812
1813         Both methods should assert that the relevant HashMap is either empty if invalidation originates
1814         from Document::invalidateNodeListAndCollectionCaches() or acutally contains the element that is
1815         being invalidated. In the first case the HashMap is empty because its entries were moved out in
1816         the Document::invalidateNodeListAndCollectionCaches().
1817
1818         This was exposed by r170995 (later rolled out in r170999) which introduced move constructor and
1819         move assignment operators for HashTable. The assertions in the titular methods won't be passing
1820         until r170995 relands.
1821
1822         * dom/Document.cpp:
1823         (WebCore::Document::unregisterNodeListForInvalidation):
1824
1825 2014-07-18  Eric Carlson  <eric.carlson@apple.com>
1826
1827         [iOS] ignore requests to set volume
1828         https://bugs.webkit.org/show_bug.cgi?id=135081
1829
1830         Reviewed by Jer Noble.
1831
1832         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1833         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Do nothing on iOS.
1834
1835 2014-07-18  Andy Estes  <aestes@apple.com>
1836
1837         [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
1838         https://bugs.webkit.org/show_bug.cgi?id=135072
1839         <rdar://problem/17528188>
1840
1841         Reviewed by David Kilzer.
1842
1843         No new tests. Content filtering is not testable from WebKit.
1844
1845         * WebCore.exp.in: Exported necessary ContentFilter symbols.
1846         * loader/DocumentLoader.cpp:
1847         (WebCore::DocumentLoader::finishedLoading): Called FrameLoaderClient::contentFilterDidBlockLoad().
1848         (WebCore::DocumentLoader::responseReceived): Created a new ContentFilter.
1849         (WebCore::DocumentLoader::dataReceived): Called FrameLoaderClient::contentFilterDidBlockLoad().
1850         (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Deleted.
1851         (WebCore::DocumentLoader::handleContentFilterRequest): Deleted.
1852         * loader/DocumentLoader.h:
1853         * loader/FrameLoaderClient.h:
1854         (WebCore::FrameLoaderClient::contentFilterDidBlockLoad):
1855         * loader/PolicyChecker.cpp:
1856         (WebCore::PolicyChecker::checkNavigationPolicy): Removed the check for unblock navigations, as this is now
1857         handled at the WebKit layer.
1858         * platform/ContentFilter.h: ContentFilter no longer needs to be RefCounted, so made various changes in order to
1859         make it compatible with unique_ptr.
1860         * platform/ios/ContentFilterIOS.mm:
1861         (WebCore::scheme): Changed from a public member function to a static inline free function.
1862         (WebCore::ContentFilter::handleUnblockRequestAndDispatchIfSuccessful): Renamed from requestUnblockAndDispatchIfSuccessful.
1863         * platform/mac/ContentFilterMac.mm:
1864         (WebCore::ContentFilter::ContentFilter): Added a default constructor for use during message decoding.
1865         (WebCore::ContentFilter::addData): Removed calls to ref() and deref(). These were never actually needed since
1866         we were dispatching the block synchronously.
1867         (WebCore::ContentFilter::finishedAddingData): Ditto.
1868         (WebCore::ContentFilter::encode): Encoded m_platformContentFilter to the NSKeyedArchiver if it conforms to NSSecureCoding.
1869         (WebCore::ContentFilter::decode): Decoded m_platformContentFilter from the NSKeyedUnarchiver if it conforms to NSSecureCoding.
1870         (WebCore::ContentFilter::create): Deleted.
1871
1872 2014-07-18  Simon Fraser  <simon.fraser@apple.com>
1873
1874         [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
1875         https://bugs.webkit.org/show_bug.cgi?id=135078
1876         <rdar://problem/17401823>
1877
1878         Reviewed by Tim Horton.
1879         
1880         When the UI-side scrolling tree receives a requested scroll position update, it scrolls
1881         the node (e.g. a frame) then traverses child nodes to update them, e.g. for fixed position.
1882         However, we would always use a viewport rect for the main document (from the scrolling tree),
1883         which is not appropriate for subframes. Subframes should just use their own visible
1884         rect to position fixed children.
1885
1886         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html
1887
1888         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1889         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1890
1891 2014-07-18  Beth Dakin  <bdakin@apple.com>
1892
1893         Fixed position elements are misplaced when a WK1 view has contentInsets set
1894         https://bugs.webkit.org/show_bug.cgi?id=135031
1895         -and corresponding-
1896         <rdar://problem/17682335>
1897
1898         Reviewed by Tim Horton.
1899
1900         [NSScrollView documentVisibleRect] includes content that is within the inset-area 
1901         of a view, but WebCore is interested in the content that is fully visible, so we 
1902         need to factor the inset sizes out of this rect.
1903
1904         Implement contract() to avoid the awkwardness of calling expand() with negative 
1905         values.
1906         * platform/graphics/IntSize.h:
1907         (WebCore::IntSize::contract):
1908
1909         Factor out insets
1910         * platform/mac/ScrollViewMac.mm:
1911         (WebCore::ScrollView::platformVisibleContentRect):
1912         (WebCore::ScrollView::platformVisibleContentSize):
1913
1914 2014-07-18  Tim Horton  <timothy_horton@apple.com>
1915
1916         Take navigation snapshots whenever the current back-forward item is going to change
1917         https://bugs.webkit.org/show_bug.cgi?id=135058
1918         <rdar://problem/17464515>
1919
1920         Reviewed by Dan Bernstein.
1921
1922         * loader/HistoryController.cpp:
1923         (WebCore::HistoryController::updateForCommit):
1924         (WebCore::HistoryController::recursiveUpdateForCommit):
1925         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
1926         (WebCore::HistoryController::createItem):
1927         Use setCurrentItem instead of duplicating the contents of it inside each of these functions.
1928
1929         (WebCore::HistoryController::setCurrentItem):
1930         (WebCore::HistoryController::replaceCurrentItem):
1931         When setting or replacing the current item, let the FrameLoaderClient know that we're going
1932         to change which history item is "current".
1933
1934         * loader/FrameLoaderClient.h:
1935         (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Added.
1936
1937 2014-07-18  Commit Queue  <commit-queue@webkit.org>
1938
1939         Unreviewed, rolling out r171207.
1940         https://bugs.webkit.org/show_bug.cgi?id=135056
1941
1942         Broke multiple tests on Yosemite (Requested by ap on #webkit).
1943
1944         Reverted changeset:
1945
1946         "Fixed position elements are misplaced when a WK1 view has
1947         contentInsets set"
1948         https://bugs.webkit.org/show_bug.cgi?id=135031
1949         http://trac.webkit.org/changeset/171207
1950
1951 2014-07-18  Commit Queue  <commit-queue@webkit.org>
1952
1953         Unreviewed, rolling out r171218.
1954         https://bugs.webkit.org/show_bug.cgi?id=135055
1955
1956         Made fast/dom/HTMLObjectElement/beforeload-set-text-
1957         crash.xhtml crash (Requested by ap on #webkit).
1958
1959         Reverted changeset:
1960
1961         "REGRESSION (r169105): Crash in selection"
1962         https://bugs.webkit.org/show_bug.cgi?id=134303
1963         http://trac.webkit.org/changeset/171218
1964
1965 2014-07-18  Radu Stavila  <stavila@adobe.com>
1966
1967         REGRESSION (r169105): Crash in selection
1968         https://bugs.webkit.org/show_bug.cgi?id=134303
1969
1970         Reviewed by Ryosuke Niwa.
1971
1972         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
1973         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
1974         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
1975         we get inconsistent data.
1976
1977         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
1978         method first iterates through all subtrees and performs the "clear" method and then starts all over again
1979         and performs the "apply" method.
1980
1981         Also, the selectionStart/End members in RenderView have been renamed to fix problems caused by the fact that
1982         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
1983
1984         Test: fast/regions/selection/crash-deselect.html
1985
1986         * WebCore.xcodeproj/project.pbxproj:
1987         * rendering/RenderBlock.cpp:
1988         (WebCore::RenderBlock::isSelectionRoot):
1989         * rendering/RenderSelectionInfo.h:
1990         * rendering/RenderView.cpp:
1991         (WebCore::RenderView::RenderView):
1992         (WebCore::RenderView::setSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
1993         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1994         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
1995         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
1996         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
1997         (WebCore::RenderView::getSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
1998         (WebCore::RenderView::setSubtreeSelection): Deleted.
1999         * rendering/RenderView.h:
2000         * rendering/SelectionSubtreeRoot.cpp:
2001         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
2002         * rendering/SelectionSubtreeRoot.h:
2003         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
2004
2005 2014-07-17  Jer Noble  <jer.noble@apple.com>
2006
2007         [MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what may have possibly been enqueued but undisplayed.
2008         https://bugs.webkit.org/show_bug.cgi?id=135039
2009
2010         Reviewed by Eric Carlson.
2011
2012         When a client calls removeCodedFrames(), we must re-enqueue those ranges if the removed samples overlap with
2013         enqueued but possibly un-displayed samples. Otherwise, replacement samples may lead to decode errors as those
2014         new samples dependencies are not met. But if we re-enqueue too frequently, this may cause subtle but noticible
2015         display timing glitches, so only re-enqueue when removeCodedFrames have a possiblity of removing enqueued, but
2016         not yet displayed samples.
2017
2018         * Modules/mediasource/SourceBuffer.cpp:
2019         (WebCore::SourceBuffer::removeCodedFrames):
2020
2021 2014-07-17  David Kilzer  <ddkilzer@apple.com>
2022
2023         SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
2024         <http://webkit.org/b/135006>
2025
2026         Reviewed by Darin Adler.
2027
2028         * Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
2029         WebCore.xcconfig.
2030         * Configurations/DebugRelease.xcconfig: Remove empty
2031         SECTORDER_FLAGS definition.
2032         * Configurations/WebCoreTestShim.xcconfig: Ditto.
2033         * Configurations/WebCoreTestSupport.xcconfig: Ditto.
2034         * Configurations/WebCore.xcconfig: Use $(CONFIGURATION) so
2035         SECTORDER_FLAGS is only set on Production builds.
2036
2037 2014-07-17  Zalan Bujtas  <zalan@apple.com>
2038
2039         Subpixel rendering: Embedded non-compositing rotate transform paints to wrong position.
2040         https://bugs.webkit.org/show_bug.cgi?id=135028
2041
2042         Reviewed by Simon Fraser.
2043
2044         CTM always translates to where the layer's renderer() is going to paint.
2045         It ensures that the pixel snapped renderer() always end up painting to (0, 0) which is
2046         required to be able to position properly on transformed context.
2047
2048         Test: fast/layers/hidpi-transform-on-child-content-is-mispositioned.html
2049
2050         * rendering/RenderLayer.cpp:
2051         (WebCore::RenderLayer::beginTransparencyLayers):
2052         (WebCore::RenderLayer::clipToRect):
2053         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2054         (WebCore::RenderLayer::paintBackgroundForFragments):
2055         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2056         (WebCore::RenderLayer::paintOutlineForFragments):
2057         (WebCore::RenderLayer::paintMaskForFragments):
2058         (WebCore::RenderLayer::paintOverflowControlsForFragments):
2059         (WebCore::RenderLayer::calculateClipRects):
2060         * rendering/RenderLayer.h:
2061
2062 2014-07-17  Beth Dakin  <bdakin@apple.com>
2063
2064         Fixed position elements are misplaced when a WK1 view has contentInsets set
2065         https://bugs.webkit.org/show_bug.cgi?id=135031
2066         -and corresponding-
2067         <rdar://problem/17682335>
2068
2069         Reviewed by Tim Horton.
2070
2071         [NSScrollView documentVisibleRect] is not the rect that we are looking for when 
2072         this function is called. WebCore is interested in the rect that does not include 
2073         content that is within the inset region.
2074
2075         Implement contract() to avoid the awkwardness of calling expand() with negative 
2076         values.
2077         * platform/graphics/IntSize.h:
2078         (WebCore::IntSize::contract):
2079
2080         Use _insetBounds instead of documentVisibleRect, and when it’s necessary to use 
2081         the frame’s dimensions, extract the inset from that size.
2082         * platform/mac/ScrollViewMac.mm:
2083         (WebCore::ScrollView::platformVisibleContentRect):
2084         (WebCore::ScrollView::platformVisibleContentSize):
2085
2086 2014-07-17  Enrica Casucci  <enrica@apple.com>
2087
2088         [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2089         https://bugs.webkit.org/show_bug.cgi?id=135023
2090         <rdar://problem/17617282>
2091
2092         Reviewed by Benjamin Poulain.
2093
2094         Adding some exports.
2095         
2096         * WebCore.exp.in:
2097
2098 2014-07-17  Timothy Hatcher  <timothy@apple.com>
2099
2100         Make console.profile record to the Timeline.
2101
2102         https://bugs.webkit.org/show_bug.cgi?id=134643
2103
2104         Reviewed by Joseph Pecoraro.
2105
2106         Passes existing profiler tests in fast/profiler.
2107
2108         * bindings/js/ScriptState.cpp:
2109         (WebCore::domWindowFromExecState):
2110         (WebCore::frameFromExecState):
2111         (WebCore::scriptExecutionContextFromExecState):
2112         (WebCore::mainWorldExecState):
2113         (WebCore::execStateFromNode):
2114         * bindings/js/ScriptState.h:
2115         * inspector/InspectorController.cpp:
2116         (WebCore::InspectorController::InspectorController):
2117         (WebCore::InspectorController::profilerEnabled):
2118         (WebCore::InspectorController::setProfilerEnabled):
2119         * inspector/InspectorController.h:
2120         * inspector/InspectorInstrumentation.cpp:
2121         (WebCore::InspectorInstrumentation::startProfilingImpl):
2122         (WebCore::InspectorInstrumentation::stopProfilingImpl):
2123         * inspector/InspectorTimelineAgent.cpp:
2124         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2125         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2126         (WebCore::InspectorTimelineAgent::start):
2127         (WebCore::InspectorTimelineAgent::stop):
2128         (WebCore::startProfiling):
2129         (WebCore::stopProfiling):
2130         (WebCore::InspectorTimelineAgent::startFromConsole):
2131         (WebCore::InspectorTimelineAgent::stopFromConsole):
2132         (WebCore::InspectorTimelineAgent::didWriteHTML):
2133         (WebCore::InspectorTimelineAgent::breakpointActionProbe):
2134         (WebCore::toProtocol):
2135         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2136         (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
2137         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2138         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2139         (WebCore::InspectorTimelineAgent::sendEvent):
2140         (WebCore::InspectorTimelineAgent::createRecordEntry):
2141         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2142         * inspector/InspectorTimelineAgent.h:
2143         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2144         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2145         * inspector/InstrumentingAgents.cpp:
2146         (WebCore::InstrumentingAgents::InstrumentingAgents):
2147         (WebCore::InstrumentingAgents::reset):
2148         * inspector/InstrumentingAgents.h:
2149         (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent):
2150         (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent):
2151         * inspector/TimelineRecordFactory.cpp:
2152         (WebCore::TimelineRecordFactory::createConsoleProfileData):
2153         * inspector/TimelineRecordFactory.h:
2154         * inspector/protocol/Timeline.json:
2155         * page/PageConsole.cpp:
2156         (WebCore::PageConsole::profileEnd):
2157
2158 2014-07-16  Sam Weinig  <sam@webkit.org>
2159
2160         Don't send geolocation permission requests when the page is not visible
2161         <rdar://problem/17208715>
2162         https://bugs.webkit.org/show_bug.cgi?id=134989
2163
2164         Reviewed by Darin Adler.
2165
2166         Instead of eagerly requesting geolocation permission for pages that aren't visible,
2167         store a set of pending requests, and send them only once the page has become visible.
2168
2169         * Modules/geolocation/GeolocationController.cpp:
2170         (WebCore::GeolocationController::GeolocationController):
2171         (WebCore::GeolocationController::~GeolocationController):
2172         (WebCore::GeolocationController::requestPermission):
2173         (WebCore::GeolocationController::cancelPermissionRequest):
2174         (WebCore::GeolocationController::viewStateDidChange):
2175         (WebCore::provideGeolocationTo):
2176         * Modules/geolocation/GeolocationController.h:
2177         Store pending requests to be fired once the page is visible.
2178
2179         * WebCore.xcodeproj/project.pbxproj:
2180         Add ViewStateChangeObserver.h
2181
2182         * page/Page.cpp:
2183         (WebCore::Page::addViewStateChangeObserver):
2184         (WebCore::Page::removeViewStateChangeObserver):
2185         (WebCore::Page::setViewState):
2186         * page/Page.h:
2187         Add a set of registered view state observers, and notify them when the
2188         view state changes.
2189
2190         * page/ViewStateChangeObserver.h: Added.
2191         (WebCore::ViewStateChangeObserver::~ViewStateChangeObserver):
2192         Add an observer that can register with the page for view state changes.
2193
2194 2014-07-17  Jer Noble  <jer.noble@apple.com>
2195
2196         Enable legacy fullscreen API in media controls
2197         https://bugs.webkit.org/show_bug.cgi?id=134985
2198
2199         Reviewed by Eric Carlson.
2200
2201         Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
2202         with <video> elements by using the legacy, video-element-specific fullscreen APIs in
2203         the <video> media controls.
2204
2205         * Modules/mediacontrols/mediaControlsApple.js:
2206         (Controller):
2207         (Controller.prototype.handleReadyStateChange):
2208         (Controller.prototype.isFullScreen):
2209         (Controller.prototype.handlePlayButtonClicked):
2210         (Controller.prototype.updateFullscreenButton):
2211         (Controller.prototype.handleFullscreenButtonClicked):
2212
2213 2014-07-17  Vineet Chaudhary  <code.vineet@gmail.com>
2214
2215         [GObject] StrictTypeChecking extended attribute fails for methods with sequence<T>.
2216         https://bugs.webkit.org/show_bug.cgi?id=121698
2217
2218         Reviewed by Antonio Gomes.
2219
2220         GodeGenerator was including wrong heeaders as WebKitDOMlong[] for methods with
2221         array parameters and StrictTypeChecking extended attribute.
2222         No new tests. TestObj.idl covers the tests.
2223
2224         * bindings/scripts/CodeGenerator.pm:
2225         (GetArrayOrSequenceType):
2226         * bindings/scripts/CodeGeneratorGObject.pm:
2227         (GenerateFunction):
2228         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2229         (webkit_dom_test_obj_strict_function_with_array):
2230         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2231         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
2232         (webkit_dom_test_typedefs_func):
2233         (webkit_dom_test_typedefs_nullable_array_arg):
2234         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2235         * bindings/scripts/test/TestObj.idl:
2236
2237 2014-07-17  Yusuke Suzuki  <utatane.tea@gmail.com>
2238
2239         CSS JIT: Clean up return path
2240         https://bugs.webkit.org/show_bug.cgi?id=135011
2241
2242         Reviewed by Benjamin Poulain.
2243
2244         Clean up the existing CSS JIT return path before adding new early return path
2245         for pseudo elements.
2246
2247         * cssjit/SelectorCompiler.cpp:
2248         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2249         * cssjit/StackAllocator.h:
2250         (WebCore::StackAllocator::StackReference::StackReference):
2251         (WebCore::StackAllocator::StackReference::isValid):
2252         (WebCore::StackAllocator::popAndDiscard): Deleted.
2253
2254 2014-07-16  Zalan Bujtas  <zalan@apple.com>
2255
2256         Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
2257         https://bugs.webkit.org/show_bug.cgi?id=134950
2258         <rdar://problem/17617994>
2259
2260         Reviewed by Simon Fraser.
2261
2262         The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
2263         from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
2264         It puts us back to the correct coordinating system for intersecting with renderers.
2265
2266         Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html
2267
2268         * rendering/RenderLayer.cpp:
2269         (WebCore::RenderLayer::beginTransparencyLayers):
2270         (WebCore::RenderLayer::clipToRect):
2271
2272 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
2273
2274         Fix a typo noticed by Darin.
2275         
2276         * rendering/RenderBox.cpp:
2277         (WebCore::shouldApplyContainersClipAndOffset):
2278         (WebCore::RenderBox::computeRectForRepaint):
2279         (WebCore::shouldAppyContainersClipAndOffset): Deleted.
2280
2281 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
2282
2283         Improve showTree() logging
2284         https://bugs.webkit.org/show_bug.cgi?id=134997
2285
2286         Reviewed by Tim Horton.
2287
2288         Have the debug showTree(), which dumps the Node/Element tree, show which nodes need
2289         style recalc, and print element renderers.
2290
2291         * dom/Node.cpp:
2292         (WebCore::Node::showNode):
2293
2294 2014-07-16  Simon Fraser  <simon.fraser@apple.com>
2295
2296         [iOS] Expose the points on WebEventRegion
2297         https://bugs.webkit.org/show_bug.cgi?id=134978
2298
2299         Reviewed by Tim Horton.
2300
2301         Expose WebEventRegion's points so that UIKit can get at them.
2302
2303         * page/ios/WebEventRegion.h:
2304         * page/ios/WebEventRegion.mm:
2305         (-[WebEventRegion p1]):
2306         (-[WebEventRegion p2]):
2307         (-[WebEventRegion p3]):
2308         (-[WebEventRegion p4]):
2309
2310 2014-07-16  Brady Eidson  <beidson@apple.com>
2311
2312         Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
2313         <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
2314
2315         Reviewed by Dan Bernstein.
2316
2317         Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
2318         * UIProcess/API/Cocoa/WKProcessPool.mm:
2319         (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
2320         (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
2321         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2322
2323         Add a big shiny comment in a few key places:
2324         * DatabaseProcess/DatabaseProcess.cpp:
2325         (WebKit::DatabaseProcess::initializeDatabaseProcess):
2326         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2327         (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
2328         * UIProcess/WebContext.cpp:
2329         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
2330         (WebKit::WebContext::ensureDatabaseProcess):
2331
2332 2014-07-16  Roger Fong  <roger_fong@apple.com>
2333
2334         Captions container should not clip content.
2335         https://bugs.webkit.org/show_bug.cgi?id=134840.
2336         <rdar://problem/14553608>.
2337
2338         Reviewed by Simon Fraser.
2339
2340         Tests: media/track/track-in-band-subtitles-too-large.html
2341                media/track/track-long-word-container-sizing.html
2342
2343         * Modules/mediacontrols/mediaControlsApple.css:
2344         (video::-webkit-media-text-track-container):
2345         Set word break property of WebCTT cues to normal to make it consistent with in-band cues.
2346         * html/track/TextTrackCueGeneric.cpp:
2347         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
2348         Set -webkit-min-content on min-width/min-height property of the text track display.
2349         * html/track/VTTCue.cpp:
2350         (WebCore::VTTCueBox::applyCSSProperties):
2351         Do the same for WebVTT cues.
2352
2353 2014-07-16  Eric Carlson  <eric.carlson@apple.com>
2354
2355         [Mac] replace AVPlayerItem on the main thread
2356         https://bugs.webkit.org/show_bug.cgi?id=134983
2357
2358         Reviewed by Jer Noble.
2359
2360         No new tests, this fixes a problem with a thread configuration not present in the
2361         test environment.
2362
2363         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2364         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2365         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem): New, when called off of 
2366             the main thread, dispatch to the main thread before setting AVPlayerItem.
2367         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setAVPlayerItem.
2368         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
2369         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Ditto.
2370
2371 2014-07-16  Jer Noble  <jer.noble@apple.com>
2372
2373         [MSE] http/tests/media/media-source/mediasource-buffered.html is flakey
2374         https://bugs.webkit.org/show_bug.cgi?id=134949
2375
2376         Reviewed by Eric Carlson.
2377
2378         Depending on which SourceBuffer is successfully parsed first, the order of activeSourceBuffers
2379         may change from run to run, breaking the http/tests/media/media-source/mediasource-buffered.html
2380         test. Make the order of activeSourceBuffers the same as (a subset of) sourceBuffers, by replacing
2381         calls to activeSourceBuffers->add() and with a new call to regenerateActiveSourceBuffers(), which
2382         swaps the contents of the SourceBufferList with a new, ordered Vector.
2383
2384         * Modules/mediasource/MediaSource.cpp:
2385         (WebCore::MediaSource::addSourceBuffer):
2386         (WebCore::MediaSource::sourceBufferDidChangeAcitveState):
2387         (WebCore::MediaSource::regenerateActiveSourceBuffers):
2388         * Modules/mediasource/MediaSource.h:
2389         * Modules/mediasource/SourceBufferList.cpp:
2390         (WebCore::SourceBufferList::swap):
2391         * Modules/mediasource/SourceBufferList.h:
2392
2393 2014-07-16  Mike West  <mkwst@chromium.org>
2394
2395         CSP: Drop 'script-nonce' directive.
2396         https://bugs.webkit.org/show_bug.cgi?id=134926
2397
2398         Reviewed by Darin Adler.
2399
2400         This patch drops the outdated 'script-nonce' Content Security
2401         Policy directive. It was removed from the spec, and replaced in
2402         CSP2 with a new 'script-src' syntax. We should implement that
2403         instead.
2404
2405         Until then, removing the outdated syntax will ensure that no one
2406         ends up relying on it in WebKit's implementation.
2407
2408         This should have limited web-visible impact, as the feature is
2409         behind the CSP_NEXT flag, which is not enabled by default.
2410
2411         * dom/ScriptElement.cpp:
2412         (WebCore::ScriptElement::requestScript):
2413         (WebCore::ScriptElement::executeScript):
2414         * page/ContentSecurityPolicy.cpp:
2415         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
2416         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
2417         (WebCore::CSPDirectiveList::addDirective):
2418         (WebCore::NonceDirective::NonceDirective): Deleted.
2419         (WebCore::NonceDirective::allows): Deleted.
2420         (WebCore::NonceDirective::parse): Deleted.
2421         (WebCore::CSPDirectiveList::checkNonce): Deleted.
2422         (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
2423         (WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
2424         (WebCore::isAllowedByAllWithNonce): Deleted.
2425         (WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
2426         (WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
2427         * page/ContentSecurityPolicy.h:
2428
2429 2014-07-16  Jer Noble  <jer.noble@apple.com>
2430
2431         REGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRunningChanged()
2432         https://bugs.webkit.org/show_bug.cgi?id=134986
2433
2434         Reviewed by Eric Carlson.
2435
2436         Add a WeakPtrFactory to AudioHardwareListenerMac, so that if CoreAudio calls our block after
2437         being unregistered, we can bail early instead of calling into a deleted object.
2438
2439         * platform/audio/mac/AudioHardwareListenerMac.cpp:
2440         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
2441         * platform/audio/mac/AudioHardwareListenerMac.h:
2442
2443 2014-07-16  Jer Noble  <jer.noble@apple.com>
2444
2445         [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
2446         https://bugs.webkit.org/show_bug.cgi?id=134941
2447
2448         Reviewed by Eric Carlson.
2449
2450         Only do our modified-order change of the readyState if the error parameter is empty,
2451         as that's the only case where a duration change will cause an inadvertant readyState
2452         change.
2453
2454         * Modules/mediasource/MediaSource.cpp:
2455         (WebCore::MediaSource::streamEndedWithError):
2456
2457 2014-07-16  Alexey Proskuryakov  <ap@apple.com>
2458
2459         Remove svn:executable property erroneously added in <http://trac.webkit.org/changeset/171144> somehow.
2460
2461         * ChangeLog: Removed property svn:executable.
2462         * svg/SVGSVGElement.h: Removed property svn:executable.
2463         * svg/animation/SVGSMILElement.h: Removed property svn:executable.
2464
2465 2014-07-16  Daniel Bates  <dabates@apple.com>
2466
2467         Substitute CGRectZero for NSZeroRect in -[DOMNode hrefFrame].
2468
2469         Rubber-stamped by Zalan Bujtas.
2470
2471         The method -[DOMNode hrefFrame] returns a CGRect. So, when we don't have a renderer
2472         we should return CGRectZero instead of a NSZeroRect.
2473
2474         * bindings/objc/DOM.mm:
2475         (-[DOMNode hrefFrame]): Also, fix up some code style issues.
2476
2477 2014-07-16  Jeongeun Kim  <je_julie.kim@samsung.com>
2478
2479         mutable pointers from const methods, timeContainer().
2480         https://bugs.webkit.org/show_bug.cgi?id=134757
2481
2482         Reviewed by Alexey Proskuryakov.
2483
2484         Avoid return mutable pointers from const methods.
2485         No new tests, no behavior change.
2486
2487         * svg/SVGSVGElement.h:
2488         * svg/animation/SVGSMILElement.h:
2489         (WebCore::SVGSMILElement::timeContainer):
2490
2491 2014-07-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2492
2493         CSS: Generalize CSS First Letter treatment
2494         https://bugs.webkit.org/show_bug.cgi?id=134936
2495
2496         Reviewed by Benjamin Poulain.
2497
2498         first-letter pseudo element rule is handled differently from the other rules
2499         such as first-line. This patch removes this special handling in SelectorChecker
2500         and handles it in RulesFeatureSet.
2501
2502         * css/RuleFeature.cpp:
2503         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
2504         (WebCore::RuleFeatureSet::add):
2505         (WebCore::RuleFeatureSet::clear):
2506         * css/RuleFeature.h:
2507         (WebCore::RuleFeatureSet::RuleFeatureSet):
2508         * css/SelectorChecker.cpp:
2509         (WebCore::SelectorChecker::matchRecursively):
2510         * css/StyleResolver.h:
2511         (WebCore::StyleResolver::usesFirstLetterRules):
2512         * dom/DocumentStyleSheetCollection.cpp:
2513         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
2514         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
2515         * dom/DocumentStyleSheetCollection.h:
2516         (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules): Deleted.
2517
2518 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
2519
2520         Fix non-iOS builds.
2521
2522         * rendering/RenderBox.cpp:
2523         (WebCore::shouldAppyContainersClipAndOffset):
2524
2525 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
2526
2527         [iOS] Fix touches inside accelerated overflow:scroll
2528         https://bugs.webkit.org/show_bug.cgi?id=134961
2529         <rdar://problem/16088789>
2530
2531         Reviewed by Benjamin Poulain.
2532
2533         When individual elements inside an overflow:scroll with -webkit-overflow-scrolling: touch
2534         had touch event listeners, we would fail to take the scroll offset into account when
2535         building the touch event region, causing touches on those elements to fail after scrolling.
2536         
2537         Touch event region building uses RenderObject::absoluteClippedOverflowRect(), and that
2538         code path tries to fix up repaint rects to work correctly in composited overflow:scroll.
2539         However, that broke the touch region computation.
2540         
2541         Fix by only ignoring the scroll offset for calls to computeRectForRepaint() which
2542         have a non-null repaintContainer (which indicates that we're doing a repaint in the
2543         compositing layer), and for which the repaintContainer is the containing block
2544         which is using composited scrolling. This restores correct behavior to the event region
2545         code which always calls this with a null repaintContainer.
2546
2547         * rendering/RenderBox.cpp:
2548         (WebCore::shouldAppyContainersClipAndOffset):
2549         (WebCore::RenderBox::computeRectForRepaint):
2550
2551 2014-07-15  Simon Fraser  <simon.fraser@apple.com>
2552
2553         [iOS] Fix issues drawing subsampled image elements and CSS images
2554         https://bugs.webkit.org/show_bug.cgi?id=134944
2555         <rdar://problem/17634095>
2556
2557         Reviewed by Dean Jackson.
2558
2559         After r170675 it is important for BitmapImage::draw() to be given a srcRect computed
2560         using the original size of the image, not the subsampled size.
2561         
2562         So fix various code paths that end up in image drawing to use the originalSize(),
2563         which requires giving Image a virtual function that just returns size(), and hence has
2564         a FloatSize return value.
2565         
2566         Tested by setting a very low subsampling threshold and browsing various sites.
2567         
2568         A better longterm fix will happen via bug 134916.
2569
2570         * platform/graphics/BitmapImage.cpp:
2571         (WebCore::BitmapImage::originalSize):
2572         * platform/graphics/BitmapImage.h:
2573         * platform/graphics/GraphicsContext.cpp:
2574         (WebCore::GraphicsContext::drawImage):
2575         * platform/graphics/Image.cpp:
2576         (WebCore::Image::drawTiled):
2577         (WebCore::Image::computeIntrinsicDimensions):
2578         * platform/graphics/Image.h:
2579         (WebCore::Image::originalSize):
2580         * platform/graphics/cg/BitmapImageCG.cpp:
2581         (WebCore::BitmapImage::BitmapImage): Just use m_size for initializing the other members.
2582         (WebCore::BitmapImage::draw):
2583         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2584         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2585         * platform/graphics/cg/ImageCG.cpp:
2586         (WebCore::Image::drawPattern):
2587
2588 2014-07-15  Brent Fulgham  <bfulgham@apple.com>
2589
2590         [Win] Unreviewed build fix after r171069.
2591
2592         Add missing AudioHardwareListener implementation on Windows.
2593
2594         * WebCore.vcxproj/WebCore.vcxproj:
2595         * WebCore.vcxproj/WebCore.vcxproj.filters:
2596
2597 2014-07-15  Antti Koivisto  <antti@apple.com>
2598
2599         REGRESSION (r155957): Invalid cast in WebCore::RenderNamedFlowThread::getRanges
2600         https://bugs.webkit.org/show_bug.cgi?id=134888
2601
2602         Reviewed by Mihnea Ovidenie.
2603
2604         Test: fast/regions/flowthread-getranges-box-cast.html
2605
2606         * rendering/RenderNamedFlowThread.cpp:
2607         (WebCore::RenderNamedFlowThread::getRanges): Test the type before casting.
2608
2609 2014-07-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2610
2611         [GTK] Update GObject DOM bindings symbols file after r171014.
2612         https://bugs.webkit.org/show_bug.cgi?id=134907
2613
2614         Reviewed by Philippe Normand.
2615
2616         * bindings/gobject/webkitdom.symbols: Update to the current API.
2617
2618 2014-07-15  Manuel Rego Casasnovas  <rego@igalia.com>
2619
2620         Unreviwed fix wrong indentation from r171082.
2621
2622         * rendering/RenderGrid.cpp:
2623         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2624
2625 2014-07-14  Zalan Bujtas  <zalan@apple.com>
2626
2627         Subpixel rendering: Zero sized compositing container's content positioned off by one device pixel.
2628         https://bugs.webkit.org/show_bug.cgi?id=134903
2629
2630         Reviewed by Simon Fraser.
2631
2632         The compositing layer boundaries are calculated using its renderer()'s and the renderer()'s
2633         descendants' bounds. However when the renderer() is zero sized, its bounds are omitted.
2634         In such cases, when the child content has offset from the renderer(), the subpixel adjustment
2635         of the compositing layer becomes negative (-meaning that the compositing layer is to the right/bottom
2636         direction from its renderer()). Remove fabs() to be able to express such direction.
2637
2638         Test: compositing/hidpi-compositing-layer-with-zero-sized-container.html
2639
2640         * rendering/RenderLayerBacking.cpp:
2641         (WebCore::RenderLayerBacking::updateGeometry):
2642
2643 2014-07-14  Jeremy Jones  <jeremyj@apple.com>
2644
2645         Fix crash on WebVideoFullscreenManagerProxy construction.
2646         https://bugs.webkit.org/show_bug.cgi?id=134909
2647
2648         Unreviewed fix crash from r171089
2649
2650         Remove unnecessary dispatch to main queue since it can happen during construction.
2651
2652         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2653         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): remove dispatch_async
2654
2655 2014-07-14  Jeremy Jones  <jeremyj@apple.com>
2656
2657         WebVideoFullscreenInterfaceAVKit should only call the UI from main thread.
2658         https://bugs.webkit.org/show_bug.cgi?id=134890
2659
2660         Reviewed by Eric Carlson.
2661
2662         dispatch_async to the main thread before setting properties that would affect the UI.
2663
2664         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2665         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): wrap in call to dispatch_async
2666         (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
2667         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
2668         (WebVideoFullscreenInterfaceAVKit::setRate): ditto
2669         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
2670         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
2671         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
2672         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
2673         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
2674
2675 2014-07-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2676
2677         Fix the !ENABLE(FILTERS) && !ENABLE(CSS_FILTERS) build after r167497
2678         https://bugs.webkit.org/show_bug.cgi?id=134679
2679
2680         Reviewed by Darin Adler.
2681
2682         * html/ImageData.cpp:
2683         * platform/graphics/cairo/ImageBufferCairo.cpp:
2684
2685 2014-07-14  Manuel Rego Casasnovas  <rego@igalia.com>
2686
2687         [CSS Grid Layout] Support sparse in auto-placement algorithm
2688         https://bugs.webkit.org/show_bug.cgi?id=134544
2689
2690         Reviewed by Sergio Villar Senin.
2691
2692         This patch implements sparse mode for auto-placement algorithm, which is
2693         the default mode in the new grid-auto-flow syntax. It keeps track of the
2694         auto-placement cursor in
2695         RenderGrid::placeAutoMajorAxisItemsOnGrid() and updates it accordingly
2696         when auto-positioned items are placed.
2697         If we're in dense mode it resets the cursor after each item (which keeps
2698         the old behavior that was using dense mode by default).
2699
2700         GridIterator has been adapted to look for empty areas from a given
2701         position in both directions.
2702
2703         Test: fast/css-grid-layout/grid-auto-flow-sparse.html
2704
2705         * rendering/RenderGrid.cpp:
2706         (WebCore::RenderGrid::GridIterator::GridIterator): Modify constructor to
2707         add an optional argument for the varying index. This allows to look for
2708         empty areas in both axis.
2709         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Defined the
2710         auto-placement cursor and rested after each item if we're in dense mode.
2711         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Use auto-placement
2712         cursor to look for empty areas from the last auto-positioned item
2713         placed.
2714         * rendering/RenderGrid.h: Modify placeAutoMajorAxisItemOnGrid() header
2715         to receive the auto-placement cursor.
2716
2717 2014-07-14  Brent Fulgham  <bfulgham@apple.com>
2718
2719         [iOS] Some videos play as inline audio-only content
2720         https://bugs.webkit.org/show_bug.cgi?id=134898.
2721         <rdar://problem/17629379>
2722
2723         Reviewed by Eric Carlson.
2724
2725         Add a new 'presentationType' accessor that indicates if the media
2726         element is playing in 'audio' mode. This can happen if a video
2727         element plays an HLS stream that starts off in audio-only mode.
2728
2729         * html/HTMLMediaElement.cpp:
2730         (WebCore::HTMLMediaElement::presentationType): Added.
2731         * html/HTMLMediaElement.h:
2732         * platform/audio/MediaSession.cpp:
2733         (WebCore::MediaSession::presentationType): Added.
2734         * platform/audio/MediaSession.h:
2735         * platform/audio/MediaSessionManager.cpp: 
2736         (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
2737         Use the presentationType, rather than the mediaType to control
2738         inline playback behavior.
2739         * platform/audio/ios/AudioDestinationIOS.h:
2740         (WebCore::AudioDestinationMac::presentationType): Add presentationType.
2741         * platform/audio/mac/AudioDestinationMac.h:
2742         (WebCore::AudioDestinationMac::presentationType): Ditto.
2743
2744 2014-07-14  Bear Travis  <betravis@adobe.com>
2745
2746         [Feature Queries] Enable Feature Queries on Mac
2747         https://bugs.webkit.org/show_bug.cgi?id=134404
2748
2749         Reviewed by Antti Koivisto.
2750
2751         Enable Feature Queries on Mac and resume running the
2752         feature tests.
2753
2754         * Configurations/FeatureDefines.xcconfig: Turn on
2755         ENABLE_CSS3_CONDITIONAL_RULES.
2756
2757 2014-07-11  David Hyatt  <hyatt@apple.com>
2758
2759         <rdar://problem/17305458> Cannot interact with video controls in ePubs
2760         Bug 134836 - [New Multicolumn] Crawl to check for compositing between us and the enclosingPaginationLayer
2761         https://bugs.webkit.org/show_bug.cgi?id=134836
2762
2763         Reviewed by Dean Jackson.
2764
2765         The paginatedAndComposited bit being set in updateLayerPositions just didn't work, since compositing states
2766         can change without triggering that function. This patch just gets rid of the bit and does a crawl every time
2767         to check. This ensures that changes in compositing states don't necessitate any changes in pagination,
2768         since the lookup will always check the current compositing state.
2769         
2770         The new function that does this check is hasCompositedLayerInEnclosingPaginationChain.
2771         
2772         I have been unable to reproduce this issue, and this is therefore a purely speculative fix. I have no test
2773         case to provide because of this.
2774
2775         * rendering/RenderLayer.cpp:
2776         (WebCore::RenderLayer::RenderLayer):
2777         (WebCore::RenderLayer::updateLayerPositions):
2778         (WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
2779         (WebCore::RenderLayer::updatePagination):
2780         * rendering/RenderLayer.h:
2781
2782 2014-07-14  Zalan Bujtas  <zalan@apple.com>
2783
2784         Move composite bounds calculation to RenderLayerBacking.
2785         https://bugs.webkit.org/show_bug.cgi?id=134864
2786
2787         Reviewed by Darin Adler.
2788
2789         No change in functionality.
2790
2791         * rendering/RenderLayerBacking.cpp:
2792         (WebCore::RenderLayerBacking::updateCompositedBounds):
2793         * rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
2794         to the RenderLayer.
2795         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
2796         * rendering/RenderLayerCompositor.h:
2797
2798 2014-07-14  Tim Horton  <timothy_horton@apple.com>
2799
2800         Fix the build.
2801
2802         * platform/audio/MediaSessionManager.h:
2803
2804 2014-07-14  Eric Carlson  <eric.carlson@apple.com>
2805
2806         [Mac] don't enable low power audio mode on external output devices
2807         https://bugs.webkit.org/show_bug.cgi?id=134877
2808
2809         Reviewed by Sam Weinig.
2810
2811         No new tests, this deals with changes to the audio hardware at runtime.
2812
2813         * WebCore.xcodeproj/project.pbxproj: Remove AudioSessionListener.h.
2814         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2815
2816         * platform/audio/AudioHardwareListener.cpp:
2817         (WebCore::AudioHardwareListener::AudioHardwareListener): Initialize m_outputDeviceSupportsLowPowerMode
2818             to true on iOS.
2819         * platform/audio/AudioHardwareListener.h:
2820         (WebCore::AudioHardwareListener::outputDeviceSupportsLowPowerMode): New accessor.
2821         (WebCore::AudioHardwareListener::setHardwareActivity): New setter for derived classes.
2822         (WebCore::AudioHardwareListener::setOutputDeviceSupportsLowPowerMode): Ditto.
2823
2824         Remove AudioSessionListener interface, it wasn't being used.
2825         * platform/audio/AudioSession.cpp:
2826         (WebCore::AudioSession::addListener): Deleted.
2827         (WebCore::AudioSession::removeListener): Deleted.
2828         (WebCore::AudioSession::beganAudioInterruption): Deleted.
2829         (WebCore::AudioSession::endedAudioInterruption): Deleted.
2830         * platform/audio/AudioSession.h:
2831         * platform/audio/AudioSessionListener.h: Removed.
2832
2833         * platform/audio/MediaSessionManager.cpp:
2834         (WebCore::MediaSessionManager::addSession): Allocate the AudioHardwareListener if necessary.
2835         (WebCore::MediaSessionManager::removeSession): Free the AudioHardwareListener if necessary.
2836         (WebCore::MediaSessionManager::audioOutputDeviceChanged): AudioHardwareListener client interface
2837             called when the output device changes, call updateSessionState to make sure we are using
2838             the correct buffer size.
2839         * platform/audio/MediaSessionManager.h:
2840
2841         * platform/audio/ios/AudioDestinationIOS.h:
2842         * platform/audio/ios/AudioSessionIOS.mm:
2843         (WebCore::AudioSessionPrivate::AudioSessionPrivate): Drive-by cleanup, remove ObjC helper object
2844             that was used to listen for OS notifications, it is no longer used.
2845         (SOFT_LINK_POINTER): Deleted.
2846         (-[WebAudioSessionHelper initWithCallback:]): Deleted.
2847         (-[WebAudioSessionHelper dealloc]): Deleted.
2848         (-[WebAudioSessionHelper interruption:]): Deleted.
2849
2850         * platform/audio/mac/AudioHardwareListenerMac.cpp:
2851         (WebCore::currentDeviceSupportsLowPowerBufferSize): New, return true only if using build-in 
2852             transport device.
2853         (WebCore::processIsRunningPropertyDescriptor): Return reference to static AudioObjectPropertyAddress
2854             for kAudioHardwarePropertyProcessIsRunning instead of declaring one in every method
2855             that needs one.
2856         (WebCore::outputDevicePropertyDescriptor): Return reference to static AudioObjectPropertyAddress
2857             for kAudioHardwarePropertyDefaultOutputDevice.
2858         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac): Restructure and add audio object
2859             listener for default output device.
2860         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac): *Remove* listener audio object
2861             property listener instead of *Adding* a new one. Remove new listener.
2862         (WebCore::AudioHardwareListenerMac::propertyChanged): Enumerate the properties that changed,
2863             call appropriate method.
2864         (WebCore::AudioHardwareListenerMac::processIsRunningChanged): Renamed from setHardwareActive, 
2865             cleanup.
2866         (WebCore::AudioHardwareListenerMac::outputDeviceChanged): New, call client.audioHardwareOutputDeviceChanged.
2867         (WebCore::AudioHardwareListenerMac::setHardwareActive): Deleted, renamed processIsRunningChanged.
2868         * platform/audio/mac/AudioHardwareListenerMac.h:
2869
2870         * platform/audio/mac/MediaSessionManagerMac.cpp:
2871         (MediaSessionManager::updateSessionState): Only set the output buffer size to 4K when hardware
2872             supports it.
2873
2874 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
2875
2876         Remove SelectorCheckerFastPath from the style resolution algorithm
2877         https://bugs.webkit.org/show_bug.cgi?id=134866
2878
2879         Reviewed by Antti Koivisto.
2880
2881         SelectorCheckerFastPath is now pure overhead because it can almost never match
2882         if the CSS JIT was unable to compile.
2883
2884         * css/ElementRuleCollector.cpp:
2885         (WebCore::ElementRuleCollector::ruleMatches):
2886         The "pre-filter" behind fastCheckableSelector had two parts:
2887         1) Filtering the pseudoID.
2888         2) Filtering on the rule hash.
2889
2890         The first part has been generalized (RuleDatacanMatchPseudoElement())
2891         and moved to collectMatchingRulesForList(). 
2892
2893         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2894         * css/RuleSet.cpp:
2895         (WebCore::selectorCanMatchPseudoElement):
2896         (WebCore::RuleData::RuleData):
2897         (WebCore::RuleSet::addRegionRule):
2898         (WebCore::RuleSet::addRulesFromSheet):
2899         * css/RuleSet.h:
2900         (WebCore::RuleData::canMatchPseudoElement):
2901         (WebCore::RuleData::hasFastCheckableSelector): Deleted.
2902         * css/StyleResolver.cpp:
2903
2904 2014-07-13  Benjamin Poulain  <benjamin@webkit.org>
2905
2906         Remove an useless check from SelectorChecker
2907         https://bugs.webkit.org/show_bug.cgi?id=134868
2908
2909         Reviewed by Darin Adler.
2910
2911         * css/SelectorChecker.cpp:
2912         (WebCore::SelectorChecker::matchRecursively):
2913         The condition of this if() branch can never be met for the mode "QueryingRules".
2914
2915         The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
2916         a pseudo element was matched prior to the current context/simple selector.
2917         This cannot happen with QueryingRules, since we never match pseudo elements for
2918         SelectorQuery.
2919
2920 2014-07-12  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2921
2922         Elements with rendering disabled due to dimensions should not contribute to parent bounding box
2923         https://bugs.webkit.org/show_bug.cgi?id=134184
2924
2925         Reviewed by Dirk Schulze.
2926
2927         SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
2928         Examples of elements with rendering disabled:
2929         - basic shape with width <= 0 or height <= 0
2930         - path with no path data (d attribute missing or empty)
2931         - polyline or polygon element with no point data (points attribute missing or empty)
2932
2933         To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
2934         This is used to determine if an element is included when creating the union of child bounding boxes
2935         in a container element.
2936
2937         Tests: svg/custom/GetBBox-path-nodata.html
2938                svg/custom/GetBBox-polygon-nodata.html
2939                svg/custom/GetBBox-polyline-nodata.html
2940                svg/custom/getBBox-container-hiddenchild.html
2941
2942         * rendering/svg/RenderSVGEllipse.cpp:
2943         (WebCore::RenderSVGEllipse::isRenderingDisabled):
2944         New method added. Checks bounding box to determine if rendering is disabled.
2945         * rendering/svg/RenderSVGEllipse.h:
2946         * rendering/svg/RenderSVGPath.cpp:
2947         (WebCore::RenderSVGPath::isRenderingDisabled):
2948         New method added. Checks bounding box to determine if rendering is disabled.
2949         * rendering/svg/RenderSVGPath.h:
2950         * rendering/svg/RenderSVGRect.cpp:
2951         (WebCore::RenderSVGRect::isRenderingDisabled):
2952         New method added. Checks bounding box to determine if rendering is disabled.
2953         * rendering/svg/RenderSVGRect.h:
2954         * rendering/svg/RenderSVGShape.h:
2955         (WebCore::RenderSVGShape::isRenderingDisabled):
2956         New method added. Always returns false so that derived classes that do not
2957         implement this method retain the existing behaviour.
2958         * rendering/svg/SVGRenderSupport.cpp:
2959         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2960         For each element potentially being included in the unioned bounding box of
2961         a container, check isRenderingDisabled and skip that element if true.
2962
2963         * rendering/svg/RenderSVGEllipse.cpp:
2964         (WebCore::RenderSVGEllipse::isRenderingDisabled):
2965         * rendering/svg/RenderSVGEllipse.h:
2966         * rendering/svg/RenderSVGPath.cpp:
2967         (WebCore::RenderSVGPath::isRenderingDisabled):
2968         * rendering/svg/RenderSVGPath.h:
2969         * rendering/svg/RenderSVGRect.cpp:
2970         (WebCore::RenderSVGRect::isRenderingDisabled):
2971         * rendering/svg/RenderSVGRect.h:
2972         * rendering/svg/RenderSVGShape.h:
2973         * rendering/svg/SVGRenderSupport.cpp:
2974         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2975
2976 2014-07-12  Benjamin Poulain  <benjamin@webkit.org>
2977
2978         Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
2979         https://bugs.webkit.org/show_bug.cgi?id=134862
2980
2981         Reviewed by Sam Weinig.
2982
2983         Unlike containsUncommonAttributeSelector(), selectorListContainsUncommonAttributeSelector() does not
2984         evaluate the attribute for "uncommon" types.
2985
2986         It would be possible to change the function instead to evaluate common attributes based
2987         on the match type and the pseudo class type. Such change would be more risky
2988         and we would get very little benefit from it, I leave that for later if that ever becomes useful.
2989
2990         * css/RuleSet.cpp:
2991         (WebCore::selectorListContainsAttributeSelector):
2992         (WebCore::containsUncommonAttributeSelector):
2993         (WebCore::selectorListContainsUncommonAttributeSelector): Deleted.
2994
2995 2014-07-12  Zan Dobersek  <zdobersek@igalia.com>
2996
2997         Use braced-init-list to create one-item Vector object in insertPerformanceEntry
2998         https://bugs.webkit.org/show_bug.cgi?id=133675
2999
3000         Reviewed by Darin Adler.
3001
3002         * page/PerformanceUserTiming.cpp:
3003         (WebCore::insertPerformanceEntry): Avoid wasting three lines for creating a
3004         Vector object with just one item that in the end gets copied. Use the
3005         braced-init-list syntax instead, leveraging Vector's std::initializer_list
3006         constructor.
3007
3008 2014-07-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3009
3010         Memory leaks with autoLoadImages off
3011         https://bugs.webkit.org/show_bug.cgi?id=124411
3012
3013         Reviewed by Darin Adler.
3014
3015         Do not emit notifyFinished for images with deferred load,
3016         and allow deferred loads to be cancelled.
3017
3018         * loader/cache/CachedResource.cpp:
3019         (WebCore::CachedResource::checkNotify):
3020         (WebCore::CachedResource::cancelLoad):
3021
3022 2014-07-11  Jer Noble  <jer.noble@apple.com>
3023
3024         [MSE] http/tests/media/media-source/mediasource-duration.html is failing.
3025         https://bugs.webkit.org/show_bug.cgi?id=134852
3026
3027         Reviewed by Eric Carlson.
3028
3029         Fixes the following tests:
3030         http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
3031         http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
3032         http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
3033         http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
3034         http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
3035         http/tests/media/media-source/mediasource-duration.html
3036         http/tests/media/media-source/mediasource-play.html
3037
3038         The primary change necessary to fix the mediasource-duration.html test was to add support
3039         for delaying the completion of a seek operation until the HTMLMediaElement's readyState
3040         rises to > HAVE_CURRENT_DATA. This is accomplished by modifying MediaSourcePrivate to have
3041         waitForSeekCompleted() and seekCompleted() virtual methods. These are called by MediaSource
3042         when a seek operation results in the current time moving outside the currently buffered time
3043         ranges, and when an append operation results in the readyState changing, respectively.
3044
3045         A number of other drive-by fixes were necessary to get this test fully passing, as noted
3046         below.
3047
3048         Make the MediaSource the primary owner of the media's duration, rather than the MediaSourcePrivate.
3049         Move the MediaSourcePrivateClient pointer to the MediaSourcePrivate from the MediaPlayerPrivate, so
3050         the MediaSource's duration can be retrieved.  While we're at it, do the same thing for buffered.
3051
3052         * Modules/mediasource/MediaSource.cpp:
3053         (WebCore::MediaSource::MediaSource): Initialize m_duration.
3054         (WebCore::MediaSource::duration): Simple accessor.
3055         (WebCore::MediaSource::setDurationInternal): Bring 'duration change algorithm' up to spec.
3056         (WebCore::MediaSource::setReadyState): Reset m_duration on close.
3057         * Modules/mediasource/MediaSource.h:
3058         * platform/graphics/MediaSourcePrivate.h:
3059         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3060         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Do not call setPrivateAndOpen().
3061         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Pass through to MediaSourcePrivateAVFObjC.
3062         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
3063         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3064         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3065         (WebCore::MediaSourcePrivateAVFObjC::create): Call setPrivateAndOpen().
3066         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Set m_client.
3067         (WebCore::MediaSourcePrivateAVFObjC::duration): Pass through to MediaSourcePrivateClient.
3068         (WebCore::MediaSourcePrivateAVFObjC::buffered): Ditto.
3069         (WebCore::MediaSourcePrivateAVFObjC::durationChanged): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
3070         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Deleted.
3071         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3072         (WebCore::MediaSourceGStreamer::open): Pass in MediaSourcePrivateClient.
3073         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Initialize m_mediaSource.
3074         (WebCore::MediaSourceGStreamer::durationChanged): Retrieve the duration from MediaSourcePrivateClient.
3075         (WebCore::MediaSourceGStreamer::markEndOfStream): Remove unnecssary ASSERT.
3076         (WebCore::MediaSourceGStreamer::unmarkEndOfStream): Ditto.
3077         (WebCore::MediaSourceGStreamer::setDuration): Deleted.
3078         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
3079         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3080         (WebCore::MockMediaPlayerMediaSource::load): Do not call setPrivateAndOpen().
3081         (WebCore::MockMediaPlayerMediaSource::buffered): Pass through to MockMediaSourcePrivate.
3082         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
3083         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
3084         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3085         (WebCore::MockMediaSourcePrivate::create): Call setPrivateAndOpen().
3086         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set m_client.
3087         (WebCore::MockMediaSourcePrivate::duration): Pass through to MediaSourcePrivateClient.
3088         (WebCore::MockMediaSourcePrivate::buffered): Ditto.
3089         (WebCore::MockMediaSourcePrivate::durationChanged): Pass thorugh to MockMediaPlayerMediaSource.
3090         (WebCore::MockMediaSourcePrivate::setDuration): Deleted.
3091
3092         Route seekToTime through MediaSource, rather than through MediaSourcePrivate, so that
3093         the time can be compared against the buffered ranges, and trigger the delay of the seek
3094         operation if necessary. Add a seekTimer to MediaPlayerPrivateMediaSourceAVFObjC, as this
3095         guarantees the order of asynchronous operations, rather than callOnMainThread, which can
3096         cause async operations to occur out of order.
3097
3098         * Modules/mediasource/MediaSource.cpp:
3099         (WebCore::MediaSource::seekToTime): Bring up to spec.
3100         (WebCore::MediaSource::completeSeek): Ditto.
3101         (WebCore::MediaSource::monitorSourceBuffers): Call completeSeek() when appropriate.
3102         * Modules/mediasource/SourceBuffer.cpp:
3103         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Deleted.
3104         (WebCore::SourceBuffer::seekToTime): Renamed from sourceBufferPrivateSeekToTime().
3105         * platform/graphics/MediaSourcePrivate.h:
3106         * platform/graphics/MediaSourcePrivateClient.h:
3107         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3108         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3109         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Add seekTimer. Only
3110             call timeChanged() if no longer seeking, thereby triggering a 'seeked' event.
3111         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Clear m_seekTimer.
3112         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Use m_seekTimer.
3113         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Call seekInternal.
3114         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Add logging.
3115         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): Added.
3116         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Added; trigger 'seeked'.
3117         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): No longer attempt to finish seek when
3118             readyState changes here; this has been moved up to MediaSource.cpp.
3119         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3120         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3121         (WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
3122         (WebCore::MediaSourcePrivateAVFObjC::seekCompleted): Ditto.
3123         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Pass through to MediaSourcePrivateClient.
3124         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Ditto.
3125         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3126         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Initialize m_seekCompleted.
3127         (WebCore::MockMediaPlayerMediaSource::seeking): Check for an uncompleted seek operation. 
3128         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
3129         (WebCore::MockMediaPlayerMediaSource::waitForSeekCompleted): Added.
3130         (WebCore::MockMediaPlayerMediaSource::seekCompleted): Added; trigger 'seeked'.
3131         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3132         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3133         (WebCore::MockMediaSourcePrivate::waitForSeekCompleted): Pass through to MockMediaPlayerMediaSource.
3134         (WebCore::MockMediaSourcePrivate::seekCompleted): Ditto.
3135         * platform/mock/mediasource/MockMediaSourcePrivate.h:
3136
3137         Drive-by fixes.
3138
3139         * Modules/mediasource/MediaSource.cpp:
3140         (WebCore::MediaSource::streamEndedWithError): Re-order the steps in streamEndedWithError()
3141             to avoid the MediaSource being closed and re-opened by the resulting duration change
3142             operation.
3143         * Modules/mediasource/MediaSource.h:
3144         * Modules/mediasource/SourceBuffer.cpp:
3145         (WebCore::SourceBuffer::remove): Added logging.
3146         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
3147         (WebCore::SourceBuffer::hasFutureTime): Swap an ASSERT for an early-return; it's possible
3148             for currentTime() to be outside of a buffered area.
3149         * Modules/mediasource/SourceBuffer.h:
3150         * html/HTMLMediaElement.cpp:
3151         (WebCore::HTMLMediaElement::parseAttribute): Do not issue an additional 'timeupdate' event
3152             after finishSeek() issues one of its own.
3153         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3154         (WebCore::globalDataParserQueue): Allow parsing operations to happen concurrently on
3155             background queues.
3156
3157 2014-07-12  Eric Carlson  <eric.carlson@apple.com>
3158
3159         [iOS] update control type when playback state changes
3160         https://bugs.webkit.org/show_bug.cgi?id=134856
3161
3162         Reviewed by Dean Jackson.
3163
3164         Check to make sure the correct type of media controls are showing when playback state
3165         changes so we don't end up with the wrong type of controls during playback.
3166
3167         * Modules/mediacontrols/mediaControlsApple.js: 
3168         (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
3169             of 'play' so controls don't hide too early.
3170         * Modules/mediacontrols/mediaControlsiOS.js:
3171         (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
3172             controls are shown when appropriate.
3173
3174 2014-07-12  Dean Jackson  <dino@apple.com>
3175
3176         [iOS Media] Start playback button should indicate when it can't play
3177         https://bugs.webkit.org/show_bug.cgi?id=134851
3178
3179         Post-commit review with Eric Carlson on IRC.
3180
3181         * Modules/mediacontrols/mediaControlsiOS.js:
3182         (ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
3183         class on the inline play button.
3184
3185 2014-07-11  Dean Jackson  <dino@apple.com>
3186
3187         [iOS Media] Start playback button should indicate when it can't play
3188         https://bugs.webkit.org/show_bug.cgi?id=134851
3189
3190         Reviewed by Sam Weinig.
3191
3192         If a video element has errors and cannot play, then the start
3193         playback button should use the "broken" icon.
3194
3195         * Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
3196         * Modules/mediacontrols/mediaControlsiOS.js:
3197         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
3198         even when there is an error.
3199         (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
3200         if we're in an error state.
3201         (ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
3202         the playback buttons if we are in an error state.
3203
3204 2014-07-11  Benjamin Poulain  <benjamin@webkit.org>
3205
3206         Partition the CSS rules based on the most specific filter of the rightmost fragment
3207         https://bugs.webkit.org/show_bug.cgi?id=134828
3208
3209         Reviewed by Andreas Kling.
3210
3211         Previously, RuleSet was partitioning each rule based on the rightmost filter.
3212         While fast, this had the side effect of putting many selectors with ID match in the class
3213         bucket (because the selectors are generally written starting with the ID).
3214
3215         This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
3216         the simple selectors in the rightmost fragment to find the best bucket.
3217
3218         * css/ElementRuleCollector.cpp:
3219         (WebCore::ElementRuleCollector::ruleMatches):
3220         * css/RuleSet.cpp:
3221         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
3222         I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().
3223
3224         (WebCore::RuleData::RuleData):
3225         (WebCore::rulesCountForName):
3226         (WebCore::RuleSet::addRule):
3227         I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
3228         was useless so I just moved the algorithm to addRule() directly.
3229
3230         We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
3231         If a filter with high specificity is found, we add the rule immediately and end there.
3232         If a filter that is not very specific is found, we keep a pointer to the selector to use it later.
3233
3234         (WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
3235         * css/RuleSet.h:
3236         (WebCore::RuleData::hasMultipartSelector): Deleted.
3237
3238 2014-07-11  Alex Christensen  <achristensen@webkit.org>
3239
3240         [WinCairo] Unreviewed build fix after r170937.
3241
3242         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
3243         Update and apply changes applied to WebCoreGenerated.make in r170937.
3244
3245 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3246
3247         Web Inspector: Crash when using a stale InspectableNode Node
3248         https://bugs.webkit.org/show_bug.cgi?id=134849
3249
3250         Reviewed by Timothy Hatcher.
3251
3252         * inspector/PageConsoleAgent.cpp:
3253
3254 2014-07-11  Jer Noble  <jer.noble@apple.com>
3255
3256         [MSE] Separate MediaSource logging into its own log channel
3257         https://bugs.webkit.org/show_bug.cgi?id=134809
3258
3259         Reviewed by Eric Carlson.
3260
3261         Separate out MediaSource logging (which can be quite verbose) into its own log channel,
3262         distinct from the Media log channel. Add some per-sample logging and further sequester that
3263         logging into its own MediaSourceSamples log channel.
3264
3265         Add the MediaSource and MediaSourceSamples channels:
3266         * platform/Logging.h:
3267
3268         Move LOG(Media) -> LOG(MediaSource):
3269         * Modules/mediasource/MediaSource.cpp:
3270         (WebCore::MediaSource::MediaSource):
3271         (WebCore::MediaSource::~MediaSource):
3272         (WebCore::MediaSource::setReadyState):
3273         (WebCore::MediaSource::addSourceBuffer):
3274         (WebCore::MediaSource::removeSourceBuffer):
3275         (WebCore::MediaSource::isTypeSupported):
3276         * Modules/mediasource/SourceBuffer.cpp:
3277         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
3278         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
3279         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3280         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
3281         (WebCore::SourceBuffer::provideMediaData):
3282         (WebCore::SourceBuffer::monitorBufferingRate):
3283         (WebCore::SourceBuffer::textTrackAddCues):
3284         (WebCore::SourceBuffer::hasFutureTime):
3285         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3286         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
3287         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
3288         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
3289         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
3290         (WebCore::SourceBufferPrivateAVFObjC::append):
3291         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
3292         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
3293         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
3294         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
3295
3296 2014-07-11  Brady Eidson  <beidson@apple.com>
3297
3298         Phone numbers that span two lines are not detected.
3299         <rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808
3300
3301         Reviewed by Tim Horton.
3302
3303         * editing/Editor.cpp:
3304         (WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
3305             create an "edge range" window around the end of the TextIterator range, and scan it.
3306             Also make sure to not accumulate duplicate ranges that might have showed up in both the
3307             TextIterator range and the edge window range.
3308
3309 2014-07-11  Enrica Casucci  <enrica@apple.com>
3310
3311         Implement textStylingAtPosition in WK2.
3312         https://bugs.webkit.org/show_bug.cgi?id=134843
3313         <rdar://problem/17614981>
3314         
3315         Reviewed by Benjamin Poulain.
3316
3317         Adding some exports and making styleForSelectionStart public.
3318
3319         * WebCore.exp.in:
3320         * editing/Editor.h:
3321
3322 2014-07-11  Zalan Bujtas  <zalan@apple.com>
3323
3324         REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
3325         https://bugs.webkit.org/show_bug.cgi?id=134841
3326         <rdar://problem/17577563>
3327
3328         Reviewed by Simon Fraser.
3329
3330         Revert back to type int for Element.scroll* APIs in order to preserve exception handling
3331         behavior.
3332
3333         Test: cssom/non-subpixel-scroll-top-left-values.html
3334
3335         * dom/Element.cpp:
3336         (WebCore::Element::scrollLeft):
3337         (WebCore::Element::scrollTop):
3338         (WebCore::Element::setScrollLeft):
3339         (WebCore::Element::setScrollTop):
3340         (WebCore::Element::scrollWidth):
3341         (WebCore::Element::scrollHeight):
3342         * dom/Element.h:
3343         * dom/Element.idl:
3344         * html/HTMLBodyElement.cpp:
3345         (WebCore::adjustForZoom):
3346         (WebCore::HTMLBodyElement::scrollLeft):
3347         (WebCore::HTMLBodyElement::setScrollLeft):
3348         (WebCore::HTMLBodyElement::scrollTop):
3349         (WebCore::HTMLBodyElement::setScrollTop):
3350         (WebCore::HTMLBodyElement::scrollHeight):
3351         (WebCore::HTMLBodyElement::scrollWidth):
3352         * html/HTMLBodyElement.h:
3353
3354 2014-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3355
3356         Web Inspector: Debugger Pause button does not work
3357         https://bugs.webkit.org/show_bug.cgi?id=134785
3358
3359         Reviewed by Timothy Hatcher.
3360
3361         * CMakeLists.txt:
3362         * DerivedSources.make:
3363         * inspector/CommandLineAPIModuleSource.js:
3364         Minification strips the sourceURL command. Add it back with minification.
3365
3366 2014-07-11  Andreas Kling  <akling@apple.com>
3367
3368         Use the bare minimum tile coverage rect when under memory pressure.
3369         <https://webkit.org/b/134837>
3370
3371         When the browser is under critical memory pressure, don't generate any
3372         more tiles than are needed to cover the exposed viewport rect.
3373
3374         Reviewed by Pratik Solanki.
3375
3376         * page/FrameView.cpp:
3377         (WebCore::FrameView::computeCoverageRect):
3378
3379 2014-07-11  Javier Fernandez  <jfernandez@igalia.com>
3380
3381         [CSS Grid Layout] Implement justify-self css property
3382         https://bugs.webkit.org/show_bug.cgi?id=134419
3383
3384         Reviewed by Dean Jackson.
3385
3386         This change adds the justify-self property from CSS 3 Box Alignment
3387         and implements the parsing.
3388
3389         From Blink r164685 by <jchaffraix@chromium.org>
3390
3391         Test: fast/css/parse-justify-self.html
3392
3393         * css/CSSComputedStyleDeclaration.cpp:
3394         (WebCore::ComputedStyleExtractor::propertyValue):
3395         * css/CSSParser.cpp:
3396         (WebCore::isValidKeywordPropertyAndValue):
3397         (WebCore::CSSParser::parseValue):
3398         (WebCore::isItemPositionKeyword):
3399         (WebCore::CSSParser::parseJustifySelf):
3400         * css/CSSParser.h:
3401         * css/CSSPrimitiveValueMappings.h:
3402         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3403         (WebCore::CSSPrimitiveValue::operator EJustifySelf):
3404         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):