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