Unreviewed, rolling out r170605.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-30  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r170605.
4         https://bugs.webkit.org/show_bug.cgi?id=134484
5
6         The changes cause crashes on ARM64 (Requested by benjaminp on
7         #webkit).
8
9         Reverted changeset:
10
11         "Reduce dynamic memory allocation in css jit."
12         https://bugs.webkit.org/show_bug.cgi?id=134416
13         http://trac.webkit.org/changeset/170605
14
15 2014-06-30  Anders Carlsson  <andersca@apple.com>
16
17         Change the AddBackForwardItem message to take a page state object
18         https://bugs.webkit.org/show_bug.cgi?id=134475
19
20         Reviewed by Andreas Kling.
21
22         * WebCore.exp.in:
23
24 2014-06-30  Benjamin Poulain  <benjamin@webkit.org>
25
26         [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
27         https://bugs.webkit.org/show_bug.cgi?id=134471
28         <rdar://problem/17513542>
29
30         Reviewed by Enrica Casucci.
31
32         UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
33         since the page has no way of overriding that behavior.
34
35         This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
36         by default for those object, and enabled for images that are in a link.
37
38         * css/html.css:
39         (applet, embed, object, img):
40         (:-webkit-any-link img):
41
42 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
43
44         All Indic text is rendered as boxes on iOS
45         https://bugs.webkit.org/show_bug.cgi?id=134464
46
47         Reviewed by Simon Fraser.
48
49         I made a typo in r170207.
50
51         Test: fast/text/indic.html
52
53         * platform/graphics/ios/FontCacheIOS.mm:
54         (WebCore::languageSpecificFallbackFont):
55
56 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
57
58         [iOS] languageSpecificFallbackFont() is not consistent
59         https://bugs.webkit.org/show_bug.cgi?id=134473
60
61         Reviewed by Darin Adler.
62
63         It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.
64
65         No tests because there is no behavior change.
66
67         * platform/graphics/ios/FontCacheIOS.mm:
68         (WebCore::languageSpecificFallbackFont):
69
70 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
71
72         [Win] Unreviewed gardening.
73
74         * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
75         and JSFileReaderSync multiple times.
76
77 2014-06-30  Daniel Bates  <dabates@apple.com>
78
79         Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
80         https://bugs.webkit.org/show_bug.cgi?id=134470
81
82         Reviewed by Anders Carlsson.
83
84         Currently we always copy construct the captured std::function object when calling callOnMainThread()
85         in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
86         const in a lambda expression's body by default. That is, the std::function object is captured as const.
87         Instead, we should mark this lambda expression as mutable so the captured std::function object is
88         non-const and hence we can use move semantics when passing it to callOnMainThread().
89
90         * page/scrolling/ScrollingThread.cpp:
91         (WebCore::ScrollingThread::dispatchBarrier):
92
93 2014-06-30  Anders Carlsson  <andersca@apple.com>
94
95         Adopt the legacy session decoding inside WebPage::restoreSession for now
96         https://bugs.webkit.org/show_bug.cgi?id=134465
97
98         Reviewed by Sam Weinig.
99
100         * WebCore.exp.in:
101
102 2014-06-30  Commit Queue  <commit-queue@webkit.org>
103
104         Unreviewed, rolling out r170578.
105         https://bugs.webkit.org/show_bug.cgi?id=134462
106
107         causes assertions loading nytimes.com on iOS (Requested by
108         smfr on #webkit).
109
110         Reverted changeset:
111
112         "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
113         https://bugs.webkit.org/show_bug.cgi?id=134441
114         http://trac.webkit.org/changeset/170578
115
116 2014-06-30  Alex Christensen  <achristensen@webkit.org>
117
118         Reduce dynamic memory allocation in css jit.
119         https://bugs.webkit.org/show_bug.cgi?id=134416
120
121         Reviewed by Benjamin Poulain.
122
123         * cssjit/FunctionCall.h:
124         (WebCore::FunctionCall::FunctionCall):
125         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
126         * cssjit/RegisterAllocator.h:
127         * cssjit/SelectorCompiler.cpp:
128         (WebCore::SelectorCompiler::addPseudoClassType):
129         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
130         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
131         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
132         Use inlineCapacity template parameter to reduce malloc calls.
133         I use 16 and 32 as the inline capacity for non-register related vectors because that
134         is probably big enough for the selector compiler, and if it is not then a malloc
135         call will not be significant because the selector is very complex.
136         * cssjit/StackAllocator.h:
137         (WebCore::StackAllocator::push):
138         Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.
139
140 2014-06-30  Alex Christensen  <achristensen@webkit.org>
141
142         Use non-thumb registers in armv7 css jit.
143         https://bugs.webkit.org/show_bug.cgi?id=134450
144
145         Reviewed by Geoff Garen.
146
147         * cssjit/RegisterAllocator.h:
148         (WebCore::RegisterAllocator::isValidRegister):
149         (WebCore::RegisterAllocator::isCallerSavedRegister):
150         Use additional general purpose registers.
151         * cssjit/SelectorCompiler.cpp:
152         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
153         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
154         Always succeed when compiling css selectors.
155
156 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
157
158         Tiles on bottom of screen are not always allocated when necessary
159         https://bugs.webkit.org/show_bug.cgi?id=134272
160
161         Reviewed by Simon Fraser.
162
163         The initial visibleRect is in the coordinate of the root layer, so its origin
164         is at the top left of the view. The initial rect we were using doesn't
165         include the contents inset, so it was too short, which was causing tiles near
166         the bottom of the screen to not always be allocated if the tile threshold was
167         close to the bottom of the view. Instead, we want to include the contents
168         inset size so the visible rect includes the entire view.
169         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
170         the visible rect into the tiled layer's coordinate system, at which point it
171         is used for visible tile logic.
172
173         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
174
175         * platform/graphics/ca/TileCoverageMap.cpp:
176         (WebCore::TileCoverageMap::update):
177         * rendering/RenderLayerCompositor.cpp:
178         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
179
180 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
181
182         [Win] Unreviewed project gardening.
183
184         * WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
185         files appear in appropriate places in project view.
186         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
187
188 2014-06-30  Zalan Bujtas  <zalan@apple.com>
189
190         Remove redundant repaintCompositedLayers() parameter and its dependencies.
191         https://bugs.webkit.org/show_bug.cgi?id=134431
192
193         Reviewed by Darin Adler.
194
195         No change in functionality.
196
197         * rendering/RenderLayer.cpp:
198         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
199         (WebCore::RenderLayer::convertToLayerCoords): Deleted.
200         * rendering/RenderLayer.h:
201         * rendering/RenderLayerCompositor.cpp:
202         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
203         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
204         * rendering/RenderLayerCompositor.h:
205
206 2014-06-30  Alex Christensen  <achristensen@webkit.org>
207
208         Remove webkit prefix from pointer lock.
209         https://bugs.webkit.org/show_bug.cgi?id=134312
210
211         Reviewed by Dean Jackson.
212
213         * dom/Document.cpp:
214         (WebCore::Document::exitPointerLock):
215         (WebCore::Document::pointerLockElement):
216         (WebCore::Document::webkitExitPointerLock): Deleted.
217         (WebCore::Document::webkitPointerLockElement): Deleted.
218         * dom/Document.h:
219         * dom/Document.idl:
220         * dom/Element.cpp:
221         (WebCore::Element::requestPointerLock):
222         (WebCore::Element::webkitRequestPointerLock): Deleted.
223         * dom/Element.h:
224         * dom/Element.idl:
225         * dom/EventNames.h:
226         * dom/MouseEvent.idl:
227         * dom/MouseRelatedEvent.h:
228         (WebCore::MouseRelatedEvent::movementX):
229         (WebCore::MouseRelatedEvent::movementY):
230         (WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
231         (WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
232         * page/PointerLockController.cpp:
233         (WebCore::PointerLockController::PointerLockController):
234         Initialize all data members.
235         (WebCore::PointerLockController::requestPointerLock):
236         (WebCore::PointerLockController::didAcquirePointerLock):
237         (WebCore::PointerLockController::didNotAcquirePointerLock):
238         (WebCore::PointerLockController::didLosePointerLock):
239
240 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
241
242         U16_IS_SURROGATE should not be called with a UChar32
243         https://bugs.webkit.org/show_bug.cgi?id=134440
244
245         Reviewed by Darin Adler.
246
247         No new tests because there is no behavior change.
248
249         * platform/graphics/mac/ComplexTextController.cpp:
250         (WebCore::advanceByCombiningCharacterSequence):
251
252 2014-06-30  Ryuan Choi  <ryuan.choi@samsung.com>
253
254         [EFL] Remove m_evasObject from Widget
255         https://bugs.webkit.org/show_bug.cgi?id=134442
256
257         Reviewed by Gyuyoung Kim.
258
259         Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
260         in the Widget.cpp because it's not used for WebKit2/Efl.
261
262         * platform/Widget.h:
263         (WebCore::Widget::evasObject): Deleted.
264         * platform/efl/ScrollbarEfl.cpp:
265         Removed WebKit1/Efl specific code which uses m_evasObject.
266         It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
267         (WebCore::ScrollbarEfl::ScrollbarEfl):
268         (WebCore::ScrollbarEfl::~ScrollbarEfl):
269         (WebCore::ScrollbarEfl::setParent):
270         (WebCore::ScrollbarEfl::frameRectsChanged):
271         (WebCore::ScrollbarEfl::invalidate):
272         (ScrollbarEfl::ScrollbarEfl): Deleted.
273         (ScrollbarEfl::~ScrollbarEfl): Deleted.
274         (scrollbarEflEdjeMessage): Deleted.
275         (ScrollbarEfl::setParent): Deleted.
276         (ScrollbarEfl::updateThumbPosition): Deleted.
277         (ScrollbarEfl::updateThumbProportion): Deleted.
278         (ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
279         (ScrollbarEfl::frameRectsChanged): Deleted.
280         (ScrollbarEfl::invalidate): Deleted.
281         * platform/efl/ScrollbarEfl.h:
282         Removed unnecessary methods. In addition, applied final, override keyword.
283         (WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
284         (WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
285         (WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
286         (WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
287         * platform/efl/WidgetEfl.cpp:
288         (WebCore::Widget::Widget):
289         (WebCore::Widget::setEvasObject): Deleted.
290
291 2014-06-30  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
292
293         Fix deprecated warning with bison 3
294         https://bugs.webkit.org/show_bug.cgi?id=133791
295
296         Reviewed by Csaba Osztrogonác.
297
298         No new tests because no functional changes.
299
300         * css/CSSGrammar.y.in:
301         * xml/XPathGrammar.y:
302
303 2014-06-30  Jaehun Lim  <ljaehun.lim@samsung.com>
304
305         Remove HarfBuzzShaper::setDrawRange()
306         https://bugs.webkit.org/show_bug.cgi?id=134243
307
308         Reviewed by Gyuyoung Kim.
309
310         setDrawRange() is not used anywhere. Remove it.
311         And m_fromIndex and m_toIndex are changed by only setDrawRange().
312         So remove them too and use the default values instead of them.
313
314         No new tests, no behavior changes.
315
316         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
317         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
318         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
319             currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
320         (WebCore::HarfBuzzShaper::setDrawRange): Deleted.
321         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
322
323 2014-06-29  Pratik Solanki  <psolanki@apple.com>
324
325         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
326         https://bugs.webkit.org/show_bug.cgi?id=134441
327
328         Reviewed by Sam Weinig.
329
330         No new tests. Should be covered by exsting tests.
331
332         * platform/network/cf/ResourceRequest.h:
333         (WebCore::ResourceRequest::ResourceRequest):
334         * platform/network/cf/ResourceRequestCFNet.cpp:
335         (WebCore::ResourceRequest::doUpdatePlatformRequest):
336         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
337         (WebCore::ResourceRequest::setStorageSession):
338         * platform/network/cocoa/ResourceRequestCocoa.mm:
339         (WebCore::ResourceRequest::nsURLRequest):
340
341 2014-06-29  Ryuan Choi  <ryuan.choi@samsung.com>
342
343         [EFL] Remove netscape plugin implementation from WebCore
344         https://bugs.webkit.org/show_bug.cgi?id=134438
345
346         Reviewed by Gyuyoung Kim.
347
348         Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.
349
350         * PlatformEfl.cmake:
351         * plugins/efl/PluginPackageEfl.cpp: Removed.
352         * plugins/efl/PluginViewEfl.cpp: Removed.
353         * plugins/x11/PluginViewX11.cpp: Removed.
354         This file is to share common code between WebKit1/Efl and WebKit1/GTk.
355         Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.
356
357 2014-06-29  Yoav Weiss  <yoav@yoav.ws>
358
359         Add support for HTMLImageElement's sizes attribute
360         https://bugs.webkit.org/show_bug.cgi?id=133620
361
362         Reviewed by Dean Jackson.
363
364         Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
365                fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
366                fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
367                fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
368                http/tests/loading/sizes/preload-image-sizes-2x.html
369                http/tests/loading/sizes/preload-image-sizes.html
370
371         This patch adds support for HTMLImageElement's sizes attribute and the
372         related srcset extended syntax as defined in
373         http://picture.responsiveimages.org/.
374         This sizes attribute syntax is added to the CSSGrammar and parsed by
375         the CSSParser.
376         The SourceSizeList class is generated by the parser, and used to get
377         the final source size.
378         HTMLImageElement and HTMLPreloadScanner send this value to
379         HTMLSrcsetParser.
380         HTMLSrcsetParser uses this value in order to pick the right resource.
381
382         * CMakeLists.txt: Added css/SourceSizeList.cpp.
383         * Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
384         * WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
385         * WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
386         * WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
387         * css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
388         Source size list, Source size length and source size.
389         * css/CSSParser.cpp:
390         (WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
391         (WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
392         * css/CSSParser.h:
393         * css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
394         (WebCore::SourceSize::match):
395         (WebCore::computeLength):
396         (WebCore::defaultValue):
397         (WebCore::SourceSize::length):
398         (WebCore::SourceSizeList::parseSizesAttribute):
399         (WebCore::SourceSizeList::getEffectiveSize):
400         * css/SourceSizeList.h: Added.
401         (WebCore::SourceSize::SourceSize):
402         (WebCore::SourceSizeList::append):
403         * html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
404         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
405         (WebCore::HTMLImageElement::parseAttribute):
406         (WebCore::HTMLImageElement::currentSrc):
407         * html/HTMLImageElement.h:
408         * html/HTMLImageElement.idl:
409         * html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
410         HTMLPreloadScanner calls.
411         (WebCore::HTMLDocumentParser::pumpTokenizer):
412         (WebCore::HTMLDocumentParser::insert):
413         (WebCore::HTMLDocumentParser::append):
414         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
415         * html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
416         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
417         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
418         (WebCore::TokenPreloadScanner::scan):
419         (WebCore::HTMLPreloadScanner::scan):
420         * html/parser/HTMLPreloadScanner.h:
421         * html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
422         (WebCore::parseDescriptors):
423         (WebCore::pickBestImageCandidate):
424         (WebCore::bestFitSourceForImageAttributes):
425         * html/parser/HTMLSrcsetParser.h:
426
427 2014-06-29  Andreas Kling  <akling@apple.com>
428
429         No need to lazily initialize ResourceResponse internals when accessing timing data.
430         <https://webkit.org/b/134437>
431         <rdar://problem/17499876>
432
433         When building with ENABLE(WEB_TIMING), the last thing that would happen when
434         serializing a ResourceResponse in the network process is that we'd retrieve
435         the ResourceLoadTiming to encode it as part of the response. Doing so would
436         trigger the lazy instantiation of ResourceResponse's internal data structures.
437
438         Since timing data is not actually lazily instantiated, we can just not do that.
439
440         This shaves off ~550ms of network process main thread time on PLT, reducing
441         response latency by not doing unnecessary stuff before letting the web process
442         look at the downloaded data.
443
444         Reviewed by Gavin Barraclough.
445
446         * WebCore.exp.in:
447         * platform/network/ResourceResponseBase.cpp:
448         (WebCore::ResourceResponseBase::adopt):
449         (WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
450         (WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
451         * platform/network/ResourceResponseBase.h:
452         (WebCore::ResourceResponseBase::resourceLoadTiming):
453
454 2014-06-29  Pratik Solanki  <pratik.solanki@gmail.com>
455
456         Refactor ResourceRequest into Cocoa and iOS specific files
457         https://bugs.webkit.org/show_bug.cgi?id=134430
458
459         Reviewed by Andreas Kling.
460
461         No new tests because no functional changes.
462
463         * WebCore.xcodeproj/project.pbxproj:
464         * platform/network/cf/ResourceRequestCFNet.cpp:
465         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
466         * platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
467         (WebCore::ResourceRequest::nsURLRequest):
468         (WebCore::ResourceRequest::cfURLRequest):
469         (WebCore::ResourceRequest::doUpdateResourceRequest):
470         (WebCore::ResourceRequest::doUpdateResourceHTTPBody):
471         (WebCore::ResourceRequest::doUpdatePlatformRequest):
472         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
473         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
474         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
475         (WebCore::ResourceRequest::setStorageSession):
476         * platform/network/ios/ResourceRequestIOS.mm: Added.
477         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
478         (WebCore::ResourceRequest::ResourceRequest):
479         (WebCore::ResourceRequest::updateNSURLRequest):
480         * platform/network/mac/ResourceRequestMac.mm:
481         (WebCore::initQuickLookResourceCachingQuirks):
482         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
483         (WebCore::ResourceRequest::ResourceRequest):
484         (WebCore::ResourceRequest::updateNSURLRequest):
485         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
486         (WebCore::ResourceRequest::nsURLRequest): Deleted.
487         (WebCore::ResourceRequest::cfURLRequest): Deleted.
488         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
489         (WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
490         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
491         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
492         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
493         (WebCore::ResourceRequest::setStorageSession): Deleted.
494
495 2014-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
496
497         TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
498         https://bugs.webkit.org/show_bug.cgi?id=133678
499
500         Reviewed by Alexey Proskuryakov.
501
502         Test: fast/encoding/backslash-encoding-jp.html
503
504         * platform/text/TextCodecICU.cpp:
505         (WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.
506
507 2014-06-28  Dean Jackson  <dino@apple.com>
508
509         [iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
510         https://bugs.webkit.org/show_bug.cgi?id=134433
511         <rdar://problem/16630794>
512
513         Reviewed by Eric Carlson.
514
515         Detect the number of target touches (those directly on the
516         video element) and disable the page zoom if it looks
517         like the user is trying to trigger fullscreen.
518
519         * Modules/mediacontrols/mediaControlsiOS.js:
520         (ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
521         two touches in this video element, don't trigger fullscreen. The
522         exception is if we haven't yet started playback.
523         (ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
524         if we haven't started playback (iOS 7 behaviour).
525         (ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
526         number of targetted touches.
527
528 2014-06-27  Simon Fraser  <simon.fraser@apple.com>
529
530         [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
531         https://bugs.webkit.org/show_bug.cgi?id=134426
532         <rdar://problem/17474523>
533
534         Reviewed by Tim Horton.
535
536         After committing a new layer tree (with possibly stale position:fixed layer
537         positions), we need the scrolling tree to update those positions based on
538         the current scroll offset.
539         
540         Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
541         which is required to update fixed/sticky child nodes.
542
543         * WebCore.exp.in:
544         * page/scrolling/ScrollingTreeScrollingNode.cpp:
545         (WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
546         * page/scrolling/ScrollingTreeScrollingNode.h:
547
548 2014-06-28  Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos  <cgarcia@igalia.com>
549
550         [GTK] Use public getter/setter in GObject DOM bindings properties implementation.
551         https://bugs.webkit.org/show_bug.cgi?id=134390.
552
553         Reviewed by Carlos Garcia Campos.
554
555         The current GObject DOM bindings generator is duplicating code when
556         implementing the get/set_property methods and the public
557         getters/setters, instead of making one invoking the other.
558         
559         This commit changes this behaviour so the code is not duplicated,
560         making it easier to maintain.
561
562         No new tests needed.
563
564         * bindings/scripts/CodeGeneratorGObject.pm:
565         (GenerateProperty):
566         (GenerateProperties):
567         (WriteData):
568         (GetCoreObject): Deleted.
569         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
570         (webkit_dom_test_active_dom_object_get_property):
571         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
572         (webkit_dom_test_event_constructor_get_property):
573         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
574         (webkit_dom_test_exception_get_property):
575         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
576         (webkit_dom_test_interface_set_property):
577         (webkit_dom_test_interface_get_property):
578         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
579         (webkit_dom_test_nondeterministic_set_property):
580         (webkit_dom_test_nondeterministic_get_property):
581         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
582         (webkit_dom_test_obj_set_property):
583         (webkit_dom_test_obj_get_property):
584         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
585         (webkit_dom_test_serialized_script_value_interface_get_property):
586         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
587         (webkit_dom_test_typedefs_set_property):
588         (webkit_dom_test_typedefs_get_property):
589         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
590         (webkit_dom_test_exception_get_property):
591         (webkit_dom_attribute_get_property):
592
593 2014-06-28  Radu Stavila  <stavila@adobe.com>
594
595         [New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
596         https://bugs.webkit.org/show_bug.cgi?id=133941
597
598         Reviewed by Darin Adler.
599
600         When having a multicol element inside an element with overflow:hidden and border-radius,
601         the fragments representing the columns need to have the border radius set also, to ensure
602         proper clipping.
603
604         Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html
605
606         * rendering/RenderLayer.cpp:
607         (WebCore::RenderLayer::collectFragments):
608
609 2014-06-27  Zalan Bujtas  <zalan@apple.com>
610
611         Subpixel rendering: Background clipping with subpixel behaves differently when composited.
612         https://bugs.webkit.org/show_bug.cgi?id=134422
613
614         Reviewed by Simon Fraser.
615
616         Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
617         It ensures that cliprect starts from the right position when graphics layer is not on the same
618         coordinates as the associated render layer.
619
620         Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html
621
622         * rendering/RenderLayer.cpp:
623         (WebCore::RenderLayer::clipToRect):
624         (WebCore::RenderLayer::paintLayer):
625         (WebCore::RenderLayer::applyFilters):
626         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
627         (WebCore::RenderLayer::paintBackgroundForFragments):
628         (WebCore::RenderLayer::paintForegroundForFragments):
629         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
630         (WebCore::RenderLayer::paintOutlineForFragments):
631         (WebCore::RenderLayer::paintMaskForFragments):
632         (WebCore::RenderLayer::paintOverflowControlsForFragments):
633         (WebCore::RenderLayer::calculateClipRects):
634         * rendering/RenderLayer.h:
635
636 2014-06-27  Brent Fulgham  <bfulgham@apple.com>
637
638         [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
639         https://bugs.webkit.org/show_bug.cgi?id=134418
640
641         Reviewed by Eric Carlson.
642
643         Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
644         Windows.
645
646         * DerivedSources.cpp: Add new IDL files
647         * DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
648         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
649         Objective C.)
650         * WebCore.vcxproj/WebCore.vcxproj: Update for new files.
651         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
652         * WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
653         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
654         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
655         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
656         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
657         Moved from MediaPlayerPrivateAVFoundationObjC.
658         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
659         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
660         Update for new API calls.
661         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
662         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
663         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
664         Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
665         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
666         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
667         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
668         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
669         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
670         Remove method that was moved to base class.
671
672 2014-06-27  Benjamin Poulain  <benjamin@webkit.org>
673
674         Remove BufferForAppendingHyphen
675         https://bugs.webkit.org/show_bug.cgi?id=134376
676
677         Reviewed by Darin Adler.
678
679         It is legacy, from a time when that code was using a Vector.
680
681         The problem is that StringBuilder's memory was also implicitly used to keep
682         the string alive for the lifespan of the TextRun. That seems quite dangerous
683         as changes in StringBuilder could have changed that.
684
685         To fix the lifetime issue, my first idea was to make it explicit by passing
686         a String reference to hold the memory alive, and a boolean to say if the text
687         need an hyphen. The problem with that is this code is very hot and I made things
688         worse.
689
690         The solution with this patch is to just pass a pointer to a String to do both
691         the buffer reference, and the decision to add the hyphen. Having a single
692         argument with 2 meanings is not pretty but that's not worse than the old buffer.
693
694         * editing/TextIterator.cpp:
695         * rendering/InlineTextBox.cpp:
696         (WebCore::InlineTextBox::localSelectionRect):
697         (WebCore::InlineTextBox::paint):
698         (WebCore::InlineTextBox::paintSelection):
699         (WebCore::InlineTextBox::constructTextRun):
700         (WebCore::adjustCharactersAndLengthForHyphen): Deleted.
701         * rendering/InlineTextBox.h:
702         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
703         * rendering/RenderText.cpp:
704
705 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
706
707         Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
708         https://bugs.webkit.org/show_bug.cgi?id=134407
709
710         Reviewed by Eric Carlson.
711
712         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
713         (-[WebAVPlayerController init]):
714         Load AVPlayerController on use.
715         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
716         Remove loading on construction.
717         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
718         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
719         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.
720
721 2014-06-27  Alex Christensen  <achristensen@webkit.org>
722
723         Remove extra operations from 64-bit or on armv7.
724         https://bugs.webkit.org/show_bug.cgi?id=134408
725
726         Reviewed by Geoffrey Garen.
727
728         * cssjit/SelectorCompiler.cpp:
729         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
730         Only do or operations if it would change values.
731         Often we're only setting one flag, so half the operations are not necessary.
732
733 2014-06-27  Beth Dakin  <bdakin@apple.com>
734
735         ScrollView::rootViewToTotalContents() needs to take topContentInset into account
736         https://bugs.webkit.org/show_bug.cgi?id=134415
737         -and corresponding-
738         <rdar://problem/17473633>
739
740         Reviewed by Simon Fraser.
741
742         This affects hit testing in headers aka PageBanners.
743
744         The root view will be anchored above the start of the total contents if there is a 
745         topContentInset, so the inset value should be subtracted to get into the right 
746         coordinate space here.
747         * platform/ScrollView.cpp:
748         (WebCore::ScrollView::rootViewToTotalContents):
749
750 2014-06-27  Antti Koivisto  <antti@apple.com>
751
752         Flush throttling with remote layers
753         https://bugs.webkit.org/show_bug.cgi?id=134398
754
755         Reviewed by Darin Adler.
756
757         With remote layer trees the flush scheduling lives in the WebKit2 layer. The throttling code
758         needs to live there as well.
759         
760         Add the required callbacks and disable the existing throttling code in RenderLayerCompositor
761         when remote layers are in use. Later we can get rid of the RenderLayerCompositor throttling code.
762
763         * WebCore.xcodeproj/project.pbxproj:
764         * loader/FrameLoader.cpp:
765         (WebCore::FrameLoader::loadProgressingStatusChanged):
766         * page/ChromeClient.h:
767         (WebCore::ChromeClient::adjustLayerFlushThrottling):
768         * page/FrameView.cpp:
769         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
770         (WebCore::FrameView::loadProgressingStatusChanged):
771         
772             Factor the progress status change activities to a function.
773
774         (WebCore::FrameView::updateLayerFlushThrottling):
775         (WebCore::FrameView::setExposedRect):
776         
777             Move the call to adjustTiledBackingCoverage from WebKit to here.
778
779         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames): Deleted.
780         * page/FrameView.h:
781         * page/LayerFlushThrottleState.h: Added.
782         * rendering/RenderLayerCompositor.cpp:
783         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
784
785 2014-06-27  Brady Eidson  <beidson@apple.com>
786
787         The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
788         https://bugs.webkit.org/show_bug.cgi?id=134375
789
790         Reviewed by Darin Adler.
791
792         No new tests (Not yet a tested config)
793
794         * Modules/gamepad/GamepadManager.cpp:
795         (WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
796         (WebCore::GamepadManager::platformGamepadDisconnected):
797         (WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
798         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
799           notifying it of each connected Gamepad.
800         (WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
801         (WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
802         * Modules/gamepad/GamepadManager.h:
803
804         * platform/GamepadProviderClient.h: Added platformGamepadInputActivity.
805
806         * platform/mac/HIDGamepadProvider.cpp:
807         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
808         (WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
809           that a button was pressed.
810         (WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
811         * platform/mac/HIDGamepadProvider.h:
812
813 2014-06-27  Brady Eidson  <beidson@apple.com>
814
815         HIDGamepads should populate themselves with initial input values
816         https://bugs.webkit.org/show_bug.cgi?id=134381
817
818         Reviewed by Darin Adler.
819
820         No new tests (Not yet a tested config)
821
822         * platform/mac/HIDGamepad.cpp:
823         (WebCore::HIDGamepad::getCurrentValueForElement):
824         (WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
825         (WebCore::HIDGamepad::maybeAddButton):
826         (WebCore::HIDGamepad::maybeAddAxis):
827         * platform/mac/HIDGamepad.h:
828         (WebCore::HIDGamepadElement::HIDGamepadElement):
829         (WebCore::HIDGamepadButton::HIDGamepadButton):
830         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
831
832 2014-06-27  Peyton Randolph  <prandolph@apple.com>
833
834         Add feature flag for link long-press gesture.
835         https://bugs.webkit.org/show_bug.cgi?id=134262
836
837         Reviewed by Enrica Casucci.
838
839         * Configurations/FeatureDefines.xcconfig:
840         Add ENABLE_LINK_LONG_PRESS.
841
842 2014-06-26  Brady Eidson  <beidson@apple.com>
843
844         HIDGamepadProvider should only be active when someone is interested in Gamepads.
845         https://bugs.webkit.org/show_bug.cgi?id=134374
846
847         Reviewed by Darin Adler.
848
849         No new tests (Not yet a tested config)
850
851         * Modules/gamepad/GamepadManager.cpp:
852         (WebCore::GamepadManager::registerNavigator): Add some logging.
853         (WebCore::GamepadManager::unregisterNavigator): Ditto.
854
855         * platform/mac/HIDGamepadProvider.cpp:
856         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
857         (WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
858         (WebCore::HIDGamepadProvider::openAndScheduleManager):
859         (WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
860           all current gamepads.
861         (WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
862         (WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
863         (WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
864           callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
865           spin of the runloop.
866         (WebCore::HIDGamepadProvider::deviceRemoved):
867         * platform/mac/HIDGamepadProvider.h:
868         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.
869
870 2014-06-27  Alex Christensen  <achristensen@webkit.org>
871
872         Prevent unnecessary register saving in css jit.
873         https://bugs.webkit.org/show_bug.cgi?id=133955
874
875         Reviewed by Geoff Garen.
876
877         * cssjit/FunctionCall.h:
878         (WebCore::FunctionCall::prepareAndCall):
879         (WebCore::FunctionCall::cleanupPostCall):
880         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
881         (WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
882         (WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
883         (WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
884         Only push caller saved registers before function calls.
885         * cssjit/RegisterAllocator.h:
886         (WebCore::RegisterAllocator::isValidRegister):
887         Corrected register ranges.
888         (WebCore::RegisterAllocator::isCallerSavedRegister): Added.
889
890 2014-06-27  Beth Dakin  <bdakin@apple.com>
891
892         Custom scrollbars should not create ScrollbarPainters on Mac
893         https://bugs.webkit.org/show_bug.cgi?id=134406
894         -and corresponding-
895         <rdar://problem/16178301>
896
897         Reviewed by Tim Horton.
898
899         The solution here is to return early in ScrollbarThemeMac::registerScrollbar() if 
900         the scrollbar is custom. However, since this function is called during the 
901         RenderScrollbar and Scrollbar constructor, we need to re-implement 
902         Scrollbar::isCustomScrollbar() to return a member variable that is passed into the 
903         constructor. Otherwise, we will get Scrollbar’s implementation is 
904         isCustomScrollbar() wrongfully returning false since instead of the derived
905         class’s implementation. 
906
907         Scrollbar constructor now has an option parameter isCustomScrollbar that defaults 
908         to false. That value is returned by isCustomScrollbar()
909         * platform/Scrollbar.cpp:
910         (WebCore::Scrollbar::Scrollbar):
911         * platform/Scrollbar.h:
912
913         Return early if this is a custom scrollbar since the rest of the function deals 
914         with creating a native scrollbar and getting it in the right state.
915         * platform/mac/ScrollbarThemeMac.mm:
916         (WebCore::ScrollbarThemeMac::registerScrollbar):
917
918         Send true to the Scrollbar constructor to indicate that this is a custom 
919         scrollbar.
920         * rendering/RenderScrollbar.cpp:
921         (WebCore::RenderScrollbar::RenderScrollbar):
922         * rendering/RenderScrollbar.h:
923
924 2014-06-27  Eric Carlson  <eric.carlson@apple.com>
925
926         [Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
927         https://bugs.webkit.org/show_bug.cgi?id=134401
928
929         Reviewed by Jer Noble.
930
931         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
932         (WebCore::metadataType): Use SOFT_LINK_POINTER_OPTIONAL for AVMetadataKeySpaceISOUserData
933             so we don't have problems on OS versions where it isn't defined.
934
935 2014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
936
937         REGRESSION (r168685): css calc() expression fails 
938         https://bugs.webkit.org/show_bug.cgi?id=134059
939
940         The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
941         because primitiveType() function in CSSCalculationValue.cpp has handled
942         CalcPercentLength and CalcPercentNumber categories as if they were angles.
943         The patch fixes this incorrect behavior.
944
945         Reviewed by Simon Fraser.
946
947         Test: fast/css/calc-percentage-pixel.html
948
949         * css/CSSCalculationValue.cpp:
950
951 2014-06-27  Jer Noble  <jer.noble@apple.com>
952
953         [MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
954         https://bugs.webkit.org/show_bug.cgi?id=134389
955
956         Reviewed by Eric Carlson.
957
958         Two subtests in mediasource-append-buffer.html are failing. Bring setDuration() up to spec
959         by throwing an exception if the duration is called while any SourceBuffer is updating. Do
960         not cancel pending events when a SourceBuffer is removed from its MediaSource. And mark the
961         SourceBuffer as having pending activity if there are pending events to be fired.
962
963         * Modules/mediasource/MediaSource.cpp:
964         (WebCore::MediaSource::setDuration):
965         * Modules/mediasource/SourceBuffer.cpp:
966         (WebCore::SourceBuffer::removedFromMediaSource):
967         (WebCore::SourceBuffer::hasPendingActivity):
968
969 2014-06-26  Simon Fraser  <simon.fraser@apple.com>
970
971         [iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
972         https://bugs.webkit.org/show_bug.cgi?id=134377
973         <rdar://problem/16762224>
974
975         Reviewed by Tim Horton.
976         
977         Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
978         has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
979         contexts.
980         
981         An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
982         and needs to truncate the scrolled content on the left side. To pass the
983         correct geometry to the UI process, we need to introduce the concept of
984         "reachable" size as well as total content size; normally these are the same,
985         but will differ when scrolling is only allowed on one axis but there is overflow
986         on both axes.
987         
988         To get the reachable size, add RenderLayer::scrollableContentsSize().
989         
990         RenderLayer::visibleSize() was wrong; the function should return the size of the 
991         scrollable portion, but used layer size which includes borders. Fix to use pixelSnappedClientWidth()/Height(),
992         which is what we use for scrollbar computations.
993
994         * WebCore.exp.in:
995         * page/scrolling/AsyncScrollingCoordinator.cpp:
996         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
997         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
998         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
999         * page/scrolling/ScrollingCoordinator.h:
1000         * page/scrolling/ScrollingStateScrollingNode.cpp:
1001         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1002         (WebCore::ScrollingStateScrollingNode::setReachableContentsSize):
1003         * page/scrolling/ScrollingStateScrollingNode.h:
1004         (WebCore::ScrollingStateScrollingNode::reachableContentsSize):
1005         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1006         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1007         * page/scrolling/ScrollingTreeScrollingNode.h:
1008         (WebCore::ScrollingTreeScrollingNode::reachableContentsSize):
1009         * rendering/RenderLayer.cpp:
1010         (WebCore::RenderLayer::visibleSize):
1011         (WebCore::RenderLayer::scrollableContentsSize):
1012         * rendering/RenderLayer.h:
1013         * rendering/RenderLayerCompositor.cpp:
1014         (WebCore::updateScrollingLayerWithClient):
1015         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1016
1017 2014-06-27  Bear Travis  <betravis@adobe.com>
1018
1019         [Feature Queries] Fix feature queries build on Mac
1020         https://bugs.webkit.org/show_bug.cgi?id=134359
1021
1022         Reviewed by Antti Koivisto.
1023
1024         Update the XCode project and Feature Queries code to build on Mac.
1025
1026         There are existing tests for supports in the LayoutTests/css3 directory.
1027
1028         * WebCore.xcodeproj/project.pbxproj: Add the Feature Queries files
1029         to the XCode project.
1030         * css/CSSGrammar.y.in: Update CSSParserExpression to CSSParserValueList.
1031         * css/DOMWindowCSS.idl: Add ImplementationLacksVTable metadata.
1032
1033 2014-06-27  Jer Noble  <jer.noble@apple.com>
1034
1035         [MSE] media/media-source/media-source-tracks.html is crashy
1036         https://bugs.webkit.org/show_bug.cgi?id=134385
1037
1038         Reviewed by Eric Carlson.
1039
1040         Fix the refactoring error (self assignment) introduced by r170488.
1041
1042         * Modules/mediasource/SourceBuffer.cpp:
1043         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1044
1045 2014-06-27  Mark Hahnenberg  <mhahnenberg@apple.com>
1046
1047         XHR should keep attributes on instance
1048         https://bugs.webkit.org/show_bug.cgi?id=134363
1049
1050         Reviewed by Sam Weinig.
1051
1052         Test: js/dom/xhr-prototype-define-property.html
1053
1054         Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
1055         not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.
1056
1057         * bindings/scripts/CodeGeneratorJS.pm:
1058         (InterfaceRequiresAttributesOnInstanceForCompatibility):
1059
1060 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
1061
1062         removeCodedFrames should modify ref to TrackBuffer no a copy.
1063         https://bugs.webkit.org/show_bug.cgi?id=134380
1064
1065         Reviewed by Daniel Bates.
1066
1067         * Modules/mediasource/SourceBuffer.cpp:
1068         (WebCore::SourceBuffer::removeCodedFrames):
1069         Iterate with a reference.
1070
1071 2014-06-27  Zalan Bujtas  <zalan@apple.com>
1072
1073         Set cliprect radius unconditionally in RenderLayer.
1074         https://bugs.webkit.org/show_bug.cgi?id=134396
1075
1076         Reviewed by Simon Fraser.
1077
1078         No change in functionality.
1079
1080         * rendering/RenderLayer.cpp:
1081         (WebCore::RenderLayer::calculateClipRects):
1082
1083 2014-06-27  Manuel Rego Casasnovas  <rego@igalia.com>
1084
1085         [CSS Grid Layout] Interaction between auto-placement and column / row spanning
1086         https://bugs.webkit.org/show_bug.cgi?id=110633
1087
1088         Reviewed by Sergio Villar Senin.
1089
1090         Modify auto-placement algorithm in order to support span in both
1091         definite and automatic positions.
1092
1093         This patch fixes examples like:
1094         grid-row: auto;
1095         grid-column: 2 / span 3;
1096
1097         And also:
1098         grid-row: auto;
1099         grid-column: span 3;
1100
1101         Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
1102                fast/css-grid-layout/grid-item-auto-placement-definite-span.html
1103
1104         * rendering/RenderGrid.cpp:
1105         (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
1106         checks if a grid area is or not empty.
1107         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
1108         that now receives two arguments with the span value in both directions.
1109         (WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
1110         method to grow in both directions at the same time if needed. It ensures
1111         that the grid is big enough to insert a new item.
1112         (WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
1113         receives a GridCoordinate. It uses ensureGridSize() before inserting the
1114         item in the grid.
1115         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
1116         the grid is big enough to place the largest span for auto-positioned
1117         items.
1118         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1119         New method that returns a GridCoordinate outside current grid with the
1120         requested dimensions.
1121         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
1122         method to calculate the item's span and use the new version of
1123         nextEmptyGridArea(). If an empty area is not found it uses
1124         createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
1125         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
1126         (WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
1127         * rendering/RenderGrid.h: Modify methods headers and add new method
1128         signature.
1129         * rendering/style/GridCoordinate.h:
1130         (WebCore::GridSpan::integerSpan): Add new simple method to return the
1131         span value of a position.
1132         * rendering/style/GridResolvedPosition.cpp:
1133         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
1134         Implement method to take into account span in auto-placement algorithm.
1135         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
1136         checks related with named grid line spans in auto-positioned items,
1137         which is not allowed according to the spec.
1138         * rendering/style/GridResolvedPosition.h: Update method header.
1139
1140 2014-06-27  Mahesh Kulkarni  <mahesh.kk@samsung.com>
1141
1142         [XHR] open method must uppercase only standard method types
1143         https://bugs.webkit.org/show_bug.cgi?id=134264
1144
1145         Reviewed by Darin Adler.
1146
1147         As per step-5 of http://xhr.spec.whatwg.org/#the-open()-method only
1148         DELETE, PUT, GET, POST, OPTIONS, HEAD are standard. Use other methods as is without case change.
1149         All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
1150         This merges blink changes from r176592.
1151
1152         Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
1153                http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
1154
1155         * xml/XMLHttpRequest.cpp:
1156         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
1157
1158 2014-06-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1159
1160         Increase priority on SharedTimer source.
1161         http://bugs.webkit.org/show_bug.cgi?id=134109
1162
1163         While running webkit on a Debian virtual machine I stumbled upon an issue where JS
1164         setTimeout callbacks were not being properly invoked due to machine limitations and the
1165         usage of a low priority on setTimeout timers.
1166
1167         This patch increases the SharedTimer source priority to use the default glib priority which
1168         fixes the issue, making setTimeout JS calls work properly on the test environment.
1169
1170         Reviewed by Gustavo Noronha Silva.
1171
1172         * platform/gtk/SharedTimerGtk.cpp:
1173         (WebCore::setSharedTimerFireInterval):
1174
1175 2014-06-27  Zalan Bujtas  <zalan@apple.com>
1176
1177         Remove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
1178         https://bugs.webkit.org/show_bug.cgi?id=134378
1179
1180         Reviewed by Simon Fraser.
1181
1182         No change in functionality.
1183
1184         * rendering/RenderLayer.cpp:
1185         (WebCore::RenderLayer::calculateClipRects):
1186
1187 2014-06-27  Philippe Normand  <pnormand@igalia.com>
1188
1189         [GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
1190         https://bugs.webkit.org/show_bug.cgi?id=133605
1191
1192         Reviewed by Carlos Garcia Campos.
1193
1194         Don't attempt to load blank URLs with the GStreamer media
1195         player. Those URLs trigger the codec installer which is useless in
1196         this scenario. This patch also renames some of the variables of
1197         the ::load method, as suggested by Carlos.
1198
1199         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1200         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1201         Check video-sink validity before disconnecting its signal handlers.
1202         (WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
1203         URLs (about:blank).
1204         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1205         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1206         Disconnect repaint handler only if it's valid.
1207
1208 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1209
1210         [GTK] Expose getter and setter functions for attributes named type
1211         https://bugs.webkit.org/show_bug.cgi?id=134300
1212
1213         Reviewed by Martin Robinson.
1214
1215         We skip those because the getter conflicts with the get_type()
1216         function of all GObjects. We should use a different name for them. As
1217         a general rule we use the last word of the class name, something like:
1218
1219           webkit_dom_blob_get_type() -> webkit_dom_blob_get_blob_type()
1220           webkit_dom_event_get_type() -> webkit_dom_event_get_event_type()
1221
1222         It's consistent with other existing DOM methods like
1223         webkit_dom_xpath_result_get_result_type() or webkit_dom_css_value_get_css_value_type().
1224         This patch also adds some exceptions for particular cases.
1225
1226         * bindings/gobject/webkitdom.symbols: Add new public symbols.
1227         * bindings/scripts/CodeGeneratorGObject.pm:
1228         (GetFunctionSigName): Helper function to return the function name
1229         that takes into account all exceptions when generating getters and
1230         setters of attributes named type. Otherwise the name is returned unmodified.
1231         (GenerateFunction): Use GetFunctionSigName().
1232         (GenerateFunctions): Do not skip functions for type attributes.
1233
1234 2014-06-27  Sungmann Cho  <sungmann.cho@navercorp.com>
1235
1236         Remove unnecessary #include in HistoryController
1237         https://bugs.webkit.org/show_bug.cgi?id=134369
1238
1239         Reviewed by Daniel Bates.
1240
1241         After the landing of https://webkit.org/b/130099, HistoryController doesn't need
1242         WebCore::Settings class. So we can remove the related header.
1243
1244         * loader/HistoryController.cpp:
1245
1246 2014-06-26  Jeongeun Kim  <je_julie.kim@samsung.com>
1247
1248         REGRESSION (r170287): SVGDocumentExtensions::rebuildElements() called on removed element
1249         https://bugs.webkit.org/show_bug.cgi?id=134304
1250
1251         Reviewed by Daniel Bates.
1252
1253         Roll out <http://trac.webkit.org/170287> (https://bugs.webkit.org/show_bug.cgi?id=134186)
1254         as it led to SVGDocumentExtensions::rebuildElements() being called on an element(s) that
1255         may no longer be in the document.
1256
1257         * dom/ContainerNode.cpp:
1258         (WebCore::ContainerNode::removeChild):
1259         (WebCore::ContainerNode::removeChildren):
1260         * dom/Document.cpp:
1261         (WebCore::Document::commonTeardown):
1262         (WebCore::Document::implicitClose):
1263         * history/CachedFrame.cpp:
1264         (WebCore::CachedFrameBase::restore):
1265         * svg/SVGDocumentExtensions.cpp:
1266         (WebCore::SVGDocumentExtensions::startAnimations):
1267         (WebCore::SVGDocumentExtensions::pauseAnimations):
1268         (WebCore::SVGDocumentExtensions::unpauseAnimations):
1269         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
1270         (WebCore::SVGDocumentExtensions::rebuildElements):
1271         * svg/SVGDocumentExtensions.h:
1272
1273 2014-06-26  Tim Horton  <timothy_horton@apple.com>
1274
1275         [WK2] Pinch-zoom shadows can overlap headers and footers
1276         https://bugs.webkit.org/show_bug.cgi?id=134372
1277         <rdar://problem/16004095>
1278
1279         Reviewed by Simon Fraser.
1280
1281         * WebCore.exp.in:
1282         * rendering/RenderLayerCompositor.cpp:
1283         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1284         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1285         Put header/footer layers in front of the root content layer instead of behind.
1286         Ideally nothing would ever overlap them, but this will give them precedence regardless.
1287
1288 2014-06-26  David Kilzer  <ddkilzer@apple.com>
1289
1290         [Win] Always NULL-terminate the string in createUTF8String()
1291         <http://webkit.org/b/134353>
1292         <rdar://problem/17471783>
1293
1294         Reviewed by Brent Fulgham.
1295
1296         * plugins/PluginView.cpp:
1297         (WebCore::createUTF8String): Pull out CString length into local
1298         variable.  Switch to use memcpy.  Always NULL-terminate the
1299         string.
1300
1301 2014-06-26  Jer Noble  <jer.noble@apple.com>
1302
1303         [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
1304         https://bugs.webkit.org/show_bug.cgi?id=134367
1305
1306         Reviewed by Darin Adler.
1307
1308         Add a couple of null-checks to protect against methods being called in the brief time
1309         between when the object is created and when it's asked to load.
1310
1311         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1312         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
1313         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
1314
1315 2014-06-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1316
1317         Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
1318         https://bugs.webkit.org/show_bug.cgi?id=134289
1319
1320         Reviewed by Darin Adler.
1321
1322         If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.
1323
1324         No new tests, covered by existing tests.
1325
1326         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1327         (WebCore::verifyProtocolHandlerScheme):
1328
1329 2014-06-26  Benjamin Poulain  <bpoulain@apple.com>
1330
1331         [WK1] Use native touch event's timestamp for DOM touch event
1332         https://bugs.webkit.org/show_bug.cgi?id=134326
1333
1334         Reviewed by Enrica Casucci.
1335
1336         * platform/ios/PlatformEventFactoryIOS.mm:
1337         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
1338         Use device event timestamp to get more accurate timing information. This also removes
1339         the variance introduced by WebKit when computing velocity/acceleration/etc.
1340
1341 2014-06-26  Balazs Kelemen  <b.kelemen@samsung.com>
1342
1343         Memcache migth not be pruned when it should for https pages
1344         https://bugs.webkit.org/show_bug.cgi?id=134361
1345
1346         Reviewed by Geoffrey Garen.
1347
1348         There is no reason we should not try to prune in case of a https resource.
1349
1350         No observable change in behavior, no tests.
1351
1352         * loader/cache/CachedResource.cpp:
1353         (WebCore::CachedResource::removeClient):
1354         Call prune unconditionally and remove an unnecessary branch.
1355
1356 2014-06-26  Alexey Proskuryakov  <ap@apple.com>
1357
1358         REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
1359         https://bugs.webkit.org/show_bug.cgi?id=133882
1360         <rdar://problem/17271965>
1361
1362         Reviewed by Brady Eidson.
1363
1364         This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
1365         and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
1366         which still use the improved approach, and don't count against 6 connections.
1367
1368         * loader/ResourceLoadScheduler.cpp:
1369         (WebCore::ResourceLoadScheduler::scheduleLoad):
1370         * platform/network/cf/ResourceRequest.h:
1371         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
1372         * platform/network/cf/ResourceRequestCFNet.cpp:
1373         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1374         (WebCore::ResourceRequest::doUpdateResourceRequest):
1375         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
1376         * platform/network/mac/ResourceRequestMac.mm:
1377         (WebCore::ResourceRequest::doUpdateResourceRequest):
1378         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1379
1380 2014-06-26  Brady Eidson  <beidson@apple.com>
1381
1382         Remove use of PlatformStrategies for Gamepad API.
1383         https://bugs.webkit.org/show_bug.cgi?id=134348
1384
1385         Reviewed by Dean Jackson.
1386
1387         No new tests (Not yet a tested config)
1388
1389         Introduce a virtual GamepadProvider with a process-global shared provider.
1390         The base implementation of the GamepadProvider does nothing.
1391         * platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
1392         (WebCore::GamepadProvider::shared):
1393         (WebCore::GamepadProvider::setSharedProvider):
1394         (WebCore::GamepadProvider::startMonitoringGamepads):
1395         (WebCore::GamepadProvider::stopMonitoringGamepads):
1396         (WebCore::GamepadProvider::platformGamepads):
1397         * platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
1398         (WebCore::GamepadProvider::~GamepadProvider):
1399
1400         * platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
1401         (WebCore::GamepadProviderClient::~GamepadProviderClient):
1402
1403         GamepadManager is now a GamepadProviderClient:
1404         * Modules/gamepad/GamepadManager.cpp:
1405         (WebCore::GamepadManager::GamepadManager):
1406         (WebCore::GamepadManager::registerNavigator):
1407         (WebCore::GamepadManager::unregisterNavigator):
1408         * Modules/gamepad/GamepadManager.h:
1409
1410         Remove the GamepadStrategy altogether:
1411         * platform/PlatformStrategies.h:
1412         (WebCore::PlatformStrategies::PlatformStrategies):
1413         (WebCore::PlatformStrategies::gamepadStrategy): Deleted.
1414
1415         Call to the shared GamepadProvider instead of the strategy:
1416         * Modules/gamepad/NavigatorGamepad.cpp:
1417         (WebCore::NavigatorGamepad::gamepads):
1418         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
1419         (WebCore::NavigatorGamepad::gamepadConnected):
1420
1421         HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
1422         LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
1423         * platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
1424         (WebCore::deviceMatchingDictionary):
1425         (WebCore::deviceAddedCallback):
1426         (WebCore::deviceRemovedCallback):
1427         (WebCore::deviceValuesChangedCallback):
1428         (WebCore::HIDGamepadProvider::shared):
1429         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
1430         (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
1431         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
1432         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
1433         (WebCore::HIDGamepadProvider::deviceAdded):
1434         (WebCore::HIDGamepadProvider::deviceRemoved):
1435         (WebCore::HIDGamepadProvider::valuesChanged):
1436         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
1437         * platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
1438         (WebCore::HIDGamepadProvider::platformGamepads):
1439         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):
1440
1441         * WebCore.exp.in:
1442         * WebCore.xcodeproj/project.pbxproj:
1443
1444         * platform/mac/HIDGamepad.h: Fix incorrect comment
1445
1446 2014-06-26  Andreas Kling  <akling@apple.com>
1447
1448         Skip memcmp()ing fully downloaded resources after they become mmap()able.
1449         <https://webkit.org/b/134362>
1450
1451         When we receive word that a downloaded resource is now available for mmap()ing
1452         from the file system, we don't need to compare against the buffered data,
1453         since even if there were a mismatch, the cached version should be the canonical one.
1454
1455         This was added as belt-and-suspenders while the supporting mechanism was being
1456         developed in CFNetwork, and there's no evidence of a race today. This change
1457         turns the runtime checks into debug-only assertions.
1458
1459         Saves ~300ms of main thread time on PLT.
1460
1461         Reviewed by Geoff Garen.
1462
1463         * loader/cache/CachedResource.cpp:
1464         (WebCore::CachedResource::tryReplaceEncodedData):
1465
1466 2014-06-26  Jer Noble  <jer.noble@apple.com>
1467
1468         [MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
1469         https://bugs.webkit.org/show_bug.cgi?id=134352
1470
1471         Reviewed by Darin Adler.
1472
1473         Use C++11 style for-loops where appropriate in SourceBuffer now that the
1474         SampleMap ordered objects support them.
1475
1476         * Modules/mediasource/SourceBuffer.cpp:
1477         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
1478         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
1479         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1480         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1481         (WebCore::SourceBuffer::validateInitializationSegment):
1482         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1483
1484 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
1485  
1486         [iOS]: Tapping <button> outside of a form is no longer working
1487         https://bugs.webkit.org/show_bug.cgi?id=134319
1488         <rdar://problem/17213346>
1489
1490         Reviewed by Daniel Bates.
1491
1492         Restore behavior of allowing <button> clicks outside of <form>.
1493         This used to be iOS behavior before it was removed in favor of the
1494         OpenSource (Android?) behavior. Now, willRespondToMouseClickEvents
1495         is only used by iOS, so lets restore the iOS behavior.
1496
1497         * html/HTMLButtonElement.cpp:
1498         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
1499
1500 2014-06-26  Jer Noble  <jer.noble@apple.com>
1501
1502         Unreviewed build-fix. Remove unintentionial rename of MediaTime.h -> MediaTimeHash.h.
1503
1504         * Modules/mediasource/SampleMap.h:
1505
1506 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
1507
1508         [iOS] no need to deactivate audio session
1509         https://bugs.webkit.org/show_bug.cgi?id=134350
1510
1511         Reviewed by Jer Noble.
1512
1513         * platform/audio/mac/MediaSessionManagerMac.cpp:
1514         (MediaSessionManager::updateSessionState): Don't bother calling 
1515             AudioSession::setActive(false), WebCore's audio session will be deactivated 
1516             automatically if another application begins playing audio.
1517
1518 2014-06-26  Jer Noble  <jer.noble@apple.com>
1519
1520         [MSE] Refactoring: Differentiate between SampleMap decode and presentation order methods
1521         https://bugs.webkit.org/show_bug.cgi?id=134349
1522
1523         Reviewed by Geoffrey Garen.
1524
1525         Refactor SampleMap to clarify the distinction between methods which return decode-order
1526         iterators and ones which retun presentation-order iterators.
1527
1528         Add two classes, PresentationOrderSampleMap and DecodeOrderSampleMap, to contain the actual
1529         MediaTime-to-Sample maps, and move the methods returning presentation-order and decode-order
1530         iterators to each, respectively.  Rename the {presentation,decode}{Begin,End}() methods to
1531         begin() and end() so the objects can be used in C++11 for-loops.
1532
1533         Update all the call sites in SourceBuffer to use the new ordered objects.
1534
1535         * Modules/mediasource/SampleMap.cpp:
1536         (WebCore::SampleIsLessThanMediaTimeComparator::operator()): Use new ordered objects.
1537         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()): Ditto.
1538         (WebCore::SampleMap::clear): Ditto.
1539         (WebCore::SampleMap::addSample): Ditto.
1540         (WebCore::SampleMap::removeSample): Ditto.
1541         (WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime): Renamed from SampleMap version.
1542         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Ditto.
1543         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Ditto.
1544         (WebCore::PresentationOrderSampleMap::reverseFindSampleContainingPresentationTime): Ditto.
1545         (WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime): Ditto.
1546         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Ditto.
1547         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Ditto.
1548         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeIterator): Ditto.
1549         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
1550         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Ditto.
1551         (WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes): Ditto.
1552         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange): Ditto.
1553         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
1554         * Modules/mediasource/SampleMap.h:
1555         (WebCore::PresentationOrderSampleMap::begin): Renamed from presentationBegin().
1556         (WebCore::PresentationOrderSampleMap::end): Renamed from presentationEnd().
1557         (WebCore::PresentationOrderSampleMap::rbegin): Renamed from reversePresentationBegin().
1558         (WebCore::PresentationOrderSampleMap::rend): Renamed from reversePresentationEnd().
1559         (WebCore::DecodeOrderSampleMap::begin): Renamed from decodeBegin().
1560         (WebCore::DecodeOrderSampleMap::end): Renamed from decodeEnd().
1561         (WebCore::DecodeOrderSampleMap::rbegin): Renamed from reverseDecodeBegin().
1562         (WebCore::DecodeOrderSampleMap::rend): Renamed from reverseDecodeEnd().
1563         (WebCore::SampleMap::SampleMap): Create new ordered objects.
1564         (WebCore::SampleMap::sizeInBytes): Use new ordered objects.
1565         (WebCore::SampleMap::decodeOrder): Simple accessor.
1566         (WebCore::SampleMap::presentationOrder): Simple accessor.
1567         * Modules/mediasource/SourceBuffer.cpp:
1568         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Use new ordered objects.
1569         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Ditto.
1570         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
1571         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
1572         (WebCore::SourceBuffer::bufferedSamplesForTrackID): Ditto.
1573
1574 2014-06-26  Chris Fleizach  <cfleizach@apple.com>
1575
1576         Add an undo group for each dictated utterance in WebKit
1577         https://bugs.webkit.org/show_bug.cgi?id=134086
1578
1579         Applied review comments from Sam Weinig.
1580
1581         Move the associated USE #define into Platform.h.
1582  
1583         * WebCore.xcodeproj/project.pbxproj:
1584         * editing/mac/TextUndoInsertionMarkup.h: Removed.
1585         * editing/mac/TextUndoInsertionMarkupMac.h:
1586
1587 2014-06-26  Shivakumar JM  <shiva.jm@samsung.com>
1588
1589         [EFL][WK2] Fix Debug Build Error in Webcore module.
1590         https://bugs.webkit.org/show_bug.cgi?id=134345
1591
1592         Reviewed by Zalan Bujtas.
1593
1594         Use static cast to change the type of variable to fix error
1595
1596         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1597         (WebCore::HarfBuzzShaper::setDrawRange):
1598
1599 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
1600
1601         [Mac] allow host application to canonicalize media urls
1602         https://bugs.webkit.org/show_bug.cgi?id=134329
1603
1604         Reviewed by Dean Jackson.
1605
1606         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1607         (WebCore::canonicalURL): New, use NSURLProtocol to canonicalize a URL.
1608         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Call canonicalURL.
1609
1610 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1611
1612         [GTK] Add padding for future expansion to WebKitDOMEventTargetIface
1613         https://bugs.webkit.org/show_bug.cgi?id=134298
1614
1615         Reviewed by Martin Robinson.
1616
1617         * bindings/gobject/WebKitDOMEventTarget.h:
1618
1619 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1620
1621         [GTK] Add support for constants in GObject DOM bindings
1622         https://bugs.webkit.org/show_bug.cgi?id=133983
1623
1624         Reviewed by Martin Robinson.
1625
1626         * bindings/gobject/webkitdom.symbols: Add stable constants.
1627         * bindings/scripts/CodeGeneratorGObject.pm:
1628         (GenerateHeader): Add constants to the header.
1629         (Generate): Pass the interface object to GenerateHeader to get the constants
1630         (IsInterfaceSymbol): Helper function that returns whether the given
1631         symbol belongs to the interface. Check also constants now.
1632         (ReadStableSymbols): Use IsInterfaceSymbol().
1633         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1634         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1635
1636 2014-06-26  Manuel Rego Casasnovas  <rego@igalia.com>
1637
1638         [CSS Grid Layout] Properly support for z-index on grid items
1639         https://bugs.webkit.org/show_bug.cgi?id=103329
1640
1641         Reviewed by Benjamin Poulain.
1642
1643         From Blink r157620 by <jchaffraix@chromium.org> and r172402 by
1644         <wangxianzhu@chromium.org>.
1645
1646         The specification says that grid should match flexbox and force
1647         grid items to be stacking context if z-index is set, regardless
1648         of 'position'. After this change, this is what happens.
1649
1650         Previously z-index changes of static positioned objects were ignored.
1651         However, z-index is applicable for some static positioned objects,
1652         such as grid items. Ignoring them makes the object not to be properly
1653         painted on z-index change.
1654
1655         As StyleResolver has ensured that z-index is non-auto only if
1656         applicable, RenderStyle::changeRequiresLayerRepaint() should not check
1657         again (with inconsistent conditions).
1658
1659         Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
1660                fast/css-grid-layout/grid-item-z-index-stacking-context.html
1661                fast/css-grid-layout/grid-item-z-index-support.html
1662
1663         * css/StyleResolver.cpp:
1664         (WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
1665         display is flexbox or grid.
1666         (WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
1667         condition.
1668         * rendering/style/RenderStyle.cpp:
1669         (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
1670         out of non-static positioned objects if.
1671
1672 2014-06-25  Dean Jackson  <dino@apple.com>
1673
1674         HIDGamepad should use CFIndex when looping
1675         https://bugs.webkit.org/show_bug.cgi?id=134337
1676
1677         Reviewed by Dan Bernstein.
1678
1679         * platform/mac/HIDGamepad.cpp:
1680         (WebCore::HIDGamepad::initElementsFromArray): Replace int with CFIndex, and use
1681         a local variable for CFArrayCount.
1682
1683 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
1684
1685         Build fix attempt after r170465.
1686
1687         * platform/mac/HIDGamepad.cpp:
1688         (WebCore::HIDGamepad::initElementsFromArray):
1689
1690 2014-06-25  Dean Jackson  <dino@apple.com>
1691
1692         [Mac] Radio buttons and checkboxes vanish when redrawn
1693         https://bugs.webkit.org/show_bug.cgi?id=134335
1694
1695         Reviewed by Dan Bernstein.
1696
1697         I screwed up when landing r170343 by moving some code around
1698         which broke the logic. We need to query the animation
1699         state for controls after we draw (both statically and animated).
1700
1701         * platform/mac/ThemeMac.mm:
1702         (WebCore::paintToggleButton): We need to check the state of animation again, after
1703         we draw.
1704
1705 2014-06-25  Brady Eidson  <beidson@apple.com>
1706
1707         Add HID-based gamepad implementation for Mac
1708         https://bugs.webkit.org/show_bug.cgi?id=134324
1709
1710         Reviewed by Dean Jackson.
1711
1712         No new tests (Not yet a tested config)
1713
1714         * Modules/gamepad/Gamepad.cpp:
1715         (WebCore::Gamepad::Gamepad):
1716         (WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
1717         * Modules/gamepad/Gamepad.h:
1718
1719         * Modules/gamepad/GamepadButton.h:
1720         (WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.
1721
1722         GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
1723         and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
1724         gamepads to the API layer when a button is pressed:
1725         * Modules/gamepad/GamepadManager.cpp: Added.
1726         (WebCore::GamepadManager::shared):
1727         (WebCore::GamepadManager::GamepadManager):
1728         (WebCore::GamepadManager::platformGamepadConnected):
1729         (WebCore::GamepadManager::platformGamepadDisconnected):
1730         (WebCore::GamepadManager::registerNavigator):
1731         (WebCore::GamepadManager::unregisterNavigator):
1732         * Modules/gamepad/GamepadManager.h:
1733
1734         The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
1735         * Modules/gamepad/NavigatorGamepad.cpp:
1736         (WebCore::NavigatorGamepad::NavigatorGamepad):
1737         (WebCore::NavigatorGamepad::~NavigatorGamepad):
1738         (WebCore::NavigatorGamepad::from):
1739         (WebCore::NavigatorGamepad::gamepads):
1740         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
1741         (WebCore::NavigatorGamepad::gamepadConnected):
1742         (WebCore::NavigatorGamepad::gamepadDisconnected):
1743         * Modules/gamepad/NavigatorGamepad.h:
1744         (WebCore::NavigatorGamepad::navigationStart):
1745
1746         HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
1747         * platform/mac/HIDGamepad.cpp: Added.
1748         (WebCore::HIDGamepad::HIDGamepad):
1749         (WebCore::HIDGamepad::initElements):
1750         (WebCore::HIDGamepad::initElementsFromArray):
1751         (WebCore::HIDGamepad::maybeAddButton):
1752         (WebCore::HIDGamepad::maybeAddAxis):
1753         (WebCore::HIDGamepad::valueChanged):
1754         * platform/mac/HIDGamepad.h: Added.
1755         (WebCore::HIDGamepadElement::HIDGamepadElement):
1756         (WebCore::HIDGamepadElement::~HIDGamepadElement):
1757         (WebCore::HIDGamepadElement::isButton):
1758         (WebCore::HIDGamepadElement::isAxis):
1759         (WebCore::HIDGamepadButton::HIDGamepadButton):
1760         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
1761         (WebCore::HIDGamepad::hidDevice):
1762
1763         HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
1764         devices plugged in to the system:
1765         * platform/mac/HIDGamepadListener.cpp: Added.
1766         (WebCore::deviceMatchingDictionary):
1767         (WebCore::deviceAddedCallback):
1768         (WebCore::deviceRemovedCallback):
1769         (WebCore::deviceValuesChangedCallback):
1770         (WebCore::HIDGamepadListener::shared):
1771         (WebCore::HIDGamepadListener::HIDGamepadListener):
1772         (WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
1773         (WebCore::HIDGamepadListener::deviceAdded):
1774         (WebCore::HIDGamepadListener::deviceRemoved):
1775         (WebCore::HIDGamepadListener::valuesChanged):
1776         (WebCore::HIDGamepadListener::removeGamepadForDevice):
1777         * platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
1778         (WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
1779         (WebCore::HIDGamepadListener::setClient):
1780         (WebCore::HIDGamepadListener::platformGamepads):
1781         (WebCore::HIDGamepadListener::setShouldDispatchCallbacks):
1782
1783         * WebCore.exp.in:
1784         * WebCore.xcodeproj/project.pbxproj:
1785
1786 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
1787
1788         WebProgressTracker updates progress too frequently
1789         https://bugs.webkit.org/show_bug.cgi?id=134185
1790
1791         Reviewed by Tim Horton.
1792
1793         The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
1794         but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.
1795
1796         * loader/ProgressTracker.cpp:
1797         (WebCore::ProgressTracker::ProgressTracker):
1798         (WebCore::ProgressTracker::incrementProgress):
1799         * loader/ProgressTracker.h:
1800
1801 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
1802
1803         [iOS WK2] Fixed position elements jump around when zooming
1804         https://bugs.webkit.org/show_bug.cgi?id=134328
1805         <rdar://problem/17447048>
1806
1807         Reviewed by Zalan Bujtas.
1808
1809         If a given remote layer tree commit contains changes of layers for viewport-constrained
1810         objects, then the associated scrolling tree also needs to show that the layers changed,
1811         since we need to re-run the "viewport changed" logic in the UI process to get the
1812         layers correctly positioned for the current zoom level.
1813         
1814         The bug was that page scale changes resulted in small "pixel alignment" position
1815         changes which touched layers, but we didn't commit any scrolling tree changes. So
1816         the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
1817         update to adjust them for the current transient zoom.
1818
1819         Fix by making use of the existing "alignment offset" field in the ViewportConstraints
1820         data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
1821         fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
1822         nodes were updated.
1823
1824         * page/scrolling/ScrollingConstraints.h:
1825         (WebCore::StickyPositionViewportConstraints::operator==):
1826         * platform/graphics/GraphicsLayer.h:
1827         (WebCore::GraphicsLayer::pixelAlignmentOffset):
1828         * platform/graphics/ca/GraphicsLayerCA.cpp:
1829         (WebCore::GraphicsLayerCA::updateGeometry):
1830         * platform/graphics/ca/GraphicsLayerCA.h:
1831         * rendering/RenderLayerCompositor.cpp:
1832         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
1833         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1834
1835 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
1836
1837         [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
1838         https://bugs.webkit.org/show_bug.cgi?id=134323
1839
1840         Reviewed by Benjamin Poulain.
1841
1842         Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
1843         out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
1844         relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
1845         The width is clamped to get reasonable behavior on wide pages.
1846
1847         * page/FrameView.cpp:
1848         (WebCore::FrameView::rectForViewportConstrainedObjects):
1849
1850 2014-06-25  Brady Eidson  <beidson@apple.com>
1851
1852         Add new platform gamepad abstractions
1853         https://bugs.webkit.org/show_bug.cgi?id=134325
1854
1855         Reviewed by Dean Jackson.
1856
1857         No new tests (Not yet a tested config)
1858
1859         - GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
1860           implementation to feed the API in WebCore.
1861         - GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
1862           for callbacks with the GamepadStrategy.
1863         - PlatformGamepad is a platform-agnostic object that represents the data that
1864           feeds into the Gamepad object that is exposed to web content.
1865
1866         The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
1867         will contain an immediate follow-up patch that uses it.
1868
1869         Makes sense to review them separately.
1870
1871         * WebCore.xcodeproj/project.pbxproj:
1872
1873         * platform/GamepadStrategy.h: Added.
1874         (WebCore::GamepadStrategy::~GamepadStrategy):
1875
1876         * platform/GamepadStrategyClient.h: Added.
1877         (WebCore::GamepadStrategyClient::~GamepadStrategyClient):
1878
1879         * platform/PlatformGamepad.h: Added.
1880         (WebCore::PlatformGamepad::~PlatformGamepad):
1881         (WebCore::PlatformGamepad::id):
1882         (WebCore::PlatformGamepad::lastUpdateTime):
1883         (WebCore::PlatformGamepad::connectTime):
1884         (WebCore::PlatformGamepad::PlatformGamepad):
1885
1886         * platform/PlatformStrategies.h:
1887         (WebCore::PlatformStrategies::gamepadStrategy):
1888         (WebCore::PlatformStrategies::PlatformStrategies):
1889
1890 2014-06-25  Zalan Bujtas  <zalan@apple.com>
1891
1892         Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
1893         https://bugs.webkit.org/show_bug.cgi?id=134288
1894
1895         Reviewed by Simon Fraser.
1896
1897         Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
1898         when checking whether the rounded rectangle is renderable.
1899         We convert both the radius and the rectangle values to CGFloat(float/double) to perform
1900         this renderable check, instead of always using float.
1901
1902         * platform/graphics/FloatRoundedRect.cpp:
1903         (WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
1904         (WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
1905         * platform/graphics/FloatRoundedRect.h:
1906         * platform/graphics/RoundedRect.cpp:
1907         (WebCore::RoundedRect::Radii::scale):
1908         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
1909         * platform/graphics/RoundedRect.h:
1910         * platform/graphics/cg/PathCG.cpp:
1911         (WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow. 
1912
1913 2014-06-25  Jer Noble  <jer.noble@apple.com>
1914
1915         [MSE] removeCodedFrames() can remove more than it should
1916         https://bugs.webkit.org/show_bug.cgi?id=134320
1917
1918         Reviewed by Geoff Garen.
1919
1920         removeCodedFrames() can remove more samples than it should because it compares an iterator
1921         in presentation timespace to one in decode timespace. Clean up this code by removing frames
1922         in decode order. Rename variables and add comments to make explicit which timespace defines
1923         the iterators being used.
1924
1925         * Modules/mediasource/SourceBuffer.cpp:
1926         (WebCore::SourceBuffer::removeCodedFrames):
1927
1928 2014-06-25  Beth Dakin  <bdakin@apple.com>
1929
1930         Crash in ScrollingTree::isRubberBandInProgress()
1931         https://bugs.webkit.org/show_bug.cgi?id=134316
1932         -and corresponding-
1933         <rdar://problem/16247911>
1934
1935         Reviewed by Geoffrey Garen.
1936
1937         This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
1938         which moved the ScrollingNode creation code from ScrollingTree over to 
1939         ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
1940         believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
1941         even though the ScrollingTree was kept alive by the bind call to propagate 
1942         commitNewTreeState() over to the scrolling thread. The fix is to move node 
1943         creation back to the ScrollingTree and to use the this pointer to create new
1944         nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
1945
1946         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
1947         * page/scrolling/AsyncScrollingCoordinator.h:
1948
1949         Re-name createNode to createScrollingTreeNode(). 
1950         * page/scrolling/ScrollingTree.cpp:
1951         (WebCore::ScrollingTree::updateTreeFromStateNode):
1952         * page/scrolling/ScrollingTree.h:
1953
1954         Remove this implementation of createNode that called into the 
1955         ScrollingCoordinator.
1956         * page/scrolling/ThreadedScrollingTree.cpp:
1957         (WebCore::ThreadedScrollingTree::createNode): Deleted.
1958         * page/scrolling/ThreadedScrollingTree.h:
1959
1960         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
1961         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1962         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1963         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
1964
1965         Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
1966         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1967         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
1968         (WebCore::ScrollingTreeIOS::createNode): Deleted.
1969         * page/scrolling/ios/ScrollingTreeIOS.h:
1970
1971         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
1972         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1973         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1974         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
1975
1976         Add the implementation of createScrollingTreeNode() for the Mac to 
1977         ScrollingTreeMac since it can create Mac-specific nodes.
1978         * page/scrolling/mac/ScrollingTreeMac.cpp:
1979         (ScrollingTreeMac::createScrollingTreeNode):
1980         * page/scrolling/mac/ScrollingTreeMac.h:
1981
1982 2014-06-25  Enrica Casucci  <enrica@apple.com>
1983
1984         iOS build fix after http://trac.webkit.org/changeset/170447.
1985         Unreviewed.
1986
1987         * editing/mac/TextUndoInsertionMarkup.h:
1988
1989 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
1990
1991         Add an undo group for each dictated utterance in WebKit
1992         https://bugs.webkit.org/show_bug.cgi?id=134086
1993
1994         Reviewed by Enrica Casucci.
1995
1996         Provide a mechanism for ending the current undo group on a text insertion.
1997         This allows a stream of text, that is normally part of one undo group, to be
1998         broken up so that subsequent undo commands will only undo portions of the text stream.
1999
2000         * WebCore.exp.in:
2001         * WebCore.xcodeproj/project.pbxproj:
2002         * editing/mac/TextUndoInsertionMarkup.h: Added.
2003         * editing/mac/TextUndoInsertionMarkup.mm: Added.
2004         (WebCore::shouldRegisterInsertionUndoGroup):
2005         (WebCore::registerInsertionUndoGrouping):
2006
2007 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2008
2009         [iOS]: WK2 Inspector Node Search
2010         https://bugs.webkit.org/show_bug.cgi?id=134279
2011
2012         Reviewed by Benjamin Poulain.
2013
2014         * WebCore.exp.in:
2015         Export Node::inspect for WebKit2.
2016
2017 2014-06-25  Dana Burkart  <dburkart@apple.com>
2018
2019         Add support for 5-tuple versioning.
2020
2021         Reviewed by David Farler.
2022
2023         * Configurations/Version.xcconfig:
2024
2025 2014-06-25  Jer Noble  <jer.noble@apple.com>
2026
2027         [MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
2028         https://bugs.webkit.org/show_bug.cgi?id=134310
2029
2030         Reviewed by Brent Fulgham.
2031
2032         Tests for zero tolerance seeks were inadvertantly reversed in r170336.
2033
2034         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2035         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2036
2037 2014-06-25  Jer Noble  <jer.noble@apple.com>
2038
2039         [MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
2040         https://bugs.webkit.org/show_bug.cgi?id=134306
2041
2042         Reviewed by Eric Carlson.
2043
2044         Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
2045         and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
2046         gate that rate change on the above.
2047
2048         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2049         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2050         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
2051         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
2052         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
2053         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
2054         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
2055         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
2056         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.
2057
2058 2014-06-25  Jer Noble  <jer.noble@apple.com>
2059
2060         [MSE] Update monitorSourceBuffers to match recent spec changes
2061         https://bugs.webkit.org/show_bug.cgi?id=134305
2062
2063         Reviewed by Eric Carlson.
2064
2065         In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
2066         implementation to match the new text.
2067
2068         * Modules/mediasource/MediaSource.cpp:
2069         (WebCore::MediaSource::monitorSourceBuffers):
2070
2071 2014-06-25  Alex Christensen  <achristensen@webkit.org>
2072             And peavo@outlook.com  <peavo@outlook.com>
2073
2074         Use references instead of pointers in RenderTheme.
2075         https://bugs.webkit.org/show_bug.cgi?id=134261
2076
2077         Reviewed by Zalan Bujtas.
2078
2079         * css/StyleResolver.cpp:
2080         (WebCore::StyleResolver::adjustRenderStyle):
2081         * html/TextFieldInputType.cpp:
2082         (WebCore::TextFieldInputType::shouldHaveSpinButton):
2083         * html/shadow/SliderThumbElement.cpp:
2084         (WebCore::RenderSliderThumb::updateAppearance):
2085         * platform/efl/RenderThemeEfl.cpp:
2086         (WebCore::RenderThemeEfl::adjustSizeConstraints):
2087         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2088         (WebCore::RenderThemeEfl::isControlStyled):
2089         (WebCore::RenderThemeEfl::paintThemePart):
2090         (WebCore::RenderThemeEfl::supportsFocusRing):
2091         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
2092         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
2093         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
2094         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
2095         (WebCore::RenderThemeEfl::adjustRadioStyle):
2096         (WebCore::RenderThemeEfl::adjustButtonStyle):
2097         (WebCore::RenderThemeEfl::adjustMenuListStyle):
2098         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
2099         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
2100         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
2101         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
2102         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
2103         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
2104         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
2105         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
2106         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
2107         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
2108         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
2109         * platform/efl/RenderThemeEfl.h:
2110         * platform/gtk/RenderThemeGtk.cpp:
2111         (WebCore::RenderThemeGtk::supportsFocusRing):
2112         (WebCore::RenderThemeGtk::adjustButtonStyle):
2113         (WebCore::RenderThemeGtk::adjustMenuListStyle):
2114         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
2115         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
2116         (WebCore::adjustSearchFieldIconStyle):
2117         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
2118         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2119         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
2120         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
2121         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
2122         (WebCore::borderRadiiFromStyle):
2123         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2124         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
2125         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
2126         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
2127         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
2128         (WebCore::RenderThemeGtk::animationDurationForProgressBar):
2129         (WebCore::RenderThemeGtk::calculateProgressRect):
2130         * platform/gtk/RenderThemeGtk.h:
2131         * platform/gtk/RenderThemeGtk2.cpp:
2132         (WebCore::setToggleSize):
2133         (WebCore::RenderThemeGtk::setCheckboxSize):
2134         (WebCore::RenderThemeGtk::setRadioSize):
2135         (WebCore::RenderThemeGtk::comboBoxArrowSize):
2136         (WebCore::RenderThemeGtk::getComboBoxPadding):
2137         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
2138         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
2139         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
2140         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
2141         (WebCore::RenderThemeGtk::paintMenuList):
2142         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2143         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2144         * platform/gtk/RenderThemeGtk3.cpp:
2145         (WebCore::setToggleSize):
2146         (WebCore::RenderThemeGtk::setCheckboxSize):
2147         (WebCore::RenderThemeGtk::setRadioSize):
2148         (WebCore::getComboBoxMetrics):
2149         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
2150         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
2151         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
2152         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
2153         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2154         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2155         * rendering/RenderButton.cpp:
2156         (WebCore::RenderButton::layout):
2157         * rendering/RenderInline.cpp:
2158         (WebCore::RenderInline::paintOutline):
2159         * rendering/RenderMediaControls.cpp:
2160         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
2161         * rendering/RenderMediaControls.h:
2162         * rendering/RenderMenuList.cpp:
2163         (WebCore::RenderMenuList::adjustInnerStyle):
2164         (RenderMenuList::computeIntrinsicLogicalWidths):
2165         (RenderMenuList::menuStyle):
2166         * rendering/RenderMeter.cpp:
2167         (WebCore::RenderMeter::updateLogicalWidth):
2168         (WebCore::RenderMeter::computeLogicalHeight):
2169         * rendering/RenderObject.cpp:
2170         (WebCore::RenderObject::paintOutline):
2171         * rendering/RenderProgress.cpp:
2172         (WebCore::RenderProgress::updateAnimationState):
2173         * rendering/RenderTextControlSingleLine.cpp:
2174         (WebCore::RenderTextControlSingleLine::layout):
2175         * rendering/RenderTheme.cpp:
2176         (WebCore::RenderTheme::adjustStyle):
2177         (WebCore::RenderTheme::isControlStyled):
2178         (WebCore::RenderTheme::supportsFocusRing):
2179         (WebCore::RenderTheme::stateChanged):
2180         (WebCore::RenderTheme::adjustCheckboxStyle):
2181         (WebCore::RenderTheme::adjustRadioStyle):
2182         (WebCore::RenderTheme::adjustButtonStyle):
2183         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
2184         (WebCore::RenderTheme::adjustTextFieldStyle):
2185         (WebCore::RenderTheme::adjustTextAreaStyle):
2186         (WebCore::RenderTheme::adjustMenuListStyle):
2187         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
2188         (WebCore::RenderTheme::adjustMeterStyle):
2189         (WebCore::RenderTheme::meterSizeForBounds):
2190         (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
2191         (WebCore::RenderTheme::animationDurationForProgressBar):
2192         (WebCore::RenderTheme::adjustProgressBarStyle):
2193         (WebCore::RenderTheme::shouldHaveSpinButton):
2194         (WebCore::RenderTheme::adjustMediaControlStyle):
2195         (WebCore::RenderTheme::adjustSliderTrackStyle):
2196         (WebCore::RenderTheme::adjustSliderThumbStyle):
2197         (WebCore::RenderTheme::adjustSliderThumbSize):
2198         (WebCore::RenderTheme::adjustSearchFieldStyle):
2199         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
2200         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
2201         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
2202         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
2203         * rendering/RenderTheme.h:
2204         (WebCore::RenderTheme::supportsHover):
2205         (WebCore::RenderTheme::minimumMenuListSize):
2206         (WebCore::RenderTheme::popupInternalPaddingLeft):
2207         (WebCore::RenderTheme::popupInternalPaddingRight):
2208         (WebCore::RenderTheme::popupInternalPaddingTop):
2209         (WebCore::RenderTheme::popupInternalPaddingBottom):
2210         (WebCore::RenderTheme::popupMenuSize):
2211         (WebCore::RenderTheme::setCheckboxSize):
2212         (WebCore::RenderTheme::setRadioSize):
2213         (WebCore::RenderTheme::setButtonSize):
2214         * rendering/RenderThemeIOS.h:
2215         * rendering/RenderThemeIOS.mm:
2216         (WebCore::RenderThemeIOS::adjustCheckboxStyle):
2217         (WebCore::RenderThemeIOS::isControlStyled):
2218         (WebCore::RenderThemeIOS::adjustRadioStyle):
2219         (WebCore::RenderThemeIOS::popupInternalPaddingRight):
2220         (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
2221         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
2222         (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
2223         (WebCore::RenderThemeIOS::adjustSliderThumbSize):
2224         (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
2225         (WebCore::RenderThemeIOS::animationDurationForProgressBar):
2226         (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
2227         (WebCore::RenderThemeIOS::adjustButtonStyle):
2228         (WebCore::RenderThemeIOS::setButtonSize):
2229         (WebCore::RenderThemeIOS::shouldHaveSpinButton):
2230         * rendering/RenderThemeMac.h:
2231         * rendering/RenderThemeMac.mm:
2232         (WebCore::RenderThemeMac::isControlStyled):
2233         (WebCore::RenderThemeMac::controlSizeForFont):
2234         (WebCore::RenderThemeMac::sizeForFont):
2235         (WebCore::RenderThemeMac::sizeForSystemFont):
2236         (WebCore::RenderThemeMac::setSizeFromFont):
2237         (WebCore::RenderThemeMac::setFontFromControlSize):
2238         (WebCore::RenderThemeMac::controlSizeForSystemFont):
2239         (WebCore::RenderThemeMac::adjustTextFieldStyle):
2240         (WebCore::RenderThemeMac::adjustTextAreaStyle):
2241         (WebCore::RenderThemeMac::paintMenuList):
2242         (WebCore::RenderThemeMac::meterSizeForBounds):
2243         (WebCore::RenderThemeMac::paintMeter):
2244         (WebCore::RenderThemeMac::levelIndicatorFor):
2245         (WebCore::RenderThemeMac::progressBarRectForBounds):
2246         (WebCore::RenderThemeMac::minimumProgressBarHeight):
2247         (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
2248         (WebCore::RenderThemeMac::animationDurationForProgressBar):
2249         (WebCore::RenderThemeMac::adjustProgressBarStyle):
2250         (WebCore::RenderThemeMac::paintProgressBar):
2251         (WebCore::RenderThemeMac::adjustMenuListStyle):
2252         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
2253         (WebCore::RenderThemeMac::popupInternalPaddingRight):
2254         (WebCore::RenderThemeMac::popupInternalPaddingTop):
2255         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
2256         (WebCore::RenderThemeMac::popupMenuSize):
2257         (WebCore::RenderThemeMac::minimumMenuListSize):
2258         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
2259         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
2260         (WebCore::RenderThemeMac::setSearchCellState):
2261         (WebCore::RenderThemeMac::setSearchFieldSize):
2262         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
2263         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
2264         (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
2265         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
2266         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
2267         (WebCore::RenderThemeMac::adjustSliderThumbSize):
2268         * rendering/RenderThemeSafari.cpp:
2269         (WebCore::RenderThemeSafari::isControlStyled):
2270         (WebCore::RenderThemeSafari::adjustRepaintRect):
2271         (WebCore::RenderThemeSafari::baselinePosition):
2272         (WebCore::RenderThemeSafari::controlSizeForFont):
2273         (WebCore::RenderThemeSafari::sizeForFont):
2274         (WebCore::RenderThemeSafari::sizeForSystemFont):
2275         (WebCore::RenderThemeSafari::setSizeFromFont):
2276         (WebCore::RenderThemeSafari::setFontFromControlSize):
2277         (WebCore::RenderThemeSafari::controlSizeForSystemFont):
2278         (WebCore::RenderThemeSafari::paintCheckbox):
2279         (WebCore::RenderThemeSafari::setCheckboxSize):
2280         (WebCore::RenderThemeSafari::paintRadio):
2281         (WebCore::RenderThemeSafari::setRadioSize):
2282         (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
2283         (WebCore::RenderThemeSafari::adjustButtonStyle):
2284         (WebCore::RenderThemeSafari::setButtonSize):
2285         (WebCore::RenderThemeSafari::adjustTextFieldStyle):
2286         (WebCore::RenderThemeSafari::adjustTextAreaStyle):
2287         (WebCore::RenderThemeSafari::paintMenuList):
2288         (WebCore::RenderThemeSafari::adjustMenuListStyle):
2289         (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
2290         (WebCore::RenderThemeSafari::popupInternalPaddingRight):
2291         (WebCore::RenderThemeSafari::popupInternalPaddingTop):
2292         (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
2293         (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
2294         (WebCore::RenderThemeSafari::minimumMenuListSize):
2295         (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
2296         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2297         (WebCore::RenderThemeSafari::setSearchFieldSize):
2298         (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
2299         (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
2300         (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
2301         (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
2302         (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
2303         (WebCore::RenderThemeSafari::adjustMeterStyle):
2304         (WebCore::RenderThemeSafari::meterSizeForBounds):
2305         (WebCore::RenderThemeSafari::paintMeter):
2306         * rendering/RenderThemeSafari.h:
2307         * rendering/RenderThemeWin.cpp:
2308         (WebCore::RenderThemeWin::supportsHover):
2309         (WebCore::RenderThemeWin::supportsFocusRing):
2310         (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
2311         (WebCore::RenderThemeWin::setCheckboxSize):
2312         (WebCore::RenderThemeWin::paintTextField):
2313         (WebCore::RenderThemeWin::paintMenuList):
2314         (WebCore::RenderThemeWin::adjustMenuListStyle):
2315         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
2316         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2317         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
2318         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
2319         (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
2320         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
2321         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
2322         (WebCore::RenderThemeWin::adjustMeterStyle):
2323         (WebCore::RenderThemeWin::meterSizeForBounds):
2324         (WebCore::RenderThemeWin::paintMeter):
2325         * rendering/RenderThemeWin.h:
2326         (WebCore::RenderThemeWin::paintCheckbox):
2327         (WebCore::RenderThemeWin::paintRadio):
2328         (WebCore::RenderThemeWin::setRadioSize):
2329         (WebCore::RenderThemeWin::paintTextArea):
2330         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
2331         (WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
2332         (WebCore::RenderThemeWin::adjustButtonStyle):
2333         (WebCore::RenderThemeWin::adjustTextFieldStyle):
2334         (WebCore::RenderThemeWin::adjustTextAreaStyle):
2335         (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
2336
2337 2014-06-25  Benjamin Poulain  <benjamin@webkit.org>
2338
2339         [Mac] Update the time base of event's timestamp when the system time changes
2340         https://bugs.webkit.org/show_bug.cgi?id=134293
2341
2342         Reviewed by Anders Carlsson.
2343
2344         * platform/mac/PlatformEventFactoryMac.mm:
2345         (WebCore::cachedStartupTimeIntervalSince1970): Since events timestamps are absolute time, they also
2346         need to be updated if the system clock changes.
2347
2348 2014-06-25  Dirk Schulze  <krit@webkit.org>
2349
2350         Add all blend modes to feBlend
2351
2352         feBlend should support all blend modes from CSS and Canvas
2353         https://bugs.webkit.org/show_bug.cgi?id=134296
2354
2355         Reviewed by Dean Jackson.
2356
2357         Add all blend modes to <feBlend> (the SVG filter primitive) that are also
2358         supported by HTML Canvas and CSS.
2359
2360         In addition, add "normal" blend mode to HTML Canvas as requested by the
2361         CSS Compositing and Blending specification. (Referenced from HTML Canvas.)
2362         With this change, SVG, CSS and Canvas truly share the same blend modes and
2363         even the same keywords. This is much easier to for web authors.
2364
2365         http://www.w3.org/TR/2014/CR-compositing-1-20140220/#ltblendmodegt
2366
2367         Test: svg/filters/feBlend-all-blendmodes.svg
2368
2369         * platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match
2370             enumeration order. Add a new function to parse blend modes independent of
2371             compositing modes. Add a string "normal" that is supported by CSS, feBlend and
2372             HTML Canvas now.
2373         (WebCore::parseBlendMode):
2374         (WebCore::parseCompositeAndBlendOperator):
2375         * platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match
2376          the SVG JS enumeration for blend modes.
2377         * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no
2378             longer required by the software path but still used by NEON here.
2379         (WebCore::FEBlend::platformApplySoftware):
2380         (WebCore::FEBlend::platformApplyNEON):
2381         * platform/graphics/filters/FEBlend.cpp:
2382             Use drawImageBuffer() to blend the results of previous filter primitives. This
2383             allows removing more than 60% of the code.
2384         (WebCore::FEBlend::FEBlend):
2385         (WebCore::FEBlend::create):
2386         (WebCore::FEBlend::blendMode):
2387         (WebCore::FEBlend::setBlendMode):
2388         (WebCore::FEBlend::platformApplySoftware):
2389         (WebCore::FEBlend::dump):
2390         (WebCore::FEBlend::externalRepresentation):
2391         (WebCore::feBlendNormal): Deleted.
2392         (WebCore::feBlendMultiply): Deleted.
2393         (WebCore::feBlendScreen): Deleted.
2394         (WebCore::feBlendDarken): Deleted.
2395         (WebCore::feBlendLighten): Deleted.
2396         (WebCore::feBlendUnknown): Deleted.
2397         (WebCore::platformApply): Deleted.
2398         (WebCore::FEBlend::platformApplyGeneric): Deleted.
2399         (WebCore::operator<<): Deleted.
2400         * platform/graphics/filters/FEBlend.h:
2401         * svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration.
2402         (WebCore::enumerationValueForTargetAttribute):
2403         * svg/SVGFEBlendElement.cpp:
2404         (WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration.
2405             No new enumeration values added or exposed to SVG DOM as requested by SVG WG.
2406         (WebCore::SVGFEBlendElement::parseAttribute):
2407         * svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove
2408             blend mode parsing code and use the code in GraphicsTypes instead.
2409         (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
2410         (WebCore::SVGPropertyTraits<BlendMode>::toString):
2411         (WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted.
2412         (WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted.
2413         (WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted.
2414
2415 2014-06-25  Zalan Bujtas  <zalan@apple.com>
2416
2417         Unreviewed iOS build fix after r170425.
2418
2419         * accessibility/AccessibilityProgressIndicator.cpp:
2420         * accessibility/AccessibilityProgressIndicator.h:
2421
2422 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
2423
2424         AX: Crash at com.apple.WebCore: WebCore::AlternativeTextController::removeDictationAlternativesForMarker + 43
2425         https://bugs.webkit.org/show_bug.cgi?id=134226
2426
2427         Reviewed by Enrica Casucci.
2428
2429         Unchecked access of details pointer in the Document marker led to the crash.
2430         It seems erroneous to allow creation of a DocumentMarker without details when one is expected, because it
2431         carries the dictation context (not just the description).
2432         Also, add in ASSERTs to catch scenarios where a nullptr might be passed in.
2433
2434         Test: platform/mac/editing/input/crash-for-empty-text-alternative.html
2435
2436         * dom/DocumentMarker.cpp:
2437         (WebCore::DocumentMarker::DocumentMarker):
2438         * editing/AlternativeTextController.cpp:
2439         (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
2440
2441 2014-06-25  Laszlo Gombos  <l.gombos@samsung.com>
2442
2443         Remove build guard for progress element
2444         https://bugs.webkit.org/show_bug.cgi?id=134292
2445
2446         Reviewed by Benjamin Poulain.
2447
2448         The build flag is no longer needed as it is always on.
2449
2450         No new tests as there is no new behaviour.
2451
2452         * Configurations/FeatureDefines.xcconfig:
2453         * DerivedSources.make:
2454         * accessibility/AXObjectCache.cpp:
2455         (WebCore::createFromRenderer):
2456         * accessibility/AccessibilityProgressIndicator.cpp:
2457         (WebCore::AccessibilityProgressIndicator::create):
2458         (WebCore::AccessibilityProgressIndicator::valueForRange):
2459         (WebCore::AccessibilityProgressIndicator::maxValueForRange):
2460         (WebCore::AccessibilityProgressIndicator::minValueForRange):
2461         (WebCore::AccessibilityProgressIndicator::progressElement):
2462         * accessibility/AccessibilityProgressIndicator.h:
2463         * css/CSSPrimitiveValueMappings.h:
2464         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2465         * css/StyleResolver.cpp:
2466         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2467         * css/html.css:
2468         (progress::-webkit-progress-value):
2469         * html/HTMLProgressElement.cpp:
2470         * html/HTMLProgressElement.h:
2471         * html/HTMLProgressElement.idl:
2472         * html/HTMLTagNames.in:
2473         * html/shadow/ProgressShadowElement.cpp:
2474         * html/shadow/ProgressShadowElement.h:
2475         * platform/efl/DefaultTheme/CMakeLists.txt:
2476         * platform/efl/DefaultTheme/default.edc:
2477         * platform/efl/RenderThemeEfl.cpp:
2478         (WebCore::toEdjeGroup):
2479         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2480         (WebCore::RenderThemeEfl::paintProgressBar):
2481         * platform/efl/RenderThemeEfl.h:
2482         * platform/gtk/RenderThemeGtk.cpp:
2483         (WebCore::RenderThemeGtk::calculateProgressRect):
2484         * platform/gtk/RenderThemeGtk.h:
2485         * platform/gtk/RenderThemeGtk2.cpp:
2486         (WebCore::RenderThemeGtk::paintProgressBar):
2487         * platform/gtk/RenderThemeGtk3.cpp:
2488         (WebCore::RenderThemeGtk::paintProgressBar):
2489         * rendering/RenderObject.h:
2490         (WebCore::RenderObject::isSnapshottedPlugIn):
2491         (WebCore::RenderObject::isProgress):
2492         * rendering/RenderProgress.cpp:
2493         * rendering/RenderProgress.h:
2494         * rendering/RenderTheme.cpp:
2495         (WebCore::RenderTheme::adjustStyle):
2496         (WebCore::RenderTheme::paint):
2497         (WebCore::RenderTheme::paintBorderOnly):
2498         (WebCore::RenderTheme::paintDecorations):
2499         (WebCore::RenderTheme::progressBarRectForBounds):
2500         * rendering/RenderTheme.h:
2501         (WebCore::RenderTheme::paintProgressBar):
2502         * rendering/RenderThemeIOS.h:
2503         * rendering/RenderThemeIOS.mm:
2504         (WebCore::RenderThemeIOS::paintProgressBar):
2505         * rendering/RenderThemeMac.h:
2506         * rendering/RenderThemeMac.mm:
2507         (WebCore::RenderThemeMac::paintProgressBar):
2508
2509 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2510
2511         Unreviewed. Update GObject DOM bindings test results after r170422.
2512
2513         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2514         (WebKit::wrapTestActiveDOMObject):
2515         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2516         (WebKit::wrapTestCallback):
2517         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2518         (WebKit::wrapTestCustomNamedGetter):
2519         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2520         (WebKit::wrapTestEventConstructor):
2521         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2522         (WebKit::wrapTestEventTarget):
2523         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2524         (WebKit::wrapTestException):
2525         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
2526         (WebKit::wrapTestGenerateIsReachable):
2527         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2528         (WebKit::wrapTestInterface):
2529         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2530         (WebKit::wrapTestMediaQueryListListener):
2531         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2532         (WebKit::wrapTestNamedConstructor):
2533         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2534         (WebKit::wrapTestNode):
2535         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
2536         (WebKit::wrapTestNondeterministic):
2537         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2538         (WebKit::wrapTestObj):
2539         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
2540         (WebKit::wrapTestOverloadedConstructors):
2541         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2542         (WebKit::wrapTestSerializedScriptValueInterface):
2543         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
2544         (WebKit::wrapTestTypedefs):
2545         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
2546         (WebKit::wrapattribute):
2547         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
2548         (WebKit::wrapreadonly):
2549
2550 2014-06-24  Tomas Popela  <tpopela@redhat.com>
2551
2552         [GTK] Some of DOM bindings macros are misnamed
2553         https://bugs.webkit.org/show_bug.cgi?id=121543
2554
2555         Reviewed by Carlos Garcia Campos.
2556
2557         As we are using WebKitDOM as a namespace we should unify all type macros
2558         to have WEBKIT_DOM_TYPE prefix instead of WEBKIT_TYPE_DOM. Also add
2559         more exceptions to decamelize function in GObject bindings generator
2560         to fix the names of bindings for BR, HR, UL, OL, DL and LI elements.
2561
2562         * bindings/gobject/GObjectEventListener.cpp:
2563         (WebCore::GObjectEventListener::handleEvent):
2564         * bindings/gobject/WebKitDOMEventTarget.h:
2565         * bindings/gobject/WebKitDOMNodeFilter.h:
2566         * bindings/gobject/WebKitDOMObject.h:
2567         * bindings/gobject/webkitdom.symbols:
2568         * bindings/scripts/CodeGeneratorGObject.pm:
2569         (decamelize):
2570         (GetParentGObjType):
2571         (GenerateProperty):
2572         (GenerateHeader):
2573         (GenerateCFile):
2574         (GenerateEventTargetIface):
2575         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2576         (WebKit::wrapFloat64Array):
2577         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
2578         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2579         (WebKit::wrapTestActiveDOMObject):
2580         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2581         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2582         (WebKit::wrapTestCallback):
2583         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2584         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2585         (WebKit::wrapTestCustomNamedGetter):
2586         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2587         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2588         (WebKit::wrapTestEventConstructor):
2589         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2590         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2591         (WebKit::wrapTestEventTarget):
2592         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2593         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2594         (WebKit::wrapTestException):
2595         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
2596         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
2597         (WebKit::wrapTestGenerateIsReachable):
2598         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
2599         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2600         (WebKit::wrapTestInterface):
2601         (webkit_dom_test_interface_class_init):
2602         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2603         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2604         (WebKit::wrapTestMediaQueryListListener):
2605         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2606         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2607         (WebKit::wrapTestNamedConstructor):
2608         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2609         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2610         (WebKit::wrapTestNode):
2611         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2612         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
2613         (WebKit::wrapTestNondeterministic):
2614         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
2615         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2616         (WebKit::wrapTestObj):
2617         (webkit_dom_test_obj_class_init):
2618         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2619         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
2620         (WebKit::wrapTestOverloadedConstructors):
2621         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
2622         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2623         (WebKit::wrapTestSerializedScriptValueInterface):
2624         (webkit_dom_test_serialized_script_value_interface_class_init):
2625         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2626         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
2627         (WebKit::wrapTestTypedefs):
2628         (webkit_dom_test_typedefs_class_init):
2629         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2630         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
2631         (WebKit::wrapattribute):
2632         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
2633         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
2634         (WebKit::wrapreadonly):
2635         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
2636
2637 2014-06-24  Commit Queue  <commit-queue@webkit.org>
2638
2639         Unreviewed, rolling out r170414.
2640         https://bugs.webkit.org/show_bug.cgi?id=134291
2641
2642         the patch added a test that fails on almost every Mac tester
2643         (Requested by rniwa on #webkit).
2644
2645         Reverted changeset:
2646
2647         "Tiles on bottom of screen are not always allocated when
2648         necessary"
2649         https://bugs.webkit.org/show_bug.cgi?id=134272
2650         http://trac.webkit.org/changeset/170414
2651
2652 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
2653
2654         Tiles on bottom of screen are not always allocated when necessary
2655         https://bugs.webkit.org/show_bug.cgi?id=134272
2656
2657         Reviewed by Simon Fraser.
2658
2659         The initial visibleRect is in the coordinate of the root layer, so its origin
2660         is at the top left of the view. The initial rect we were using doesn't
2661         include the contents inset, so it was too short, which was causing tiles near
2662         the bottom of the screen to not always be allocated if the tile threshold was
2663         close to the bottom of the view. Instead, we want to include the contents
2664         inset size so the visible rect includes the entire view.
2665         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
2666         the visible rect into the tiled layer's coordinate system, at which point it
2667         is used for visible tile logic.
2668
2669         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
2670
2671         * platform/graphics/ca/TileCoverageMap.cpp:
2672         (WebCore::TileCoverageMap::update):
2673         * rendering/RenderLayerCompositor.cpp:
2674         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2675
2676 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
2677
2678         InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
2679         https://bugs.webkit.org/show_bug.cgi?id=134173
2680
2681         Reviewed by Daniel Bates.
2682
2683         After Zalan's talks with Kling, it seems that the simple line layout code
2684         might alleviate the need for the space savings in InlineTextBox. Given this,
2685         it would be beneficial to be a little more safe by using unsigneds throughout.
2686
2687         For example, we have code like "void setLen(unsigned len) { m_len = len; }"
2688         which might silently break if given particular inputs.
2689
2690         No new tests because there is no behavior change.
2691
2692         * rendering/InlineTextBox.cpp:
2693         (WebCore::InlineTextBox::isSelected):
2694         (WebCore::InlineTextBox::localSelectionRect):
2695         (WebCore::InlineTextBox::paint):
2696         (WebCore::InlineTextBox::selectionStartEnd):
2697         (WebCore::InlineTextBox::paintSelection):
2698         (WebCore::InlineTextBox::paintCompositionBackground):
2699         (WebCore::InlineTextBox::paintDocumentMarker):
2700         (WebCore::InlineTextBox::paintTextMatchMarker):
2701         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2702         * rendering/InlineTextBox.h:
2703         (WebCore::InlineTextBox::truncation):
2704         * rendering/RenderTextLineBoxes.cpp:
2705         (WebCore::ellipsisRectForBox):
2706
2707 2014-06-24  Ryosuke Niwa  <rniwa@webkit.org>
2708
2709         Speculative 32-bit Mac build fix after r170402.
2710
2711         * platform/graphics/mac/ComplexTextController.cpp:
2712         (WebCore::advanceByCombiningCharacterSequence):
2713
2714 2014-06-24  Joseph Pecoraro  <pecoraro@apple.com>
2715
2716         [iOS]: WK2 Inspector Node Highlighting
2717         https://bugs.webkit.org/show_bug.cgi?id=134257
2718
2719         Reviewed by Timothy Hatcher.
2720
2721         Some clients want to get highlights with the scroll applied,
2722         others do not. Provide a CoordinateSpace param to be used for
2723         getting a highlight (only used on iOS).
2724
2725         * WebCore.exp.in:
2726         * inspector/InspectorController.cpp:
2727         (WebCore::InspectorController::getHighlight):
2728         * inspector/InspectorController.h:
2729         * inspector/InspectorOverlay.cpp:
2730         (WebCore::InspectorOverlay::getHighlight):
2731         (WebCore::buildObjectForRendererFragments):
2732         * inspector/InspectorOverlay.h:
2733         (WebCore::Highlight::Highlight):
2734         * testing/Internals.cpp:
2735         (WebCore::Internals::inspectorHighlightRects):
2736
2737 2014-06-24  Jer Noble  <jer.noble@apple.com>
2738
2739         [MSE][Mac] Uncaught exception when deallocating AVSampleBufferDisplayLayer
2740         https://bugs.webkit.org/show_bug.cgi?id=134281
2741
2742         Reviewed by Brent Fulgham.
2743
2744         AVSampleBufferDisplayLayer is throwing an exception from its -dealloc method because KVO observers exist
2745         at the time of dealloc. Remove the observer for outputObscuredDueToInsufficientExternalProtection inside
2746         -stopObservingLayer.
2747
2748         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2749         (-[WebAVSampleBufferErrorListener stopObservingLayer:]):
2750
2751 2014-06-24  Mark Rowe  <mrowe@apple.com>
2752
2753         WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
2754         <https://webkit.org/b/134271> / <rdar://problem/16270167>
2755
2756         Reviewed by Brady Eidson.
2757
2758         Tests: http/tests/globalhistory/history-delegate-pushstate.html
2759                http/tests/globalhistory/history-delegate-replacestate.html
2760
2761         * page/History.cpp:
2762         (WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
2763         URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.
2764
2765 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
2766
2767         advanceByCombiningCharacterSequence() can be simplified
2768         https://bugs.webkit.org/show_bug.cgi?id=133591
2769
2770         Reviewed by Dean Jackson.
2771
2772         Use U16_NEXT() because it already does what we're trying to do.
2773
2774         No new tests because there is no behavior change.
2775
2776         * platform/graphics/mac/ComplexTextController.cpp:
2777         (WebCore::advanceByCombiningCharacterSequence):
2778
2779 2014-06-24  Brady Eidson  <beidson@apple.com>
2780
2781         Enable GAMEPAD in the Mac build, but disabled at runtime.
2782         https://bugs.webkit.org/show_bug.cgi?id=134255
2783
2784         Reviewed by Dean Jackson.
2785
2786         No new tests (No changes to a tested config).
2787
2788         * bindings/scripts/CodeGeneratorJS.pm:
2789         (GenerateImplementation): Add the ability to have a function be EnabledAtRuntime by
2790           removing such functions from the prototype if they are disabled.
2791
2792         Change the three new objects and the one new function to be EnabledAtRuntime
2793         * Modules/gamepad/Gamepad.idl:
2794         * Modules/gamepad/GamepadButton.idl:
2795         * Modules/gamepad/GamepadEvent.idl:
2796         * Modules/gamepad/NavigatorGamepad.idl:
2797
2798         Add a RuntimeEnabledFeature for Gamepads:
2799         * bindings/generic/RuntimeEnabledFeatures.cpp:
2800         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2801         * bindings/generic/RuntimeEnabledFeatures.h:
2802         (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
2803         (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
2804
2805         * Configurations/FeatureDefines.xcconfig:
2806
2807 2014-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2808
2809         CSS JIT: Add positionInRootFragments to SelectorFragment
2810         https://bugs.webkit.org/show_bug.cgi?id=133609
2811
2812         Reviewed by Benjamin Poulain.
2813
2814         Some non-backtrack-related predicates use relationToRightFragment information
2815         to decide whether checkingContext->elementStyle should be refered.
2816         To make it works correctly, add the positionInRootFragments field to SelectorFragment.
2817         When positionInRootFragments == Rightmost and relationToRightFragment == Rightmost,
2818         we should see checkingContext->elementStyle.
2819
2820         Test: fast/selectors/first-child-update-with-renderer.html
2821
2822         * cssjit/SelectorCompiler.cpp:
2823         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
2824         (WebCore::SelectorCompiler::addPseudoClassType):
2825         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2826         (WebCore::SelectorCompiler::constructFragments):
2827         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2828         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2829         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2830         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2831         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2832         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2833
2834 2014-06-24  Jer Noble  <jer.noble@apple.com>
2835
2836         [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
2837         https://bugs.webkit.org/show_bug.cgi?id=134270
2838
2839         Reviewed by Jon Honeycutt.
2840
2841         The WebCoreFullScreenWindow's firstResponder is reset when the full screen animation completes and
2842         the window's style is changed to a fullscreen style. Save the firstResponder, and if it's still in
2843         the window's view hierarchy after the style changes, reset it to the firstResponder.
2844
2845         * platform/mac/WebCoreFullScreenWindow.mm:
2846         (-[WebCoreFullScreenWindow setStyleMask:]):
2847
2848 2014-06-24  Jer Noble  <jer.noble@apple.com>
2849
2850         [MSE][Mac] Pass AVSampleBufferDisplayLayer HDCP status through to EME
2851         https://bugs.webkit.org/show_bug.cgi?id=134221
2852
2853         Reviewed by Eric Carlson.
2854
2855         Pass the outputObscuredDueToInsufficientExternalProtection property of AVSampleBufferDisplayLayer
2856         as an error to the associated MediaKeySession object.
2857
2858         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2859         (-[WebAVSampleBufferErrorListener invalidate]):
2860         (-[WebAVSampleBufferErrorListener beginObservingLayer:]):
2861         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2862
2863 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
2864
2865         Use unsigneds instead of ints for indexes into a string in text layout code
2866         https://bugs.webkit.org/show_bug.cgi?id=133592
2867
2868         Reviewed by Zalan Bujtas.
2869
2870         Migrate much of the text-handling code to use unsigneds for indexes into a string.
2871
2872         No new tests because there is no behavior change.
2873
2874         * WebCore.exp.in:
2875         * platform/graphics/Font.cpp:
2876         (WebCore::Font::drawText):
2877         (WebCore::Font::drawEmphasisMarks):
2878         (WebCore::Font::adjustSelectionRectForText):
2879         (WebCore::computeUnderlineType):
2880         * platform/graphics/Font.h:
2881         * platform/graphics/FontFastPath.cpp:
2882         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2883         (WebCore::Font::drawSimpleText):
2884         (WebCore::Font::drawEmphasisMarksForSimpleText):
2885         (WebCore::Font::drawGlyphBuffer):
2886         (WebCore::Font::drawEmphasisMarks):
2887         (WebCore::Font::adjustSelectionRectForSimpleText):
2888         * platform/graphics/GlyphBuffer.h:
2889         (WebCore::GlyphBuffer::size):
2890         (WebCore::GlyphBuffer::glyphs):
2891         (WebCore::GlyphBuffer::advances):
2892         (WebCore::GlyphBuffer::fontDataAt):
2893         (WebCore::GlyphBuffer::advanceAt):
2894         (WebCore::GlyphBuffer::offsetAt):
2895         (WebCore::GlyphBuffer::reverse):
2896         (WebCore::GlyphBuffer::offsetInString):
2897         (WebCore::GlyphBuffer::swap):
2898         * platform/graphics/GraphicsContext.cpp:
2899         (WebCore::TextRunIterator::atEnd):
2900         * platform/graphics/Latin1TextIterator.h:
2901         (WebCore::Latin1TextIterator::Latin1TextIterator):
2902         (WebCore::Latin1TextIterator::currentCharacter):
2903         * platform/graphics/SimpleFontData.h:
2904         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2905         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
2906         * platform/graphics/SurrogatePairAwareTextIterator.h:
2907         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
2908         * platform/graphics/TextRun.h:
2909         (WebCore::TextRun::length):
2910         (WebCore::TextRun::charactersLength):
2911         * platform/graphics/WidthIterator.cpp:
2912         (WebCore::WidthIterator::glyphDataForCharacter):
2913         (WebCore::applyFontTransforms):
2914         (WebCore::WidthIterator::advanceInternal):
2915         (WebCore::WidthIterator::advance):
2916         (WebCore::WidthIterator::advanceOneCharacter):
2917         * platform/graphics/WidthIterator.h:
2918         * platform/graphics/cairo/FontCairo.cpp:
2919         (WebCore::Font::drawGlyphs):
2920         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2921         (WebCore::Font::drawComplexText):
2922         (WebCore::Font::drawEmphasisMarksForComplexText):
2923         (WebCore::Font::adjustSelectionRectForComplexText):
2924         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2925         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
2926         * platform/graphics/mac/FontComplexTextMac.cpp:
2927         (WebCore::Font::adjustSelectionRectForComplexText):
2928         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2929         (WebCore::Font::drawComplexText):
2930         (WebCore::Font::drawEmphasisMarksForComplexText):
2931         * platform/graphics/mac/FontMac.mm:
2932         (WebCore::Font::drawGlyphs):
2933         * platform/graphics/win/FontCGWin.cpp:
2934         (WebCore::Font::drawGlyphs):
2935         * platform/graphics/win/FontWin.cpp:
2936         (WebCore::Font::adjustSelectionRectForComplexText):
2937         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2938         (WebCore::Font::drawComplexText):
2939         (WebCore::Font::drawEmphasisMarksForComplexText):
2940         * platform/graphics/wince/FontWinCE.cpp:
2941         (WebCore::Font::drawGlyphs):
2942         (WebCore::Font::drawComplexText):
2943         (WebCore::Font::drawEmphasisMarksForComplexText):
2944         (WebCore::Font::selectionRectForComplexText):
2945         * rendering/InlineTextBox.cpp:
2946         (WebCore::InlineTextBox::isSelected):
2947         (WebCore::InlineTextBox::selectionState):
2948         (WebCore::adjustCharactersAndLengthForHyphen):
2949         (WebCore::InlineTextBox::localSelectionRect):
2950         (WebCore::InlineTextBox::paint):
2951         (WebCore::InlineTextBox::selectionStartEnd):
2952         (WebCore::InlineTextBox::paintSelection):
2953         (WebCore::InlineTextBox::paintCompositionBackground):
2954         (WebCore::InlineTextBox::paintDocumentMarker):
2955         (WebCore::InlineTextBox::paintTextMatchMarker):
2956         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2957         (WebCore::InlineTextBox::paintCompositionUnderline):
2958         (WebCore::InlineTextBox::positionForOffset):
2959         (WebCore::InlineTextBox::constructTextRun):
2960         * rendering/InlineTextBox.h:
2961         * rendering/RenderCombineText.cpp:
2962         (WebCore::RenderCombineText::getStringToRender):
2963         * rendering/RenderCombineText.h:
2964         * rendering/svg/SVGInlineFlowBox.cpp:
2965         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2966         * rendering/svg/SVGInlineTextBox.cpp:
2967         (WebCore::SVGInlineTextBox::positionForOffset):
2968         (WebCore::SVGInlineTextBox::localSelectionRect):
2969         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2970         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
2971         (WebCore::SVGInlineTextBox::paintText):
2972         * rendering/svg/SVGInlineTextBox.h:
2973         * rendering/svg/SVGTextMetricsBuilder.cpp:
2974         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
2975         (WebCore::SVGTextMetricsBuilder::advance):
2976         * rendering/svg/SVGTextQuery.cpp:
2977         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
2978         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
2979         (WebCore::SVGTextQuery::subStringLengthCallback):
2980         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
2981         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
2982         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
2983         (WebCore::SVGTextQuery::extentOfCharacterCallback):
2984         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
2985         * rendering/svg/SVGTextQuery.h:
2986         * rendering/svg/SVGTextRunRenderingContext.cpp:
2987         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
2988         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2989         * rendering/svg/SVGTextRunRenderingContext.h:
2990         * svg/SVGFontData.cpp:
2991         (WebCore::SVGFontData::applySVGGlyphSelection):
2992         * svg/SVGFontData.h:
2993
2994 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
2995
2996         Unreviewed build fix.
2997
2998         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2999         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Cast variadic argument to int.
3000
3001 2014-06-24  Brent Fulgham  <bfulgham@apple.com>
3002
3003         [Win] MSVC mishandles enums in bitfields
3004         https://bugs.webkit.org/show_bug.cgi?id=134237
3005
3006         Reviewed by Michael Saboff.
3007
3008         Replace uses of enum types in bit fields with unsigned to
3009         avoid losing a bit to hold the sign value. This can result
3010         in Windows interpreting the value of the field improperly.
3011
3012         * loader/ResourceLoaderOptions.h:
3013         * platform/network/ResourceRequestBase.h:
3014         * platform/network/cf/ResourceResponse.h:
3015         * rendering/RenderLayer.h:
3016         * rendering/RenderMarquee.h:
3017
3018 2014-06-24  Antti Koivisto  <antti@apple.com>
3019
3020         Try to fix build.
3021
3022         * WebCore.exp.in: Remove duplicate export, this should be in the iOS section only.
3023
3024 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
3025
3026         [Mac] process raw VTT in-band captions
3027         https://bugs.webkit.org/show_bug.cgi?id=134178
3028
3029         Reviewed by Jer Noble.
3030
3031         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
3032         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3033         * WebCore.xcodeproj/project.pbxproj: Ditto.
3034
3035         * html/track/BufferedLineReader.h:
3036         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
3037
3038         Make it possible to process WebVTT captions. 
3039         * html/track/InbandGenericTextTrack.cpp:
3040         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
3041         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
3042         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
3043         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
3044         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
3045         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
3046         * html/track/InbandGenericTextTrack.h:
3047
3048         * html/track/InbandTextTrack.h:
3049
3050         * html/track/InbandWebVTTTextTrack.cpp:
3051         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
3052         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
3053             object.
3054         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
3055         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
3056         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
3057         * html/track/InbandWebVTTTextTrack.h:
3058
3059         * html/track/TextTrackCueGeneric.cpp:
3060         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
3061             from a pointer to a reference.
3062         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
3063
3064         * html/track/VTTCue.cpp:
3065         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
3066         (WebCore::VTTCueBox::VTTCueBox): Ditto.
3067         (WebCore::VTTCueBox::getCue): Return a reference.
3068         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
3069         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
3070         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
3071         (WebCore::VTTCue::initialize): New, shared constructor initialization.
3072         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
3073         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
3074         (WebCore::VTTCue::setCueSettings): Ditto.
3075         * html/track/VTTCue.h:
3076         (WebCore::VTTCueBox::create): Deleted.
3077         (WebCore::VTTCue::create): Deleted.
3078
3079         * html/track/WebVTTParser.cpp:
3080         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
3081             call the parser.
3082         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
3083         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
3084         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
3085         * html/track/WebVTTParser.h:
3086         (WebCore::WebVTTCueData::originalStartTime): New.
3087         (WebCore::WebVTTCueData::setOriginalStartTime): New.
3088         (WebCore::WebVTTCueData::WebVTTCueData):
3089
3090         * loader/TextTrackLoader.cpp:
3091         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
3092
3093         Parse ISO WebVTT cue boxes.
3094         * platform/graphics/ISOVTTCue.cpp: Added.
3095         (WebCore::ISOBox::ISOBox):
3096         (WebCore::ISOBox::peekType):
3097         (WebCore::ISOBox::peekLength):
3098         (WebCore::ISOBox::peekString):
3099         (WebCore::vttCueBoxType):
3100         (WebCore::vttIdBoxType):
3101         (WebCore::vttSettingsBoxType):
3102         (WebCore::vttPayloadBoxType):
3103         (WebCore::vttCurrentTimeBoxType):
3104         (WebCore::vttCueSourceIDBoxType):
3105         (WebCore::ISOWebVTTCue::boxType):
3106         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
3107         * platform/graphics/ISOVTTCue.h: Added.
3108         (WebCore::ISOBox::boxHeaderSize):
3109         (WebCore::ISOBox::length):
3110         (WebCore::ISOBox::type):
3111         (WebCore::ISOWebVTTCue::presentationTime):
3112         (WebCore::ISOWebVTTCue::duration):
3113         (WebCore::ISOWebVTTCue::sourceID):
3114         (WebCore::ISOWebVTTCue::id):
3115         (WebCore::ISOWebVTTCue::originalStartTime):
3116         (WebCore::ISOWebVTTCue::settings):
3117         (WebCore::ISOWebVTTCue::cueText):
3118
3119         * platform/graphics/InbandTextTrackPrivateClient.h:
3120         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
3121
3122         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3123         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
3124         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
3125         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
3126         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
3127             CMSampleBuffers, create ISOWebVTTCue from the sample data.
3128         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3129
3130         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
3131         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
3132         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
3133         (WebCore::InbandTextTrackPrivateAVCF::create):
3134         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3135         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
3136         (WebCore::LegibleOutputData::LegibleOutputData):
3137         (WebCore::AVFWrapper::processCue):
3138         (WebCore::AVFWrapper::legibleOutputCallback):
3139
3140         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
3141         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
3142         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3143         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
3144
3145         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
3146         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
3147             format to base class.
3148
3149         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3150         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3151         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
3152         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
3153         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
3154             options until we have tracks.
3155         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
3156         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
3157             attributed strings to track.
3158         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
3159         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
3160         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
3161
3162         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
3163         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
3164
3165 2014-06-24  Antti Koivisto  <antti@apple.com>
3166
3167         Only flush layers when the exposed rect actually changes
3168         https://bugs.webkit.org/show_bug.cgi?id=134248
3169
3170         Reviewed by Anders Carlsson.
3171
3172         * WebCore.exp.in:
3173
3174 2014-06-24  Brady Eidson  <beidson@apple.com>
3175
3176         Remove references to "Shader.h" which doesn't currently exist in the project.
3177
3178         Rubberstamped by Andreas Kling.
3179
3180         * WebCore.xcodeproj/project.pbxproj:
3181
3182 2014-06-24  Martin Hock  <mhock@apple.com>
3183
3184         [iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
3185         Also, revert r169281.
3186         https://bugs.webkit.org/show_bug.cgi?id=134233
3187         <rdar://problem/17060183>
3188
3189         Reviewed by Benjamin Poulain.
3190
3191         * page/DOMWindow.cpp:
3192         (WebCore::DOMWindow::outerHeight):
3193         (WebCore::DOMWindow::outerWidth):
3194
3195 2014-06-24  Jeremy Jones  <jeremyj@apple.com>
3196
3197         Don't set AudioSession active while interrupted.
3198         https://bugs.webkit.org/show_bug.cgi?id=134239
3199
3200         Reviewed by Eric Carlson.
3201
3202         To activate the AudioSession there must be a session with audio or video
3203         and being playing or paused.
3204
3205         * platform/audio/MediaSessionManager.cpp:
3206         (WebCore::MediaSessionManager::hasActive): added
3207         (WebCore::MediaSessionManager::beginInterruption): updateSessionState
3208         (WebCore::MediaSessionManager::sessionWillBeginPlayback): updateSessionState
3209         * platform/audio/MediaSessionManager.h: declare hasActive()
3210         * platform/audio/mac/MediaSessionManagerMac.cpp:
3211         (MediaSessionManager::updateSessionState): use hasActive()
3212
3213 2014-06-24  Jer Noble  <jer.noble@apple.com>
3214
3215         REGRESSION(r170336): Crash in HTMLMediaElement::seekTimerFired()
3216         https://bugs.webkit.org/show_bug.cgi?id=134253
3217
3218         Rubber-stamped by Eric Carlson.
3219
3220         Now that seekWithTolerance() has been split up into an asyncronous section, the null-checks in seekWithTolerance()
3221         need to be re-performed in seekTimerFired(), in case the m_player has been cleared between when the seek was initiated
3222         and when the asynchronous section is performed.
3223
3224         * html/HTMLMediaElement.cpp:
3225         (WebCore::HTMLMediaElement::seekTimerFired):
3226
3227 2014-06-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3228
3229         Fix unused parameter warnings if inspector is disabled
3230         https://bugs.webkit.org/show_bug.cgi?id=134244
3231
3232         Reviewed by Zalan Bujtas.
3233
3234         No new tests, no behavior change.
3235
3236         * inspector/InspectorConsoleInstrumentation.h:
3237         (WebCore::InspectorInstrumentation::startProfiling):
3238         (WebCore::InspectorInstrumentation::stopProfiling):
3239         * inspector/InspectorInstrumentation.h:
3240         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
3241         * loader/cache/CachedResourceLoader.cpp:
3242         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
3243
3244 2014-06-24  Jer Noble  <jer.noble@apple.com>
3245
3246         [MSE] Add null-check in sourceBufferPrivateAppendComplete().
3247         https://bugs.webkit.org/show_bug.cgi?id=133230
3248
3249         Reviewed by Eric Carlson.
3250
3251         * Modules/mediasource/SourceBuffer.cpp:
3252         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Bail early if the 
3253             SourceBuffer has been removed from the MediaSource.
3254
3255 2014-06-24  Commit Queue  <commit-queue@webkit.org>
3256
3257         Unreviewed, rolling out r170337.
3258         https://bugs.webkit.org/show_bug.cgi?id=134250
3259
3260         caused 3 layout tests to crash on debug. (Requested by zalan
3261         on #webkit).
3262
3263         Reverted changeset:
3264
3265         "Use unsigneds instead of ints for indexes into a string in
3266         text layout code"
3267         https://bugs.webkit.org/show_bug.cgi?id=133592
3268         http://trac.webkit.org/changeset/170337
3269
3270 2014-06-24  Jarek Czekalski  <jarekczek@poczta.onet.pl>
3271
3272         [ATK] Don't ignore links rendered as blocks.
3273         https://bugs.webkit.org/show_bug.cgi?id=130941
3274
3275         Reviewed by Mario Sanchez Prada.
3276
3277         * /m/usr/src/webkit-trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3278         (WebCore::AccessibilityObject::objectFocusedAndCaretOffsetUnignored): Don't ignore links
3279         when they are renderered with display:block.
3280
3281 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3282
3283         Unreviewed. Update GObject DOM bindings test results after r170351.
3284
3285         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
3286         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
3287
3288 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3289
3290         Unreviewed. Fix GTK+ build after r170309.
3291
3292         Skip functions returning arrays in GObject DOM bindings.
3293
3294         * bindings/scripts/CodeGeneratorGObject.pm:
3295         (SkipFunction):
3296
3297 2014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
3298
3299         [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
3300         https://bugs.webkit.org/show_bug.cgi?id=134236
3301
3302         Reviewed by Gyuyoung Kim.
3303
3304         * platform/efl/RenderThemeEfl.cpp:
3305         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
3306         (WebCore::RenderThemeEfl::loadTheme):
3307         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
3308         * platform/efl/RenderThemeEfl.h:
3309         * platform/graphics/efl/CairoUtilitiesEfl.cpp:
3310         (WebCore::evasObjectFromCairoImageSurface):
3311         * platform/graphics/efl/CairoUtilitiesEfl.h:
3312         * platform/graphics/efl/ImageEfl.cpp:
3313         (WebCore::BitmapImage::getEvasObject):
3314
3315 2014-06-23  Jeremy Jones  <jeremyj@apple.com>
3316
3317         Chapter forward/backward should seek to beginning/end.
3318         https://bugs.webkit.org/show_bug.cgi?id=134225
3319
3320         Reviewed by Eric Carlson.
3321
3322         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3323         (-[WebAVPlayerController seekChapterBackward:]): forwards to -seekToBeginning
3324         (-[WebAVPlayerController seekChapterForward:]): forwards to -seekToEnd
3325
3326 2014-06-23  Dean Jackson  <dino@apple.com>
3327
3328         [Mac] Don't draw focus rings if we are animating controls
3329         https://bugs.webkit.org/show_bug.cgi?id=134232
3330         <rdar://problem/17381121>
3331
3332         Reviewed by Tim Horton.
3333
3334         Controls in native apps do not draw their focus rings as they
3335         animate (in Yosemite). Turn this off for WebKit too. It turns
3336         out that when we were drawing them, they were in the wrong
3337         place anyway.
3338
3339         Since we don't animate controls when testing, we can't really test this.
3340
3341         * platform/mac/ThemeMac.mm:
3342         (WebCore::paintToggleButton): Only draw the focus ring if the
3343         NSButtonCell is not animating.
3344
3345 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
3346
3347         [ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
3348         https://bugs.webkit.org/show_bug.cgi?id=134193
3349
3350         Reviewed by Gyuyoung Kim.
3351
3352         It was used along with DRT. Since we have stopped support WK1/DRT, it won't be needed.
3353
3354         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3355         (webkitAccessibleGetFocusedElement): Deleted.
3356         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
3357
3358 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
3359
3360         Use unsigneds instead of ints for indexes into a string in text layout code
3361         https://bugs.webkit.org/show_bug.cgi?id=133592
3362
3363         Reviewed by Zalan Bujtas.
3364
3365         Migrate much of the text-handling code to use unsigneds for indexes into a string.
3366
3367         No new tests because there is no behavior change.
3368
3369         * WebCore.exp.in:
3370         * platform/graphics/Font.cpp:
3371         (WebCore::Font::drawText):
3372         (WebCore::Font::drawEmphasisMarks):
3373         (WebCore::Font::adjustSelectionRectForText):
3374         (WebCore::computeUnderlineType):
3375         * platform/graphics/Font.h:
3376         * platform/graphics/FontFastPath.cpp:
3377         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
3378         (WebCore::Font::drawSimpleText):
3379         (WebCore::Font::drawEmphasisMarksForSimpleText):
3380         (WebCore::Font::drawGlyphBuffer):
3381         (WebCore::Font::drawEmphasisMarks):
3382         (WebCore::Font::adjustSelectionRectForSimpleText):
3383         * platform/graphics/GlyphBuffer.h:
3384         (WebCore::GlyphBuffer::size):
3385         (WebCore::GlyphBuffer::glyphs):
3386         (WebCore::GlyphBuffer::advances):
3387         (WebCore::GlyphBuffer::fontDataAt):
3388         (WebCore::GlyphBuffer::advanceAt):
3389         (WebCore::GlyphBuffer::offsetAt):
3390         (WebCore::GlyphBuffer::reverse):
3391         (WebCore::GlyphBuffer::offsetInString):
3392         (WebCore::GlyphBuffer::swap):
3393         * platform/graphics/GraphicsContext.cpp:
3394         (WebCore::TextRunIterator::atEnd):
3395         * platform/graphics/Latin1TextIterator.h:
3396         (WebCore::Latin1TextIterator::Latin1TextIterator):
3397         (WebCore::Latin1TextIterator::currentCharacter):
3398         * platform/graphics/SimpleFontData.h:
3399         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
3400         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
3401         * platform/graphics/SurrogatePairAwareTextIterator.h:
3402         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
3403         * platform/graphics/TextRun.h:
3404         (WebCore::TextRun::length):
3405         (WebCore::TextRun::charactersLength):
3406         * platform/graphics/WidthIterator.cpp:
3407         (WebCore::WidthIterator::glyphDataForCharacter):
3408         (WebCore::applyFontTransforms):
3409         (WebCore::WidthIterator::advanceInternal):
3410         (WebCore::WidthIterator::advance):
3411         (WebCore::WidthIterator::advanceOneCharacter):
3412         * platform/graphics/WidthIterator.h:
3413         * platform/graphics/cairo/FontCairo.cpp:
3414         (WebCore::Font::drawGlyphs):
3415         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
3416         (WebCore::Font::drawComplexText):
3417         (WebCore::Font::drawEmphasisMarksForComplexText):
3418         (WebCore::Font::adjustSelectionRectForComplexText):
3419         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3420         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
3421         * platform/graphics/mac/FontComplexTextMac.cpp:
3422         (WebCore::Font::adjustSelectionRectForComplexText):
3423         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
3424         (WebCore::Font::drawComplexText):
3425         (WebCore::Font::drawEmphasisMarksForComplexText):
3426         * platform/graphics/mac/FontMac.mm:
3427         (WebCore::Font::drawGlyphs):
3428         * platform/graphics/win/FontCGWin.cpp:
3429         (WebCore::Font::drawGlyphs):
3430         * platform/graphics/win/FontWin.cpp:
3431         (WebCore::Font::adjustSelectionRectForComplexText):
3432         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
3433         (WebCore::Font::drawComplexText):
3434         (WebCore::Font::drawEmphasisMarksForComplexText):
3435         * platform/graphics/wince/FontWinCE.cpp:
3436         (WebCore::Font::drawGlyphs):
3437         (WebCore::Font::drawComplexText):
3438         (WebCore::Font::drawEmphasisMarksForComplexText):
3439         (WebCore::Font::selectionRectForComplexText):
3440         * rendering/InlineTextBox.cpp:
3441         (WebCore::InlineTextBox::isSelected):
3442         (WebCore::InlineTextBox::selectionState):