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