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