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