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