HTTPHeaderMap should not derive from HashMap
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-29  Anders Carlsson  <andersca@apple.com>
2
3         HTTPHeaderMap should not derive from HashMap
4         https://bugs.webkit.org/show_bug.cgi?id=133392
5
6         Reviewed by Darin Adler.
7
8         Use a HashMap member variable instead.
9
10         * WebCore.exp.in:
11         * loader/DocumentLoader.cpp:
12         (WebCore::DocumentLoader::responseReceived):
13         * platform/network/HTTPHeaderMap.cpp:
14         (WebCore::HTTPHeaderMap::copyData):
15         (WebCore::HTTPHeaderMap::adopt):
16         (WebCore::HTTPHeaderMap::get):
17         (WebCore::HTTPHeaderMap::set):
18         (WebCore::HTTPHeaderMap::add):
19         (WebCore::HTTPHeaderMap::contains):
20         (WebCore::HTTPHeaderMap::find):
21         (WebCore::HTTPHeaderMap::remove):
22         (WebCore::HTTPHeaderMap::keys):
23         * platform/network/HTTPHeaderMap.h:
24         (WebCore::HTTPHeaderMap::isEmpty):
25         (WebCore::HTTPHeaderMap::size):
26         (WebCore::HTTPHeaderMap::clear):
27         (WebCore::HTTPHeaderMap::begin):
28         (WebCore::HTTPHeaderMap::end):
29         (WebCore::HTTPHeaderMap::operator==):
30         (WebCore::HTTPHeaderMap::operator!=):
31         * platform/network/ResourceRequestBase.cpp:
32         (WebCore::ResourceRequestBase::adopt):
33         * platform/network/ResourceRequestBase.h:
34         * platform/network/ResourceResponseBase.cpp:
35         (WebCore::ResourceResponseBase::adopt):
36         * platform/network/ResourceResponseBase.h:
37         * xml/XMLHttpRequest.cpp:
38         (WebCore::XMLHttpRequest::createRequest):
39
40 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
41
42         Use C++11 lambdas to construct FileThread::Task objects
43         https://bugs.webkit.org/show_bug.cgi?id=133079
44
45         Reviewed by Darin Adler.
46
47         Have FileThread::Task constructor take in a std::function<void ()>-like object
48         as the second parameter. Much like with ScriptExecutionContext::Task, the idea here
49         is to use inlined C++11 lambdas in FileThread::postTask() calls. Because FileThread::Task
50         also requires an instance pointer, a brace-init list is passed to these calls, passing
51         in the instance pointer as the first parameter and the C++11 lambda as the second.
52
53         FileThread::postTask() now takes in a FileThread::Task rvalue and moves it onto the heap
54         and into the queue.
55
56         In AsyncFileStream.cpp, calls to FileThread::postTask() are updated to use C++11 lambdas.
57         Uses of MainThreadTask are also replaced by C++11 lambdas. This modernizes the code and
58         removes a lot of helper functions.
59
60         FileThread::Task doesn't use CrossThreadCopier anymore. Instead, we manually produce
61         thread-safe copies as necessary. At the moment this approach produces another copy when
62         passing the freshly-copied object into the lambda, but this will be avoidable once we
63         make C++14 and the lambda capture expression support mandatory.
64
65         * fileapi/AsyncFileStream.cpp:
66         (WebCore::AsyncFileStream::create):
67         (WebCore::AsyncFileStream::stop):
68         (WebCore::AsyncFileStream::getSize):
69         (WebCore::AsyncFileStream::openForRead):
70         (WebCore::AsyncFileStream::openForWrite):
71         (WebCore::AsyncFileStream::close):
72         (WebCore::AsyncFileStream::read):
73         (WebCore::AsyncFileStream::write):
74         (WebCore::AsyncFileStream::truncate):
75         (WebCore::didStart): Deleted.
76         (WebCore::AsyncFileStream::startOnFileThread): Deleted.
77         (WebCore::derefProxyOnMainThread): Deleted.
78         (WebCore::AsyncFileStream::stopOnFileThread): Deleted.
79         (WebCore::didGetSize): Deleted.
80         (WebCore::AsyncFileStream::getSizeOnFileThread): Deleted.
81         (WebCore::didOpen): Deleted.
82         (WebCore::AsyncFileStream::openForReadOnFileThread): Deleted.
83         (WebCore::AsyncFileStream::openForWriteOnFileThread): Deleted.
84         (WebCore::AsyncFileStream::closeOnFileThread): Deleted.
85         (WebCore::didRead): Deleted.
86         (WebCore::AsyncFileStream::readOnFileThread): Deleted.
87         (WebCore::didWrite): Deleted.
88         (WebCore::AsyncFileStream::writeOnFileThread): Deleted.
89         (WebCore::didTruncate): Deleted.
90         (WebCore::AsyncFileStream::truncateOnFileThread): Deleted.
91         * fileapi/AsyncFileStream.h:
92         * fileapi/FileThread.cpp:
93         (WebCore::FileThread::postTask):
94         * fileapi/FileThread.h:
95         (WebCore::FileThread::Task::Task):
96
97 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
98
99         Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
100         https://bugs.webkit.org/show_bug.cgi?id=133374
101
102         Reviewed by Darin Adler.
103
104         Use C++11 lambads to inline the main thread tasks into the calling code,
105         modernizing the look of the code and removing a few static methods and
106         classes that were used as helpers.
107
108         * loader/icon/IconDatabase.cpp:
109         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
110         (WebCore::IconDatabase::performURLImport):
111         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread):
112         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread):
113         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread):
114         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
115         (WebCore::IconDatabase::notifyPendingLoadDecisionsOnMainThread): Deleted.
116         (WebCore::IconDatabase::performScheduleOrDeferSyncTimer): Deleted.
117         (WebCore::IconDatabase::performScheduleOrDeferSyncTimerOnMainThread): Deleted.
118         (WebCore::ClientWorkItem::ClientWorkItem): Deleted.
119         (WebCore::ClientWorkItem::~ClientWorkItem): Deleted.
120         (WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem): Deleted.
121         (WebCore::ImportedIconURLForPageURLWorkItem::~ImportedIconURLForPageURLWorkItem): Deleted.
122         (WebCore::ImportedIconURLForPageURLWorkItem::performWork): Deleted.
123         (WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem): Deleted.
124         (WebCore::ImportedIconDataForPageURLWorkItem::~ImportedIconDataForPageURLWorkItem): Deleted.
125         (WebCore::ImportedIconDataForPageURLWorkItem::performWork): Deleted.
126         (WebCore::RemovedAllIconsWorkItem::RemovedAllIconsWorkItem): Deleted.
127         (WebCore::RemovedAllIconsWorkItem::performWork): Deleted.
128         (WebCore::FinishedURLImport::FinishedURLImport): Deleted.
129         (WebCore::FinishedURLImport::performWork): Deleted.
130         (WebCore::performWorkItem): Deleted.
131         * loader/icon/IconDatabase.h:
132
133 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
134
135         Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProxy with C++11 lambdas
136         https://bugs.webkit.org/show_bug.cgi?id=133375
137
138         Reviewed by Darin Adler.
139
140         Uses of CrossThreadTask in the two classes are replaced with C++11 lambdas.
141         The necessary cross-thread copies are created manually and passed into the
142         lambdas by value, removing the need for CrossThreadTask and its use of CrossThreadCopier.
143
144         Remove the explicit use of this pointer in some lambdas -- it is captured automatically when
145         capturing by value, so enforcing its capturing through explicit use is not necessary.
146
147         * workers/DefaultSharedWorkerRepository.cpp:
148         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
149         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
150         (WebCore::postExceptionTask): Deleted.
151         (WebCore::postConsoleMessageTask): Deleted.
152         * workers/WorkerMessagingProxy.cpp:
153         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
154         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
155         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
156         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
157         (WebCore::WorkerMessagingProxy::connectToInspector):
158         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
159         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
160         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
161         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
162         (WebCore::WorkerMessagingProxy::reportPendingActivity):
163         (WebCore::postConsoleMessageTask): Deleted.
164         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Deleted.
165         (WebCore::connectToWorkerGlobalScopeInspectorTask): Deleted.
166         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Deleted.
167         (WebCore::dispatchOnInspectorBackendTask): Deleted.
168         * workers/WorkerMessagingProxy.h:
169
170 2014-06-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
171
172         Scheme of content utils should be compared in an ASCII case-insensitive manner
173         https://bugs.webkit.org/show_bug.cgi?id=133502
174
175         Reviewed by Darin Adler.
176
177         According to spec, scheme must be compared in an ASCII case-insensitive manner by user agents.
178
179         Covered by existing tests.
180
181         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
182         (WebCore::isProtocolWhitelisted):
183
184 2014-06-06  Andreas Kling  <akling@apple.com>
185
186         Indexed getters should return values directly on the PropertySlot.
187         <https://webkit.org/b/133586>
188
189         Make indexed getters more efficient by using PropertySlot::setValue()
190         to pass the value directly back through the slot, instead of giving it
191         a function pointer that JSC would then immediately call back through
192         to retrieve the value.
193
194         The function pointer approach would make sense if we did inline caching
195         of indexed getters but since we currently don't, this is pure overhead.
196
197         Reviewed by Darin Adler.
198
199         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
200         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
201         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): Deleted.
202         (WebCore::cssPropertyGetterCallback): Deleted.
203         * bindings/js/JSDOMWindowCustom.cpp:
204         (WebCore::JSDOMWindow::getOwnPropertySlot):
205         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
206         (WebCore::indexGetter): Deleted.
207         * bindings/scripts/CodeGeneratorJS.pm:
208         (GenerateGetOwnPropertySlotBody):
209         (GenerateHeader):
210         (GetIndexedGetterExpression):
211         (GenerateImplementation):
212         * bridge/runtime_array.cpp:
213         (JSC::RuntimeArray::getOwnPropertySlot):
214         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
215         (JSC::RuntimeArray::indexGetter): Deleted.
216         * bridge/runtime_array.h:
217
218 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
219
220         GenericCueData elements prematurely removed
221         https://bugs.webkit.org/show_bug.cgi?id=133588
222
223         Reviewed by Eric Carlson.
224
225         Add a 'removeCompletedCues' method instead of using the 'resetCueValues' method
226         after processing new cues. We do not want to reset cue state if we have pending
227         cues that are being extended by future updates (such as paint-on cues).
228
229         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
230         (WebCore::InbandTextTrackPrivateAVF::processCue):  Call new 'removeCompletedCues' method.
231         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Added.
232         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
233
234 2014-06-06  Brady Eidson  <beidson@apple.com>
235
236         Initialize a char* that needs to be initialized.
237         <rdar://problem/15840022> and https://bugs.webkit.org/show_bug.cgi?id=133585
238
239         Reviewed by Mark Rowe.
240
241         r152134 (erroneously) removed this initialization.
242
243         * platform/sql/SQLiteStatement.cpp:
244         (WebCore::SQLiteStatement::prepare): tail should start out initialized to 0.
245
246 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
247
248         [iOS] Support pasting HTML
249         https://bugs.webkit.org/show_bug.cgi?id=133581
250         <rdar://problem/17070305>
251
252         Reviewed by Enrica Casucci.
253
254         We can probably share a lot of code between Mac and iOS here, but for now, just
255         implement the unimplemented functions.
256
257         * editing/ios/EditorIOS.mm: (WebCore::Editor::WebContentReader::readHTML):
258         Implemented based on WebArchive reading code above, and on Mac version of readHTML.
259         Unlike on Mac, we don't need to support Microsoft CF_HTML format, as nothing
260         generates it.
261
262         * platform/ios/PasteboardIOS.mm:
263         (WebCore::Pasteboard::read):
264         (WebCore::Pasteboard::supportedPasteboardTypes):
265         Added HTML support, as the second preferred format after WebArchive.
266
267 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
268
269         Try to fix the build after http://trac.webkit.org/changeset/169655
270
271         Unfortunately, the fix is very fragile, and will likely not work for some SDKs
272         or possibly local headers - all OS versions have multiple SecBsse.h headers with
273         different definitions for SecIdentityRef.
274
275         We'll see.
276
277         * WebCore.exp.in:
278
279 2014-06-06  Dan Bernstein  <mitz@apple.com>
280
281         WebCore part of <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
282         https://bugs.webkit.org/show_bug.cgi?id=133527
283
284         Reviewed by Darin Adler.
285
286         * WebCore.exp.in: Exported some Credential member functions.
287
288 2014-06-06  Dean Jackson  <dino@apple.com>
289
290         [iOS WebGL] Float texture extension has a slightly different name
291         https://bugs.webkit.org/show_bug.cgi?id=133580
292         <rdar://problem/17113451>
293
294         Reviewed by Brady Eidson.
295
296         Floating point textures were not available on iOS, because we were
297         looking for the wrong extension.
298
299         Covered by the Khronos test (and in LayoutTests):
300         conformance/extensions/oes-texture-float.html
301
302         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
303         (WebCore::Extensions3DOpenGL::supportsExtension): Look for GL_OES_texture_float
304         as well as GL_ARB_texture_float.
305         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
306         (WebCore::GraphicsContext3D::texImage2D): Increase the set of things skipped
307         on PLATFORM(IOS) since they are supported natively there.
308
309 2014-06-05  David Hyatt  <hyatt@apple.com>
310
311         REGRESSION: Hit testing of composited elements is broken in new multicolumn layout.
312         https://bugs.webkit.org/show_bug.cgi?id=133522 (<rdar://problem/17060556>)
313         
314         Reviewed by Simon Fraser.
315
316         Hit testing for the new columns doesn't care about compositing but does still
317         need a pagination layer set to work. The old column code didn't care about this
318         because it was top down (and wrong). The new code lets each layer paint and hit
319         test its own fragments, so having a pagination layer set suddenly becomes relevant
320         for composited layers.
321     
322         The solution is to cache whether or not the pagination layer crosses a compositing
323         boundary, and then to force call sites of enclosingPaginationLayer to pass an argument
324         indicating whether compositing layers should be included. Typically painting wants to
325         exclude them but hit testing wants to include them.
326
327         * page/FrameView.cpp:
328         (WebCore::updateLayerPositionFlags):
329         * rendering/RenderLayer.cpp:
330         (WebCore::RenderLayer::RenderLayer):
331         (WebCore::RenderLayer::updateLayerPositions):
332         (WebCore::RenderLayer::updatePagination):
333         (WebCore::transparencyClipBox):
334         (WebCore::RenderLayer::paintLayer):
335         (WebCore::RenderLayer::paintLayerContents):
336         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
337         (WebCore::RenderLayer::collectFragments):
338         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
339         (WebCore::RenderLayer::hitTestLayer):
340         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
341         (WebCore::RenderLayer::calculateClipRects):
342         * rendering/RenderLayer.h:
343         * rendering/RenderLayerCompositor.cpp:
344         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
345
346 2014-06-06  Kiran  <kiran.guduru@samsung.com>
347
348         [MediaStream] 'get' prefix is missing for capabilities and constraints.
349         https://bugs.webkit.org/show_bug.cgi?id=133573
350
351         Reviewed by Eric Carlson.
352
353         Modified the existing MediaStreamTrack.html to test the changes.
354
355         As per the Media Capture and Streams spec method names constreaints and
356         capabilities should be prefixed by 'get'. So updated the method names.
357
358         * Modules/mediastream/MediaStreamTrack.cpp:
359         (WebCore::MediaStreamTrack::getConstraints):
360         (WebCore::MediaStreamTrack::getCapabilities):
361         (WebCore::MediaStreamTrack::constraints): Deleted.
362         (WebCore::MediaStreamTrack::capabilities): Deleted.
363         * Modules/mediastream/MediaStreamTrack.h:
364         * Modules/mediastream/MediaStreamTrack.idl:
365
366 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
367
368         REGRESSION(169440): Repro crash when playing a video with captions
369         https://bugs.webkit.org/show_bug.cgi?id=133459
370         <rdar://problem/17079081>
371
372         Reviewed by Eric Carlson.
373
374         The change I made in r169440 introduced a crash for paint-on captions. This
375         resolves the problem as follows:
376         1. No longer attempt to modify the start/endTime in the TextTrack implementation.
377         2. Check for extensions to existing cues when we are about to add new arriving
378            cues. If they extend a current pending cue, don't set an end-time for the
379            pending cue, and throw away the new duplicate. Otherwise set the end time
380            as previously and continue.
381
382         * html/track/TextTrack.cpp:
383         (WebCore::TextTrack::hasCue): Remove 'doesExtendCue' case since this is
384         no longer possible.
385         * platform/graphics/InbandTextTrackPrivateClient.h:
386         (WebCore::GenericCueData::doesExtendCueData): Added.
387         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
388         (WebCore::InbandTextTrackPrivateAVF::processCue): Check for cues extending
389         other cues and handle appropriately.
390
391 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
392
393         ROLLOUT: r169630: Caused a retain cycle.
394         https://bugs.webkit.org/show_bug.cgi?id=133463
395         <rdar://problem/17098100>
396
397         Rolling out this change as it introduced a retain cycle.
398
399         * Modules/mediacontrols/MediaControlsHost.cpp:
400         (WebCore::MediaControlsHost::setControllerJSObject): Deleted.
401         * Modules/mediacontrols/MediaControlsHost.h:
402         (WebCore::MediaControlsHost::controllerJSValue):
403         (WebCore::MediaControlsHost::setControllerJSValue):
404         (WebCore::MediaControlsHost::controllerJSObject): Deleted.
405         * html/HTMLMediaElement.cpp:
406         (WebCore::HTMLMediaElement::parseAttribute):
407
408 2014-06-05  Dean Jackson  <dino@apple.com>
409
410         StyleResolver doesn't compile without CSS_GRID_LAYOUT enabled
411         https://bugs.webkit.org/show_bug.cgi?id=133568
412
413         Reviewed by Tim Horton.
414
415         * css/StyleResolver.cpp:
416         (WebCore::isDisplayGridBox): Add UNUSED_PARAM.
417
418 2014-06-05  Mihnea Ovidenie  <mihnea@adobe.com>
419
420         [CSSRegions] Region box incorrectly overlaps floating box
421         https://bugs.webkit.org/show_bug.cgi?id=133545
422
423         Reviewed by David Hyatt.
424
425         A region box creates a BFC and it should not overlap a floating box in the same formatting context: http://www.w3.org/TR/CSS21/visuren.html#bfc-next-to-float
426
427         Test: fast/regions/region-as-bfc-avoids-float.html
428
429         * rendering/RenderBlock.cpp:
430         (WebCore::RenderBlock::avoidsFloats):
431
432 2014-06-05  Yoav Weiss  <yoav@yoav.ws>
433
434         Align srcset parser with recent spec changes
435         https://bugs.webkit.org/show_bug.cgi?id=133504
436
437         Reviewed by Darin Adler.
438
439         New tests were added to fast/hidpi/image-srcset-invalid-descriptor.html
440
441         The srcset parser changes align it with the spec:
442         http://picture.responsiveimages.org/#parse-srcset-attr.
443         The spec changes are meant to give the parser better future
444         compatibility, and enable it to work well with the 'w' descriptor, the
445         soon to be added 'h' descriptor and function descriptors (e.g.
446         future-descriptor(a, b, c) ).
447
448         * CMakeLists.txt:
449         * WebCore.vcxproj/WebCore.vcxproj:
450         * WebCore.vcxproj/WebCore.vcxproj.filters:
451         * WebCore.xcodeproj/project.pbxproj:
452         * html/HTMLImageElement.cpp:
453         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
454         (WebCore::HTMLImageElement::parseAttribute):
455         * html/HTMLImageElement.h:
456         * html/parser/HTMLParserIdioms.h:
457         (WebCore::isHTMLSpace):
458         (WebCore::isComma):
459         (WebCore::isHTMLSpaceOrComma):
460         * html/parser/HTMLPreloadScanner.cpp:
461         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
462         * html/parser/HTMLSrcsetParser.cpp:
463         (WebCore::compareByDensity):
464         (WebCore::appendDescriptorAndReset):
465         (WebCore::appendCharacter):
466         (WebCore::isEOF):
467         (WebCore::tokenizeDescriptors):
468         (WebCore::stringViewToFloat):
469         (WebCore::stringViewToInt):
470         (WebCore::parseDescriptors):
471         (WebCore::parseImageCandidatesFromSrcsetAttribute):
472         (WebCore::pickBestImageCandidate):
473         (WebCore::bestFitSourceForImageAttributes):
474         (WebCore::compareByScaleFactor): Deleted.
475         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
476         * html/parser/HTMLSrcsetParser.h:
477         (WebCore::DescriptorParsingResult::DescriptorParsingResult):
478         (WebCore::DescriptorParsingResult::hasDensity):
479         (WebCore::DescriptorParsingResult::hasWidth):
480         (WebCore::DescriptorParsingResult::hasHeight):
481         (WebCore::DescriptorParsingResult::density):
482         (WebCore::DescriptorParsingResult::resourceWidth):
483         (WebCore::DescriptorParsingResult::resourceHeight):
484         (WebCore::DescriptorParsingResult::setResourceWidth):
485         (WebCore::DescriptorParsingResult::setResourceHeight):
486         (WebCore::DescriptorParsingResult::setDensity):
487         (WebCore::ImageCandidate::ImageCandidate):
488         (WebCore::ImageCandidate::toString):
489         (WebCore::ImageCandidate::url):
490         (WebCore::ImageCandidate::setDensity):
491         (WebCore::ImageCandidate::density):
492         (WebCore::ImageCandidate::resourceWidth):
493         (WebCore::ImageCandidate::srcOrigin):
494         (WebCore::ImageCandidate::isEmpty):
495         (WebCore::ImageWithScale::ImageWithScale): Deleted.
496         (WebCore::ImageWithScale::imageURL): Deleted.
497         (WebCore::ImageWithScale::scaleFactor): Deleted.
498         * html/parser/ParsingUtilities.h: Renamed from Source/WebCore/html/track/ParsingUtilities.h.
499         (skipExactly):
500         (skipUntil):
501         (skipWhile):
502         (reverseSkipWhile):
503
504 2014-06-05 Wenson Hsieh  <wenson_hsieh@apple.com>
505
506         Current media controls look different from previous media controls. Adjusted CSS to make media elements more similar by adding padding, adjusting hues/svg, resizing elements, etc.
507
508         https://bugs.webkit.org/show_bug.cgi?id=133521
509
510         Reviewed by Eric Carlson.
511
512         The main issues:
513         - The widths between elements of both audio and video players are incorrect.
514         - The hues of audio player elements are incorrect.
515         - The hues of video player elements are content dependent (refer to full-screen mode), and this cannot be exactly replicated using just css. This patch only attempts to make them more similar.
516         - The height of the audio player is incorrect.
517
518         Test: platform/ios-sim/media/audio-width.html
519
520         * Modules/mediacontrols/mediaControlsiOS.css: Updated style elements for audio/video elements.
521         (::-webkit-media-controls): Enforce a minimum width on audio/video controls.
522         (audio): Enforce a minimum width on audio elements.
523         (audio::-webkit-media-controls): see below
524         (audio::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue and width/height.
525         (audio::-webkit-media-controls-panel): adjusted hue, added left/right padding.
526         (audio::-webkit-media-controls-fullscreen-button): removed. There's no fullscreen for audio anyways.
527         (audio::-webkit-media-controls-current-time-display): adjusted font size, added left padding.
528         (audio::-webkit-media-controls-time-remaining-display): adjusted font size, added right padding.
529
530         (video::-webkit-media-controls-panel): adjusted hue, added left/right padding.
531         (video::-webkit-media-controls-current-time-display): added left padding.
532         (video::-webkit-media-controls-time-remaining-display): added right padding.
533         (video::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue, opacity and width/height.
534         (video::-webkit-media-controls-fullscreen-button): modified SVG, hue, opacity, and width/height. In particular, made the svg seem sharper.
535         (video::-webkit-media-controls-play-button): modified SVG, hue, opacity, and width/height.
536
537 2014-06-05  Commit Queue  <commit-queue@webkit.org>
538
539         Unreviewed, rolling out r169570.
540         https://bugs.webkit.org/show_bug.cgi?id=133565
541
542         It breaks Baidu (Requested by benjaminp on #webkit).
543
544         Reverted changeset:
545
546         "[iOS] Start ignoring common bogus viewport parameters"
547         https://bugs.webkit.org/show_bug.cgi?id=133466
548         http://trac.webkit.org/changeset/169570
549
550 2014-06-05  Michael Timbrook  <timbrook@apple.com>
551
552         AX: Add support for ARIA 1.1 'none' role
553         https://bugs.webkit.org/show_bug.cgi?id=133367
554
555         Reviewed by Chris Fleizach.
556
557         Added support for the 'none' role by added a lookup for it to go to PresentationalRole
558         Test: accessibility/aria-none-role.html
559
560         * accessibility/AccessibilityObject.cpp:
561         (WebCore::initializeRoleMap):
562
563 2014-06-05  Joanmarie Diggs  <jdiggs@igalia.com>
564
565         AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
566         https://bugs.webkit.org/show_bug.cgi?id=133133
567
568         Reviewed by Chris Fleizach.
569
570         When a table or list has role='presentation', accessibility is "ignored"
571         for that element, but not for the required children. The default roles
572         for the children (CellRole and ListItemRole) do not make sense without
573         the parent, therefore map them to DivRole in ATK if they inherit the
574         presentational role.
575
576         Test: accessibility/aria-inherits-presentational.html
577
578         * accessibility/AccessibilityObject.h:
579         (WebCore::AccessibilityObject::inheritsPresentationalRole):
580         * accessibility/AccessibilityRenderObject.cpp:
581         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
582         * accessibility/AccessibilityRenderObject.h:
583         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
584         (atkRole):
585
586 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
587
588         REGRESSION (r167962): Out of bounds read in JSC::StructureIDTable::get() 
589         https://bugs.webkit.org/show_bug.cgi?id=133463
590         <rdar://problem/17098100>
591
592         Reviewed by Dean Jackson.
593
594         Revise MediaControllerHost implementation so that it holds a Strong
595         reference to the JavaScript 'Controller' object it mirrors. The
596         MediaControllerHost is constructed when we create an HTMLMediaElement,
597         and is the logical place to retain ownership of the JS object so that
598         it does not get garbage collected as long as HTMLMediaElement exists.
599
600         * Modules/mediacontrols/MediaControlsHost.cpp:
601         (WebCore::MediaControlsHost::setControllerJSObject): Create a strong
602         reference to the JavaScript Controller object.
603         * Modules/mediacontrols/MediaControlsHost.h: Use JSC::Strong to hold a
604         JSObject, rather than a bare JSValue.
605         (WebCore::MediaControlsHost::controllerJSObject): Change name to reflect
606         that we are working with JSObjects, not JSValues.
607         (WebCore::MediaControlsHost::controllerJSValue): Deleted.
608         (WebCore::MediaControlsHost::setControllerJSValue): Deleted.
609         * html/HTMLMediaElement.cpp:
610         (WebCore::HTMLMediaElement::parseAttribute): Revise for changed method
611         signature.
612
613 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
614
615         [iOS][WK2] Add device orientation
616         https://bugs.webkit.org/show_bug.cgi?id=133530
617
618         Reviewed by Tim Horton.
619
620         Previously, WebCore was getting the orientation directly from the WebKit layer.
621         This had to be done during the frame creation and was very fragile.
622
623         Frame is changed to pull the value from the chrome client. That way we avoid races
624         and we can maintain a single value for all frames.
625
626         Sending the values to all the subframes is aslo done here so that we do not have to repeat
627         it in both WebKit layers.
628
629         * WebCore.exp.in:
630         * loader/EmptyClients.h:
631         * page/ChromeClient.h:
632         * page/Frame.cpp:
633         (WebCore::Frame::Frame):
634         (WebCore::Frame::orientationChanged):
635         (WebCore::Frame::orientation):
636         (WebCore::Frame::sendOrientationChangeEvent): Deleted.
637         * page/Frame.h:
638         (WebCore::Frame::orientation): Deleted.
639
640 2014-06-05  Timothy Horton  <timothy_horton@apple.com>
641
642         Fix the !CACHE_SUBIMAGES build
643
644         * platform/graphics/cg/GraphicsContextCG.cpp:
645         (WebCore::GraphicsContext::drawNativeImage):
646
647 2014-06-05  Yusuke Suzuki  <utatane.tea@gmail.com>
648
649         CSS JIT: Clean up StackAllocator
650         https://bugs.webkit.org/show_bug.cgi?id=133506
651
652         Reviewed by Benjamin Poulain.
653
654         Cleaning up CSS JIt StackAllocator code. Sharing push / pop code and
655         using information provided by MacroAssembler more aggressively
656         to drop ifdefs.
657
658         * cssjit/StackAllocator.h:
659         (WebCore::StackAllocator::allocateUninitialized):
660         (WebCore::StackAllocator::push):
661         (WebCore::StackAllocator::pop):
662         (WebCore::StackAllocator::popAndDiscard):
663         (WebCore::StackAllocator::popAndDiscardUpTo):
664         (WebCore::StackAllocator::alignStackPreFunctionCall):
665         (WebCore::StackAllocator::unalignStackPostFunctionCall):
666         (WebCore::StackAllocator::stackUnitInBytes):
667
668 2014-06-05  Zalan Bujtas  <zalan@apple.com>
669
670         Subpixel rendering: border-radius painting falls back to rectangle when the snapped rounded rect becomes non-renderable.
671         https://bugs.webkit.org/show_bug.cgi?id=133491
672
673         Reviewed by Simon Fraser.
674
675         Pixel snapping can change the rectangle's size when it is on a certain subpixel position. (usually it does not)
676         This patch ensures that the snapped rect is still renderable by adjusting the radii as well.
677
678         Test: fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html
679
680         * platform/graphics/RoundedRect.cpp:
681         (WebCore::RoundedRect::Radii::scale):
682         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
683         * platform/graphics/RoundedRect.h:
684
685 2014-06-05  Commit Queue  <commit-queue@webkit.org>
686
687         Unreviewed, rolling out r169587.
688         https://bugs.webkit.org/show_bug.cgi?id=133552
689
690         Calls a pure virtual method, crashes (Requested by ap on
691         #webkit).
692
693         Reverted changeset:
694
695         "WebKit should adopt journal_mode=wal for all SQLite
696         databases."
697         https://bugs.webkit.org/show_bug.cgi?id=133496
698         http://trac.webkit.org/changeset/169587
699
700 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
701
702         Apply Character-level mirroring to stretchy operators in RTL mode.
703         https://bugs.webkit.org/show_bug.cgi?id=130839
704
705         Reviewed by Chris Fleizach.
706
707         We add support for character-level mirroring for stretchy MathML operators in RTL mode.
708         Glyph-level mirroring (via the rtlm OpenType feature) will be handled in bug 130840.
709
710         Test: mathml/presentation/stretchy-rtl.html
711
712         * rendering/mathml/RenderMathMLOperator.cpp: reorganize the Unicode stretchyCharacters table to make mirroring easy.
713         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): pass the right boolean to glyphDataForCharacter.
714         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): ditto
715         (WebCore::RenderMathMLOperator::findStretchyData): ditto and change the index for the stretchyCharacters fallback.
716         (WebCore::RenderMathMLOperator::updateStyle): pass the right boolean to glyphDataForCharacter.
717         (WebCore::RenderMathMLOperator::paint): remove the FIXME comment.
718         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): switch the leading/trailing space in RTL mode.
719
720 2014-06-05  Zalan Bujtas  <zalan@apple.com>
721
722         Subpixel rendering: Buttons in default media controls shift vertically when controls fade in or out.
723         https://bugs.webkit.org/show_bug.cgi?id=133488
724
725         Reviewed by Simon Fraser.
726
727         Filter effects are not subpixel aware yet. They paint to integrally sized image buffers.
728         In order to ensure that the content is rendered to the the same position on the filter 
729         source context as if there was no filter, the repaint rects need to be adjusted to match with
730         the internal filter snapping (enclosingIntRect).
731         This is a temporary change until after filter effects get subpixelized.
732
733         However, this changeset regresses RenderNameFlow clipping when the content is on subpixel position
734         and filter effect is present. Instead of adding the failing test cases to TestExpectations, I removed
735         the video controls from the <video> to make the tests pass, when possible (they just happen to have <video>)
736         and filed webkit.org/b/133523 to track the regression.
737
738         Test: css3/filters/filter-is-on-subpixel-position.html
739
740         * rendering/RenderLayer.cpp:
741         (WebCore::RenderLayer::setupFilters):
742
743 2014-06-05  Kiran  <kiran.guduru@samsung.com>
744
745         [MediaStream] MediaStream.addTrack should not check for tracks ended state.
746         https://bugs.webkit.org/show_bug.cgi?id=133510
747
748         Reviewed by Eric Carlson.
749
750         Adding and removing of tracks to a MediaStream should not have dependency
751         on tracks state. So the check for MediaStreamTrack's ended state has been
752         removed while adding a track in MediaStreamPrivate.cpp.
753
754         Test: fast/mediastream/MediaStream-add-ended-tracks.html
755
756         * platform/mediastream/MediaStreamPrivate.cpp:
757         (WebCore::MediaStreamPrivate::addTrack):
758
759 2014-06-05  Gwang Yoon Hwang  <yoon@igalia.com>
760
761         [GTK] Remove ScrollViewGtk.cpp
762         https://bugs.webkit.org/show_bug.cgi?id=133535
763
764         Reviewed by Carlos Garcia Campos.
765
766         Because GTK+ WK1 was removed, we don't have to consider special cases
767         handled in ScrollViewGtk.cpp.
768
769         No new tests are necessary because there is no behavior change.
770
771         * PlatformGTK.cmake:
772         * platform/ScrollView.cpp:
773         (WebCore::ScrollView::setScrollbarModes):
774         (WebCore::ScrollView::visibleContentRectInternal):
775         * platform/gtk/ScrollViewGtk.cpp: Removed.
776
777 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
778
779         MathML operators not stretched horizontally
780         https://bugs.webkit.org/show_bug.cgi?id=72828
781
782         Reviewed by Chris Fleizach.
783
784         This patch adds basic horizontal stretching rules for operators inside
785         an <munder>, <mover> or <munderover> elements. The stretchy operators
786         in such an element stretch to cover the size of the non-stretchy
787         operators. This only works when fonts that have an OpenType MATH table
788         are used.
789
790         Tests: mathml/opentype/horizontal-LatinModern.html
791                mathml/opentype/opentype-stretchy-horizontal.html
792                mathml/opentype/horizontal-LatinModern-munderover.html
793
794         * rendering/mathml/RenderMathMLOperator.cpp:
795         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): We add an ordered list of operators that have horizontal stretch direction.
796         (WebCore::RenderMathMLOperator::RenderMathMLOperator): init m_Vertical
797         (WebCore::RenderMathMLOperator::SetOperatorProperties): set m_Vertical by checking whether the operator is in the horizontalOperators list.
798         (WebCore::RenderMathMLOperator::stretchTo): We do not stretch vertically
799         if the operator has horizontal direction.
800         We also add a new version stretchTo(LayoutUnit width) for horizontal stretching only.
801         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Handle horizontal stretching: the maximumGlyphWidth is the maximum of
802         the base size or of the stretch size.
803         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): Add an ASSERT to ensure that this function is only called for vertical stretching.
804         (WebCore::RenderMathMLOperator::findStretchyData): Add an ASSERT to ensure that this function is not called to get the maximum width of a horizontal stretchy operator.
805         We take into account m_isVertical when calling getMathVariants or computing sizes.
806         There is not any Unicode-only construction for horizontal stretching, so a MATH table is required for horizontal stretching.
807         (WebCore::RenderMathMLOperator::updateStyle): Ignore some code paths specific to vertical stretching and take into account the m_Vertical parameters.
808         For horizontal stretching, the m_stretch*Baseline parameters are now updated to match the metrics of the size variant or of the maximum of the parts in the glyph assembly.
809         (WebCore::RenderMathMLOperator::computeLogicalHeight): logicalHeight is now explicitely the sum of m_stretchHeightAboveBaseline and m_stretchDepthBelowBaseline, since it can be different from the stretchSize() in horizontal stretching.
810         (WebCore::RenderMathMLOperator::paintGlyph): handle trimming for horizontal stretching.
811         (WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph): rename the function and ensure it is only call for m_isVertical.
812         (WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph): same as fillWithVerticalExtensionGlyph, but for horizontal stretching.
813         (WebCore::RenderMathMLOperator::paint): For glyph assembly, choose between paintVerticalGlyphAssembly or paintHorizontalGlyphAssembly.
814         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): rename the function and ensure it is only call for m_isVertical.
815         (WebCore::RenderMathMLOperator::paintHorizontalGlyphAssembly): same as paintVerticalGlyphAssembly but for horizontal stretching.
816         * rendering/mathml/RenderMathMLOperator.h: we add a m_isVertical member to indicate the stretch direction and a m_stretchWidth to indicate the width of the stretchy character.
817         We define the horizontal counterparts of fillWith*ExtensionGlyph, paint*GlyphAssembly, GlyphPaintTrimming  StretchyData.
818         Finally stretchSize() takes into account the stretch direction.
819         * rendering/mathml/RenderMathMLUnderOver.cpp: We override the layout() function to stretch munderover children horizontally.
820         (WebCore::RenderMathMLUnderOver::layout):
821         * rendering/mathml/RenderMathMLUnderOver.h: we declare layout().
822
823 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
824
825         [CSS Shapes] Image lifetime is not properly handled for gradient shapes
826         https://bugs.webkit.org/show_bug.cgi?id=133414
827
828         Reviewed by Simon Fraser.
829
830         Refactor computedShape() and it's helpers to be able to properly
831         manage the lifetime of the image returned from StyleImage.
832
833         This is a port of a Blink patch by Hans Muller.
834
835         Test: fast/shapes/shape-outside-floats/shape-outside-uncached-gradient.html
836
837         * rendering/shapes/ShapeOutsideInfo.cpp:
838         (WebCore::ShapeOutsideInfo::createShapeForImage): Properly handle the
839             lifetime of the image. Changed to use StyleImage::image() to get
840             the image in all cases there's no need to special case cached
841             images.
842         (WebCore::ShapeOutsideInfo::computedShape): Call createShapeForImage.
843         (WebCore::getShapeImageAndRect): Deleted.
844         * rendering/shapes/ShapeOutsideInfo.h:
845
846 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
847
848         [CSS Shapes] Fix off by one in creating a RasterShape
849         https://bugs.webkit.org/show_bug.cgi?id=133499
850
851         Reviewed by Darin Adler.
852
853         Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-crash.html
854
855         * rendering/shapes/RasterShape.cpp:
856         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
857             marginY1 is supposed to be an inclusive endpoint, however, maxY()
858             is an exclusive endpoint. This simply changes marginY1 into an
859             exclusive endpoint.
860
861 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
862
863         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
864         https://bugs.webkit.org/show_bug.cgi?id=133490
865
866         Reviewed by Tim Horton.
867
868         Expose the WebKit1 parameter "ScaleIsInitial". It is used for a similar concept in WebKit2 (userHasChangedPageScaleFactor).
869
870         Add "exposedContentPosition", which is the scroll position of the exposed rect.
871
872         * history/HistoryItem.h:
873         (WebCore::HistoryItem::exposedContentPosition):
874         (WebCore::HistoryItem::setExposedContentPosition):
875         (WebCore::HistoryItem::setScaleIsInitial):
876         * loader/HistoryController.cpp:
877         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
878
879 2014-06-04  Alex Christensen  <achristensen@webkit.org>
880
881         Enable WebGL on Windows.
882         https://bugs.webkit.org/show_bug.cgi?id=133503
883
884         Reviewed by Brent Fulgham.
885
886         No new tests, but we should enable the webgl tests soon.
887
888         * html/canvas/WebGLRenderingContext.cpp:
889         (WebCore::WebGLRenderingContext::markContextChanged):
890         Check if the context and RenderBox are accelerated to use accelerated code path.
891         * html/canvas/WebGLRenderingContext.h:
892         Disable accelerated compositing on WebGL canvases until that works.
893         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
894         (WebCore::GraphicsContext3D::reshapeFBOs):
895         Compile fix after r166563.
896
897 2014-06-04  Benjamin Poulain  <benjamin@webkit.org>
898
899         Regression(r169547): Crash in WebCore::styleForFirstLetter() while loading http://thenextweb.com/apple/2014/02/21/apple-confirms-acquired-testflight-creator-burstly/
900         https://bugs.webkit.org/show_bug.cgi?id=133500
901
902         Reviewed by Antti Koivisto.
903
904         Unlike the other tree marking optimization, adding HasPseudoStyle() on an element style
905         during style resolution must be conservative and not set the flag unless every other filter
906         matched first.
907
908         After r169547, the SelectorChecker was setting flags on HasPseudoStyle() during the pseudo
909         element matching. If that passed but the remaining filter did not match, the element style
910         could have the flag "FIRST_LETTER" while not being able to resolve a style for "FIRST_LETTER".
911
912         When the layout code was creating the renderer, it would find the FIRST_LETTER flag on the main style
913         and try to get the specific style for FIRST_LETTER. Since no rule would resolve for FIRST_LETTER,
914         the style would be null and the code would be crashing when accessing its parameters.
915
916         This patch fixes the issue by moving the style marking for pseudo element at the end of the matching.
917
918         Test: fast/css/first-letter-on-non-matching-selectors.html
919
920         * css/SelectorChecker.cpp:
921         (WebCore::SelectorChecker::match):
922         (WebCore::SelectorChecker::matchRecursively):
923         * css/SelectorChecker.h:
924         (WebCore::SelectorChecker::match): Deleted.
925
926 2014-06-04  Eric Carlson  <eric.carlson@apple.com>
927
928         [iOS] allow UA to specify network interface
929         https://bugs.webkit.org/show_bug.cgi?id=133396
930
931         Reviewed by Jer Noble.
932
933         * html/HTMLMediaElement.cpp:
934         (WebCore::HTMLMediaElement::mediaPlayerInterfaceName): Return settings->networkInterfaceName.
935         * html/HTMLMediaElement.h:
936
937         * platform/graphics/MediaPlayer.cpp:
938         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName): Pass through the media element.
939         * platform/graphics/MediaPlayer.h:
940         (WebCore::MediaPlayerClient::mediaPlayerNetworkInterfaceName):
941
942         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
943         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): If the media player
944             wants to use a specific netork interface name, pass it to the AVAsset allocator.
945
946 2014-06-03  Jon Honeycutt  <jhoneycutt@apple.com>
947
948         Pasting multiple photos on iOS only pastes one photo
949
950         <https://bugs.webkit.org/show_bug.cgi?id=133495>
951         <rdar://problem/16138616>
952
953         Reviewed by Alexey Proskuryakov.
954
955         * editing/ios/EditorIOS.mm:
956         (WebCore::Editor::pasteWithPasteboard):
957         Create a WebContentReader. For each pasteboard item, get the document
958         fragment for that item, and add it to the reader. If we fail to get
959         the fragment from the delegate, fall back to using
960         webContentFromPasteboard() as before.
961
962 2014-06-04  Myles C. Maxfield  <litherum@gmail.com>
963
964         Use references instead of pointers for non-optional arguments during text layout
965         https://bugs.webkit.org/show_bug.cgi?id=133501
966
967         Reviewed by Tim Horton.
968
969         This patch applies some cleanup to InlineBox layout functions to take
970         references instead of pointers where appropriate.
971
972         No new tests are necessary because there is no behavior change.
973
974         * rendering/InlineFlowBox.cpp:
975         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Make the function take a
976         reference to the RootInlineBox instead of a pointer. This function does some
977         rounding.
978         (WebCore::InlineFlowBox::addTextBoxVisualOverflow): Make the function take a
979         reference to the InlineTextBox instead of a pointer.
980         (WebCore::InlineFlowBox::computeOverflow): Update call to addTextBoxVisualOverflow
981         to pass a reference instead of a pointer.
982         * rendering/RootInlineBox.cpp:
983         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Update call to
984         computeLogicalBoxHeights to pass a reference instead of a pointer.
985         (WebCore::RootInlineBox::ascentAndDescentForBox): Make the function take a
986         reference to the InlineBox instead of a pointer.
987         (WebCore::RootInlineBox::includeLeadingForBox): Make the function take a reference
988         instead of a pointer.
989         (WebCore::RootInlineBox::includeFontForBox): Ditto.
990         (WebCore::RootInlineBox::includeGlyphsForBox): Ditto.
991         (WebCore::RootInlineBox::includeMarginForBox): Ditto.
992         * rendering/RootInlineBox.h: Move functions that are not externally called into
993         a private: section. In addition, update function signatures to take references
994         instead of pointers.
995
996 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
997
998         Lists styled with SVG fonts are not rendered as expected
999         https://bugs.webkit.org/show_bug.cgi?id=133198
1000
1001         Reviewed by Simon Fraser.
1002
1003         There were a couple places in RenderListMarker and RenderMenuList that were
1004         implicitly creating TextRuns by passing a String to a function which
1005         expected a TextRun. Because TextRun has a constructor which takes a single
1006         String and isn't marked explicit, TextRuns were being created without
1007         any of the associated code that initializes the TextRun (such as creating
1008         a RenderingContext if necessary).
1009
1010         There is currently one more client of this code that needs to be fixed.
1011         This is in RenderThemeIOS::adjustMenuListButtonStyle(). However, fixing
1012         this will be a somewhat large change, and is out of scope for this patch.
1013         I will submit a follow-up patch that fixes this permanently. Once this is
1014         fixed, I can mark TextRun's constructors as explicit.
1015
1016         Test: svg/custom/list-items-with-svg-font-family.html
1017
1018         * platform/graphics/TextRun.h:
1019         (WebCore::TextRun::TextRun): Mark constructors as explicit.
1020         * rendering/RenderListMarker.cpp:
1021         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
1022         RenderBlock::constructTextRun.
1023         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
1024         * rendering/RenderMenuList.cpp:
1025         (RenderMenuList::updateOptionsWidth): Ditto.
1026         * rendering/RenderThemeIOS.mm:
1027         (WebCore::adjustInputElementButtonStyle): Instead of crashing, mark
1028         form controls rendered with SVG fonts as having 0 width. This isn't
1029         perfect, but fixing this is out of scope for this patch.
1030
1031 2014-06-04  Andreas Kling  <akling@apple.com>
1032
1033         WebKit should adopt journal_mode=wal for all SQLite databases.
1034         <https://webkit.org/b/133496>
1035         <rdar://problem/15600186>
1036
1037         We already had code to enable write-ahead logging, but it didn't work
1038         since calling SQLiteStatement::step() without first calling prepare()
1039         is a no-op.
1040
1041         Converted it to use into a simple executeCommand() instead.
1042
1043         Reviewed by Brady Eidson.
1044
1045         * platform/sql/SQLiteDatabase.cpp:
1046         (WebCore::SQLiteDatabase::open):
1047
1048 2014-06-04  Radu Stavila  <stavila@adobe.com>
1049
1050         REGRESSION: [CSS Regions] Regions with overflow:auto generate scrollbars even if the content flows into the following regions and as such, should not be scrolled
1051         https://bugs.webkit.org/show_bug.cgi?id=133481
1052
1053         Reviewed by Antti Koivisto.
1054
1055         When enlarging the layout overflow of a scrollable region, the portion of the content that flows
1056         in the region must be taken into consideration. If the content continues to flow into the next
1057         region, the layout overflow of the current region must not be enlarged.
1058
1059         Test: fast/regions/scrollable-first-region.html
1060
1061         * rendering/RenderFlowThread.cpp:
1062         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1063
1064 2014-06-03  Benjamin Poulain  <benjamin@webkit.org>
1065
1066         Fix some corner cases of :hover and :active in quirks mode
1067         https://bugs.webkit.org/show_bug.cgi?id=133493
1068
1069         Reviewed by Andreas Kling.
1070
1071         Previously, the quirks mode of :hover and :active were evaluated from the SelectorFragment
1072         in fragmentOnlyMatchesLinksInQuirksMode(). There were two problems with that approach:
1073         1) The FragmentGenerator optimizes out some filter when they always match or can never match.
1074            Those fragment should still qualify :hover and :active, but they were lost
1075            for fragmentOnlyMatchesLinksInQuirksMode().
1076         2) Explicitely listing every attribute of SelectorFragment in fragmentOnlyMatchesLinksInQuirksMode()
1077            was extremly fragile. When :not() and :-webkit-any() were added, we forgot to update the quirks
1078            exceptions.
1079
1080         This patch moves the quirks mode exception code from the code generator to the Fragment generator.
1081         The useless filters are no longer ignored for the quirks, and we don't need to update the quirks mode detection
1082         with every change of SelectorFragment.
1083
1084         It is inefficient and ugly, but that is how that quirks is defined. It is only a problem for compilation,
1085         execution time remains unchanged.
1086
1087         * cssjit/SelectorCompiler.cpp:
1088         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1089         (WebCore::SelectorCompiler::addPseudoClassType):
1090         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1091         (WebCore::SelectorCompiler::pseudoClassOnlyMatchesLinksInQuirksMode):
1092         (WebCore::SelectorCompiler::constructFragments):
1093         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
1094         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode): Deleted.
1095
1096 2014-06-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1097
1098         Need to check invalid scheme in navigator content utils 
1099         https://bugs.webkit.org/show_bug.cgi?id=133296
1100
1101         Reviewed by Darin Adler.
1102
1103         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1104         (WebCore::verifyProtocolHandlerScheme): Just fix a wrong typo.
1105
1106 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1107
1108         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
1109         https://bugs.webkit.org/show_bug.cgi?id=133472
1110         <rdar://problem/15686848>
1111
1112         Reviewed by Simon Fraser.
1113
1114         * WebCore.exp.in:
1115
1116 2014-06-03  Yoav Weiss  <yoav@yoav.ws>
1117
1118         Refactor the srcset parser into its own file
1119         https://bugs.webkit.org/show_bug.cgi?id=133480
1120
1121         Reviewed by Andreas Kling.
1122
1123         No new tests, since this patch doesn't change the parser's behavior.
1124
1125         This patch moves the srcset parser into its own file,
1126         in order to prepare the code for alignment with recent spec changes.
1127
1128         * CMakeLists.txt:
1129         * html/HTMLImageElement.cpp:
1130         * html/parser/HTMLParserIdioms.cpp:
1131         (WebCore::compareByScaleFactor): Deleted.
1132         (WebCore::parseDescriptors): Deleted.
1133         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
1134         (WebCore::bestFitSourceForImageAttributes): Deleted.
1135         * html/parser/HTMLParserIdioms.h:
1136         (WebCore::ImageWithScale::ImageWithScale): Deleted.
1137         (WebCore::ImageWithScale::imageURL): Deleted.
1138         (WebCore::ImageWithScale::scaleFactor): Deleted.
1139         * html/parser/HTMLPreloadScanner.cpp:
1140         * html/parser/HTMLSrcsetParser.cpp: Added.
1141         (WebCore::compareByScaleFactor):
1142         (WebCore::parseDescriptors):
1143         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
1144         (WebCore::bestFitSourceForImageAttributes):
1145         * html/parser/HTMLSrcsetParser.h: Added.
1146         (WebCore::ImageWithScale::ImageWithScale):
1147         (WebCore::ImageWithScale::imageURL):
1148         (WebCore::ImageWithScale::scaleFactor):
1149
1150 2014-06-03  Mario Sanchez Prada  <mario.prada@samsung.com>
1151
1152         [ATK] accessibility/textarea-selected-text-range.html is failing
1153         https://bugs.webkit.org/show_bug.cgi?id=133479
1154
1155         Reviewed by Chris Fleizach.
1156
1157         Implement atk_text_set_caret_offset() in terms of
1158         atk_text_set_selection() for zero-length selections.
1159
1160         No new tests needed, the following test should just start
1161         passing again now: accessibility/textarea-selected-text-range.html.
1162
1163         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1164         (webkitAccessibleTextSetCaretOffset): Reimplemented this function
1165         in terms of webkitAccessibleTextSetSelection().
1166
1167 2014-06-03  Alex Christensen  <achristensen@webkit.org>
1168
1169         Corrected arm64 assertion in css jit.
1170
1171         Rubber stamped by Benjamin Poulain.
1172
1173         * cssjit/StackAllocator.h:
1174         (WebCore::StackAllocator::pop):
1175         Changed assertion from incorrectly matching x86_64 to using the correct minimum offset,
1176         taking into account that a stackUnitInBytes is used for two registers on arm64
1177         except the last stack unit, which could only be used for one register if there are
1178         an odd number of registers.
1179
1180 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
1181
1182         [iOS] Start ignoring common bogus viewport parameters
1183         https://bugs.webkit.org/show_bug.cgi?id=133466
1184         <rdar://problem/16203396>
1185
1186         Reviewed by Sam Weinig.
1187
1188         Incorrect viewports are spreading really quickly lately. We have to start ignoring
1189         some combinations of arguments as they are almost always used incorrectly, causing
1190         a poor user experience on those websites.
1191
1192         * dom/ViewportArguments.cpp:
1193         (WebCore::finalizeViewportArguments):
1194
1195 2014-06-03  Yusuke Suzuki  <utatane.tea@gmail.com>
1196
1197         CSS JIT: add support for the "any" pseudo class
1198         https://bugs.webkit.org/show_bug.cgi?id=133473
1199
1200         Reviewed by Benjamin Poulain.
1201
1202         Add support for the :any pseudo class.
1203
1204         Test: fast/selectors/pseudo-class-any.html
1205
1206         * cssjit/SelectorCompiler.cpp:
1207         (WebCore::SelectorCompiler::addPseudoClassType):
1208         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1209         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1210         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesAnyPseudoClass):
1211
1212 2014-06-02  Jer Noble  <jer.noble@apple.com>
1213
1214         Update PlatformTimeRanges to use MediaTime rather than doubles for time values.
1215         https://bugs.webkit.org/show_bug.cgi?id=133454
1216
1217         Reviewed by Eric Carlson.
1218
1219         PlatformTimeRanges will now use MediaTime, so operations at the platform level won't
1220         lose precision when converting to and from doubles and rational time values like CMTime.
1221
1222         * Modules/mediasource/SourceBuffer.cpp:
1223         (WebCore::currentTimeFudgeFactor):
1224         (WebCore::SourceBuffer::hasCurrentTime):
1225         (WebCore::SourceBuffer::hasFutureTime):
1226         (WebCore::SourceBuffer::canPlayThrough):
1227         * html/HTMLMediaElement.cpp:
1228         (WebCore::HTMLMediaElement::parseAttribute):
1229         * html/TimeRanges.cpp:
1230         (WebCore::TimeRanges::TimeRanges):
1231         (WebCore::TimeRanges::start):
1232         (WebCore::TimeRanges::end):
1233         (WebCore::TimeRanges::add):
1234         (WebCore::TimeRanges::contain):
1235         (WebCore::TimeRanges::find):
1236         (WebCore::TimeRanges::nearest):
1237         (WebCore::TimeRanges::totalDuration):
1238         * platform/graphics/MediaPlayerPrivate.h:
1239         (WebCore::MediaPlayerPrivateInterface::seekable):
1240         * platform/graphics/PlatformTimeRanges.cpp:
1241         (WebCore::PlatformTimeRanges::create):
1242         (WebCore::PlatformTimeRanges::PlatformTimeRanges):
1243         (WebCore::PlatformTimeRanges::invert):
1244         (WebCore::PlatformTimeRanges::start):
1245         (WebCore::PlatformTimeRanges::end):
1246         (WebCore::PlatformTimeRanges::add):
1247         (WebCore::PlatformTimeRanges::contain):
1248         (WebCore::PlatformTimeRanges::find):
1249         (WebCore::PlatformTimeRanges::nearest):
1250         (WebCore::PlatformTimeRanges::totalDuration):
1251         * platform/graphics/PlatformTimeRanges.h:
1252         (WebCore::PlatformTimeRanges::Range::Range):
1253         (WebCore::PlatformTimeRanges::Range::isPointInRange):
1254         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1255         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
1256         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1257         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
1258         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1259         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
1260         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1261         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
1262         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Deleted.
1263         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1264         (WebCore::MediaPlayerPrivateQTKit::buffered):
1265         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1266         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1267         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1268         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1269
1270 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
1271
1272         [iOS][WK2] Align the highlight rects with device pixels
1273         https://bugs.webkit.org/show_bug.cgi?id=133464
1274
1275         Reviewed by Enrica Casucci.
1276
1277         Add utility functions to pixel align points and rects.
1278
1279         * WebCore.exp.in:
1280         * platform/graphics/FloatPoint.h:
1281         (WebCore::flooredToDevicePixels):
1282         (WebCore::ceiledToDevicePixels):
1283         * platform/graphics/FloatRect.cpp:
1284         (WebCore::enclosingRectExtendedToDevicePixels):
1285         * platform/graphics/FloatRect.h:
1286
1287 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1288
1289         Prepopulated tiles may never be unparented from TileGrids with aggressive tile retention on
1290         https://bugs.webkit.org/show_bug.cgi?id=133471
1291
1292         Reviewed by Simon Fraser.
1293
1294         * platform/graphics/ca/mac/TileController.h:
1295         * platform/graphics/ca/mac/TileGrid.h:
1296         (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
1297         * platform/graphics/ca/mac/TileGrid.mm:
1298         (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
1299         (WebCore::TileGrid::cohortRemovalTimerFired):
1300         Factor timeUntilExpiration() out of cohortRemovalTimerFired().
1301
1302         (WebCore::TileGrid::revalidateTiles):
1303         Ensure that secondary tiles that never touch the primary coverage rect
1304         are still unparented eventually (after 2 seconds, the same lifetime we use
1305         for cohorts in non-aggressive retention).
1306         Schedule another revalidateTiles if we left parented secondary tiles behind.
1307
1308 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1309
1310         TileGrid::prepopulateRect populates the wrong tiles if scale != 1
1311         https://bugs.webkit.org/show_bug.cgi?id=133470
1312
1313         Reviewed by Simon Fraser.
1314
1315         * page/FrameView.cpp:
1316         (WebCore::FrameView::requestScrollPositionUpdate):
1317         * platform/graphics/ca/mac/TileGrid.mm:
1318         (WebCore::TileGrid::prepopulateRect):
1319         (WebCore::TileGrid::revalidateTiles):
1320         prepopulateRect takes rects in "content" coordinates, but when later passed to
1321         ensureTilesForRect, they're expected to be in the same coordinate space as the layer's
1322         visible rect, and are scaled up. So, apply the inverse scale to counter that.
1323
1324 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1325
1326         Minor TileCoverageMap refinements
1327         https://bugs.webkit.org/show_bug.cgi?id=133468
1328
1329         Reviewed by Simon Fraser.
1330
1331         * platform/graphics/ca/mac/TileController.mm:
1332         (WebCore::TileController::setContentsScale):
1333         * platform/graphics/ca/mac/TileCoverageMap.h:
1334         * platform/graphics/ca/mac/TileCoverageMap.mm:
1335         (WebCore::TileCoverageMap::TileCoverageMap):
1336         (WebCore::TileCoverageMap::setDeviceScaleFactor):
1337         Keep the TileCoverageMap's contentsScale at the device scale factor, so that it
1338         looks sharp on non-1x displays.
1339
1340         (WebCore::TileCoverageMap::update):
1341         Decrease the height available for the TileCoverageMap by the topContentInset;
1342         it's already being vertically offset by the topContentInset, but the height was
1343         not adjusted, so it would run off the bottom of the window.
1344
1345         * platform/graphics/ca/mac/TileGrid.mm:
1346         (WebCore::TileGrid::drawTileMapContents):
1347         If using aggressive tile retention (and thus not coloring tiles based on age),
1348         dim tiles that aren't in the visible cohort.
1349
1350 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1351
1352         Fix a typo, TileGrid::updateTilerLayerProperties
1353         https://bugs.webkit.org/show_bug.cgi?id=133474
1354
1355         Reviewed by Anders Carlsson.
1356
1357         * platform/graphics/ca/mac/TileController.mm:
1358         (WebCore::TileController::setAcceleratesDrawing):
1359         (WebCore::TileController::setTilesOpaque):
1360         (WebCore::TileController::setTileDebugBorderWidth):
1361         (WebCore::TileController::setTileDebugBorderColor):
1362         * platform/graphics/ca/mac/TileGrid.h:
1363         * platform/graphics/ca/mac/TileGrid.mm:
1364         (WebCore::TileGrid::updateTileLayerProperties):
1365         (WebCore::TileGrid::updateTilerLayerProperties):
1366         s/updateTilerLayerProperties/updateTileLayerProperties/g
1367
1368 2014-06-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1369
1370         [SOUP] ResourceLoadTiming.responseStart is always 0
1371         https://bugs.webkit.org/show_bug.cgi?id=133469
1372
1373         Reviewed by Sergio Villar Senin.
1374
1375         * platform/network/soup/ResourceHandleSoup.cpp:
1376         (WebCore::sendRequestCallback): Record the responseStart time.
1377
1378 2014-06-02  David Kilzer  <ddkilzer@apple.com>
1379
1380         [iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error: use of undeclared identifier '_CFURLConnectionCopyTimingData'
1381         <http://webkit.org/b/133445>
1382         <rdar://problem/17090035>
1383
1384         Reviewed by Alexey Proskuryakov.
1385
1386         * platform/network/mac/ResourceHandleMac.mm: Attempt to fix the
1387         build by including a private header and local declaration.
1388
1389 2014-05-31  Anders Carlsson  <andersca@apple.com>
1390
1391         Change DeferrableOneShotTimer to use std::function instead of being a class template
1392         https://bugs.webkit.org/show_bug.cgi?id=133423
1393
1394         Reviewed by Antti Koivisto.
1395
1396         Also, add a new constructor to DeferrableOneShotTimer that takes an std::function. Change the callback
1397         to not pass a DeferrableOneShotTimer& anymore. Change the delay parameter to use std::chrono::milliseconds.
1398
1399         * css/CSSImageGeneratorValue.cpp:
1400         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
1401         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
1402         * css/CSSImageGeneratorValue.h:
1403         * html/HTMLPlugInImageElement.cpp:
1404         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
1405         * html/HTMLPlugInImageElement.h:
1406         * loader/cache/CachedResource.cpp:
1407         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
1408         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
1409         (WebCore::CachedResource::decodedDataDeletionTimerFired):
1410         * loader/cache/CachedResource.h:
1411         * loader/cache/MemoryCache.cpp:
1412         (WebCore::MemoryCache::MemoryCache):
1413         * loader/cache/MemoryCache.h:
1414         (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
1415         (WebCore::MemoryCache::deadDecodedDataDeletionInterval):
1416         * platform/Timer.h:
1417         (WebCore::Timer::Timer):
1418         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
1419         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
1420         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
1421         * platform/graphics/cg/SubimageCacheWithTimer.h:
1422
1423 2014-06-02  Benjamin Poulain  <benjamin@webkit.org>
1424
1425         Make pseudo element matching for style resolution more JIT friendly
1426         https://bugs.webkit.org/show_bug.cgi?id=133441
1427
1428         Reviewed by Antti Koivisto.
1429
1430         Sharing pseudo elements is a complicated mess shared between the SelectorChecker
1431         and the RuleCollector.
1432
1433         For compiling pseudo element matching, it would be best if all the complexity could
1434         be moved to compile time instead of runtime. It is also preferable to keep the compiler
1435         independant of the RuleCollector implementation's detail.
1436
1437         This patch is a first step toward that goal. The main objective here is to make
1438         "dynamicPseudo" completely internal to the SelectorChecker.
1439         This is mostly a mechanical change, it is likely PseudoElement matching could be simplified
1440         further but that is not attempted here.
1441
1442         Test: fast/css/style-sharing-empty-rule-modification.html
1443
1444         * css/ElementRuleCollector.cpp:
1445         (WebCore::ElementRuleCollector::ruleMatches):
1446         The condition regarding pseudo element matching has been moved into SelectorChecker::match().
1447
1448         This creates an extra cost for querySelector(), but that should be fine since the vast majority
1449         of selectors are JIT compiled and never use SelectorChecker in the first place.
1450
1451         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1452         The loop is changed such that the tree marking (Style::setHasPseudoStyle) could be moved
1453         to SelectorChecker.
1454
1455         The conditions about the security origin for getMatchedCSSRules() and the empty style rules
1456         are moved prior to the call to ElementRuleCollector::ruleMatches(). This ensure we keep the same
1457         behavior of not adding the pseudo style for empty rules (this could also help with tree marking
1458         in general but empty rules are probably uncommon).
1459
1460         There is one behavior change from making this loop simpler: the SharingRules and StyleInvalidation
1461         modes now update their ruleRange. It is useless but it is simpler.
1462
1463         * css/ElementRuleCollector.h:
1464         * css/SelectorChecker.cpp:
1465         (WebCore::SelectorChecker::matchRecursively):
1466         The tree marking has been moved here.
1467
1468         * css/SelectorChecker.h:
1469         (WebCore::SelectorChecker::match):
1470         The pseudo element matching has been moved here.
1471
1472         * css/StyleResolver.h:
1473         (WebCore::checkRegionSelector):
1474         * dom/SelectorQuery.cpp:
1475         (WebCore::SelectorDataList::selectorMatches):
1476
1477 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
1478
1479         Send external playback properties to fullscreen.
1480         https://bugs.webkit.org/show_bug.cgi?id=133366
1481
1482         Reviewed by Simon Fraser.
1483
1484         Refactor property updates in WebVideoFullscreenModelMediaElement and update
1485         setExternalPlayback on webkitcurrentplaybacktargetiswirelesschangedEvent.
1486
1487         * WebCore.exp.in: Add export for setExternalPlayback.
1488         * platform/ios/WebVideoFullscreenInterface.h: add setExternalPlayback
1489         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: add setExternalPlayback
1490         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1491         (-[WebAVPlayerController isPlayingOnExternalScreen]): added
1492         (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): added
1493         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): added
1494         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): added
1495         * platform/ios/WebVideoFullscreenModelMediaElement.h: add updateForEventName
1496         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1497         (WebVideoFullscreenModelMediaElement::setMediaElement): refactor property changes into updateForEventName()
1498         (WebVideoFullscreenModelMediaElement::handleEvent): refactor property changes into updateForEventName()
1499         (WebVideoFullscreenModelMediaElement::updateForEventName): remove duplicate code, implement for setExternalPlayback
1500
1501 2014-06-02  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1502
1503         WebCore build fix for webreplay
1504         https://bugs.webkit.org/show_bug.cgi?id=133401
1505
1506         Reviewed by Darin Adler.
1507
1508         * replay/MemoizedDOMResult.cpp:
1509         (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
1510         Add a default nullptr return in order to avoid a gcc warning.
1511         The warning is because of a non-void method that has a case which doesn't return.
1512         * replay/ReplayController.cpp:
1513         (WebCore::ReplayController::setForceDeterministicSettings):
1514         Guard the ScrollingCoordinator with the appropriate #ifdef.
1515         * replay/SerializationMethods.cpp:
1516         Guard the KeypressCommand with COCOA as it is only present there.
1517
1518 2014-06-02  Jer Noble  <jer.noble@apple.com>
1519
1520         Further unreviewed GTK build fix after r169536.
1521
1522         Update the m_duration contructor in MediaSourceGStreamer.
1523
1524         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1525         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
1526
1527 2014-06-02  Jer Noble  <jer.noble@apple.com>
1528
1529         Unreviewed GTK build fix after r169536.
1530
1531         Update MediaSourceGStreamer to match new duration parameters.
1532
1533         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1534         (WebCore::MediaSourceGStreamer::setDuration): Ditto.
1535         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
1536         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1537
1538 2014-06-02  Jer Noble  <jer.noble@apple.com>
1539
1540         [MSE][Mac] Media does not generate 'ended' event when playing to duration.
1541         https://bugs.webkit.org/show_bug.cgi?id=133452
1542
1543         Reviewed by Eric Carlson.
1544
1545         Add a boundaryTimeObserver to the AVSampleBufferRenderSynchronizer to detect when
1546         playback crosses the duration boundary, and pause in that event. Also refuse to begin
1547         playback if the currentTime is beyond the duration. Also, pause playback if duration
1548         becomes less than currentTime.
1549
1550         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1551         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1552         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
1553         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
1554         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
1555         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
1556         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
1557
1558         Update MediaSource::duration() and ::setDuration() to take and give MediaTimes rather than doubles:
1559         * Modules/mediasource/MediaSource.cpp:
1560         (WebCore::MediaSource::duration): double -> MediaTime.
1561         (WebCore::MediaSource::setDuration): Ditto.
1562         (WebCore::MediaSource::streamEndedWithError): Ditto.
1563         * platform/graphics/MediaSourcePrivate.h: Ditto.
1564         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1565         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1566         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Ditto.
1567         (WebCore::MediaSourcePrivateAVFObjC::duration): Ditto.
1568         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Ditto.
1569         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1570         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Ditto.
1571         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Ditto.
1572         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
1573         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
1574         (WebCore::MockMediaPlayerMediaSource::updateDuration): Ditto.
1575         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1576         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1577         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Ditto.
1578         (WebCore::MockMediaSourcePrivate::duration): Ditto.
1579         (WebCore::MockMediaSourcePrivate::setDuration): Ditto.
1580         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1581
1582 2014-06-02  Zalan Bujtas  <zalan@apple.com>
1583
1584         Rename ImagePaintingContext to ImagePaintingOptions.
1585         https://bugs.webkit.org/show_bug.cgi?id=133451
1586
1587         Reviewed by Simon Fraser.
1588
1589         No change in functionality.
1590
1591         * WebCore.exp.in:
1592         * html/HTMLCanvasElement.cpp:
1593         (WebCore::HTMLCanvasElement::paint):
1594         * html/canvas/CanvasRenderingContext2D.cpp:
1595         (WebCore::CanvasRenderingContext2D::drawImage):
1596         * platform/graphics/GraphicsContext.cpp:
1597         (WebCore::GraphicsContext::drawImage):
1598         (WebCore::GraphicsContext::drawTiledImage):
1599         (WebCore::GraphicsContext::drawImageBuffer):
1600         * platform/graphics/GraphicsContext.h:
1601         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
1602         (WebCore::ImagePaintingContext::ImagePaintingContext): Deleted.
1603         * rendering/RenderBoxModelObject.cpp:
1604         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1605         * rendering/RenderEmbeddedObject.cpp:
1606         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1607         * rendering/RenderImage.cpp:
1608         (WebCore::RenderImage::paintIntoRect):
1609         * rendering/RenderSnapshottedPlugIn.cpp:
1610         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1611
1612 2014-05-31  Brent Fulgham  <bfulgham@apple.com>
1613
1614         REGRESSION (r154622): Borders disappear when hovering over cells in table
1615         https://bugs.webkit.org/show_bug.cgi?id=133057
1616         <rdar://problem/15922359>
1617
1618         Reviewed by Tim Horton.
1619
1620         * rendering/RenderTableCell.cpp:
1621         (WebCore::RenderTableCell::paintCollapsedBorders): Revert recent
1622         non-edge collapsed border optimization due to drawing
1623         regressions.
1624
1625 2014-06-02  Zalan Bujtas  <zalan@apple.com>
1626
1627         Provide better encapsulation for image related painting properties.
1628         https://bugs.webkit.org/show_bug.cgi?id=133434
1629
1630         Reviewed by Darin Adler.
1631
1632         Image related drawing property list keeps growing for the functions below and results in
1633         multiple overloadings with seemingly random default parameters.
1634         
1635         GraphicsContext::drawImage()
1636         GraphicsContext::drawTiledImage()
1637         GraphicsContext::drawImageBuffer()
1638         
1639         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
1640         introducing a new property does not result in yet another overloaded function.
1641
1642         No change in functionality.
1643
1644         * WebCore.exp.in:
1645         * html/HTMLCanvasElement.cpp:
1646         (WebCore::HTMLCanvasElement::paint):
1647         * html/canvas/CanvasRenderingContext2D.cpp:
1648         (WebCore::CanvasRenderingContext2D::drawImage):
1649         (WebCore::CanvasRenderingContext2D::compositeBuffer):
1650         * platform/graphics/GraphicsContext.cpp:
1651         (WebCore::GraphicsContext::drawImage):
1652         (WebCore::GraphicsContext::drawTiledImage):
1653         (WebCore::GraphicsContext::drawImageBuffer):
1654         * platform/graphics/GraphicsContext.h:
1655         (WebCore::ImagePaintingContext::ImagePaintingContext):
1656         * platform/graphics/ShadowBlur.cpp:
1657         (WebCore::ShadowBlur::endShadowLayer):
1658         * platform/graphics/cairo/ImageBufferCairo.cpp:
1659         (WebCore::ImageBuffer::draw):
1660         * platform/graphics/filters/FEComposite.cpp:
1661         (WebCore::FEComposite::platformApplySoftware):
1662         * rendering/FilterEffectRenderer.cpp:
1663         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1664         * rendering/RenderBoxModelObject.cpp:
1665         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1666         * rendering/RenderEmbeddedObject.cpp:
1667         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1668         * rendering/RenderImage.cpp:
1669         (WebCore::RenderImage::paintReplaced):
1670         (WebCore::RenderImage::paintIntoRect):
1671         * rendering/RenderSnapshottedPlugIn.cpp:
1672         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1673
1674 2014-06-02  Commit Queue  <commit-queue@webkit.org>
1675
1676         Unreviewed, rolling out r169529.
1677         https://bugs.webkit.org/show_bug.cgi?id=133447
1678
1679         caused assert in drawImage() (Requested by zalan on #webkit).
1680
1681         Reverted changeset:
1682
1683         "Provide better encapsulation for image related painting
1684         properties."
1685         https://bugs.webkit.org/show_bug.cgi?id=133434
1686         http://trac.webkit.org/changeset/169529
1687
1688 2014-06-02  Zalan Bujtas  <zalan@apple.com>
1689
1690         Provide better encapsulation for image related painting properties.
1691         https://bugs.webkit.org/show_bug.cgi?id=133434
1692
1693         Reviewed by Darin Adler.
1694
1695         Image related drawing property list keeps growing for the functions below and results in
1696         multiple overloadings with seemingly random default parameters.
1697         
1698         GraphicsContext::drawImage()
1699         GraphicsContext::drawTiledImage()
1700         GraphicsContext::drawImageBuffer()
1701         
1702         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
1703         introducing a new property does not result in yet another overloaded function.
1704
1705         No change in functionality.
1706
1707         * WebCore.exp.in:
1708         * html/HTMLCanvasElement.cpp:
1709         (WebCore::HTMLCanvasElement::paint):
1710         * html/canvas/CanvasRenderingContext2D.cpp:
1711         (WebCore::CanvasRenderingContext2D::drawImage):
1712         (WebCore::CanvasRenderingContext2D::compositeBuffer):
1713         * platform/graphics/GraphicsContext.cpp:
1714         (WebCore::GraphicsContext::drawImage):
1715         (WebCore::GraphicsContext::drawTiledImage):
1716         (WebCore::GraphicsContext::drawImageBuffer):
1717         * platform/graphics/GraphicsContext.h:
1718         (WebCore::ImagePaintingContext::ImagePaintingContext):
1719         * platform/graphics/ShadowBlur.cpp:
1720         (WebCore::ShadowBlur::endShadowLayer):
1721         * platform/graphics/cairo/ImageBufferCairo.cpp:
1722         (WebCore::ImageBuffer::draw):
1723         * platform/graphics/filters/FEComposite.cpp:
1724         (WebCore::FEComposite::platformApplySoftware):
1725         * rendering/FilterEffectRenderer.cpp:
1726         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1727         * rendering/RenderBoxModelObject.cpp:
1728         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1729         * rendering/RenderEmbeddedObject.cpp:
1730         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1731         * rendering/RenderImage.cpp:
1732         (WebCore::RenderImage::paintReplaced):
1733         (WebCore::RenderImage::paintIntoRect):
1734         * rendering/RenderSnapshottedPlugIn.cpp:
1735         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1736
1737 2014-06-02  Kiran  <kiran.guduru@samsung.com>
1738
1739         Add mock DTMFSender support.
1740         https://bugs.webkit.org/show_bug.cgi?id=133298
1741
1742         Reviewed by Eric Carlson.
1743
1744         Implemented mock implementation for RTCPeerConnectionHandler. Now creating
1745         RTCDTMFSenderHandlerMock and returning while creating DTMFSender instead of
1746         returning null.
1747        
1748         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
1749
1750         * CMakeLists.txt:
1751         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Added.
1752         (WebCore::RTCDTMFSenderHandlerMock::RTCDTMFSenderHandlerMock):
1753         (WebCore::RTCDTMFSenderHandlerMock::setClient):
1754         (WebCore::RTCDTMFSenderHandlerMock::insertDTMF):
1755         * platform/mock/RTCDTMFSenderHandlerMock.h: Added.
1756         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1757         (WebCore::RTCPeerConnectionHandlerMock::createDTMFSender):
1758
1759 2014-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1760
1761         [GTK] media controls should prevent 'click' events from reaching the page
1762         https://bugs.webkit.org/show_bug.cgi?id=133402
1763
1764         Reviewed by Eric Carlson.
1765
1766         When handling events, we events we need to return true in order
1767         that the superclass gets the value and prevents the execution of
1768         the default event handler in the page.
1769
1770         Test: media/media-controls-cancel-events.html
1771
1772         * Modules/mediacontrols/mediaControlsGtk.js:
1773         (ControllerGtk.prototype.handleMuteButtonMouseOver):
1774         (ControllerGtk.prototype.handleVolumeBoxMouseOut):
1775         (ControllerGtk.prototype.handleCaptionButtonClicked):
1776         (ControllerGtk.prototype.handleCaptionButtonMouseOver):
1777         (ControllerGtk.prototype.handleCaptionButtonShowMenu):
1778         (ControllerGtk.prototype.handleCaptionButtonMouseOut):
1779         (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
1780         prevent forwarding the event execution.
1781
1782 2014-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1783
1784         CSS JIT: add support for the "not" pseudo class
1785         https://bugs.webkit.org/show_bug.cgi?id=133314
1786
1787         Reviewed by Benjamin Poulain.
1788
1789         Add :not pseudo class support to CSS JIT. Current implementation
1790         doesn't support visitedMatchType. So when link pseudo class appears in
1791         :not sub fragment, fallback to the non-JIT implementation.
1792
1793         Tests: fast/selectors/not-active-hover-quirks.html
1794                fast/selectors/not-active-hover-strict.html
1795                fast/selectors/pseudo-class-not.html
1796
1797         * cssjit/SelectorCompiler.cpp:
1798         (WebCore::SelectorCompiler::addPseudoClassType):
1799         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1800         (WebCore::SelectorCompiler::constructFragments):
1801         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1802         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1803         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1804         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
1805         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1806         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
1807         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1808         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
1809         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): Deleted.
1810
1811 2014-06-01  Jer Noble  <jer.noble@apple.com>
1812
1813         [MSE] Appends of overlapping sample data do not clear existing samples properly.
1814         https://bugs.webkit.org/show_bug.cgi?id=133435
1815
1816         Reviewed by Darin Adler.
1817
1818         Test: media/media-source/media-source-overlapping-append.html
1819
1820         The MSE spec has a spec error in how it removes overlapping frames. The intention seems to be
1821         to check for overlapping samples only when the incoming sample increases the highest presentation time
1822         field. But due to a mismatch in the range of a sample, defined as [start, end), and the check, which 
1823         treats the end as inclusive, the overlapping check is almost never run.
1824
1825         Add the sample comparison logic to match [start, end) ranges, and rename the existing check to differentiate
1826         it from the new one:
1827         * Modules/mediasource/SampleMap.cpp:
1828         (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()):
1829         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
1830         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
1831         (WebCore::SampleMap::findSamplesWithinPresentationRange):
1832         * Modules/mediasource/SampleMap.h:
1833
1834         Update the overlapping check to occur whenever the highest presentation time increases, and update the
1835         logic within that check to catch all overlapping frames.
1836         * Modules/mediasource/SourceBuffer.cpp:
1837         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1838         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1839         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
1840         * Modules/mediasource/SourceBuffer.h:
1841         * WebCore.exp.in:
1842
1843         Add a dump method to MediaSample so that samples can be easily converted to a string for testing.
1844         * platform/MediaSample.h:
1845         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1846         (WebCore::MediaSampleAVFObjC::presentationSize):
1847         (WebCore::MediaSampleAVFObjC::dump):
1848
1849         Update the Mock MSE implementation to pass along a "generation" field, to aid in testing.
1850         * platform/mock/mediasource/MockBox.cpp:
1851         (WebCore::MockSampleBox::MockSampleBox):
1852         * platform/mock/mediasource/MockBox.h:
1853         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1854         (WebCore::MockMediaSample::dump):
1855
1856         Add a method to internals to dump the buffered samples to string.
1857         * Modules/mediasource/SourceBuffer.cpp:
1858         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
1859         * Modules/mediasource/SourceBuffer.h:
1860         * testing/Internals.cpp:
1861         (WebCore::Internals::bufferedSamplesForTrackID):
1862         * testing/Internals.h:
1863         * testing/Internals.idl:
1864
1865 2014-06-01  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1866
1867         getBBox() returns (0,0) when width or height is zero.
1868         https://bugs.webkit.org/show_bug.cgi?id=93290
1869
1870         Reviewed by Philip Rogers.
1871
1872         The SVG spec states that a width or height of zero for  rects, circles and
1873         ellipses is valid but disables rendering of that shape.
1874         In this case, getBBox() should return the actual bounding box of the element.
1875         Previously, WebKit always returned (0,0,0,0) rather than the
1876         correct bounding box. This patch fixes that. 
1877
1878         Rects and ellipses both now follow the same behaviour where
1879         the fall-back code path is only used when the shape will render (e.g. not
1880         when a dimension <= 0).
1881   
1882         This necessitates calling calculateRadiiAndCenter for ellipses even
1883         when the calculated values will be discarded in the fall back code path.
1884         But calculateRadiiAndCenter is cheap and this avoids making changes 
1885         elsewhere to stop CG drawing a zero width (or height) ellipse.  
1886
1887         Tests: svg/custom/getBBox-js-circle-zerodimension.html
1888                svg/custom/getBBox-js-ellipse-zerodimension.html
1889                svg/custom/getBBox-js-rect-zerodimension.html
1890
1891         * rendering/svg/RenderSVGEllipse.cpp:
1892         (WebCore::RenderSVGEllipse::updateShapeFromElement):
1893         Only follow fall-back code path when shape renders. 
1894         width||height==0 is not an error case so calculate bounding box.        
1895
1896         * rendering/svg/RenderSVGRect.cpp:
1897         (WebCore::RenderSVGRect::updateShapeFromElement):
1898         Only follow fall-back code path when shape renders. 
1899         rx||ry==0 is not an error case so calculate bounding box.        
1900
1901 2014-06-01  Simon Fraser  <simon.fraser@apple.com>
1902
1903         Don't scroll to non-integral scroll offsets
1904         https://bugs.webkit.org/show_bug.cgi?id=133436
1905         <rdar://problem/17088336>
1906
1907         Reviewed by Darin Adler.
1908
1909         With the gradual migration of scroll offsets to floating point, we ended
1910         up with a fully floating point code path been event scroll deltas and
1911         setting scroll positions in the scrolling tree.
1912         
1913         With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
1914         come in with non-integral values, and that caused the scroll offset to be non-integral,
1915         resulting in fuzzy layer contents. So round the scroll position.
1916
1917         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1918         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
1919
1920 2014-05-31  Anders Carlsson  <andersca@apple.com>
1921
1922         Add a LazyNeverDestroyed class template and use it
1923         https://bugs.webkit.org/show_bug.cgi?id=133425
1924
1925         Reviewed by Darin Adler.
1926
1927         * Modules/webdatabase/DatabaseBackendBase.cpp:
1928         (WebCore::guidMutex):
1929         * crypto/CryptoAlgorithmRegistry.cpp:
1930         (WebCore::registryMutex):
1931         * inspector/WorkerDebuggerAgent.cpp:
1932         * loader/CrossOriginAccessControl.cpp:
1933         (WebCore::isOnAccessControlResponseHeaderWhitelist):
1934         * platform/network/NetworkStateNotifier.cpp:
1935         (WebCore::networkStateNotifier):
1936         * workers/DefaultSharedWorkerRepository.cpp:
1937         (WebCore::DefaultSharedWorkerRepository::instance):
1938         * workers/DefaultSharedWorkerRepository.h:
1939         * workers/WorkerThread.cpp:
1940         (WebCore::threadSetMutex):
1941         * xml/XMLHttpRequest.cpp:
1942         (WebCore::staticData):
1943
1944 2014-06-01  Zalan Bujtas  <zalan@apple.com>
1945
1946         Subpixel rendering: Selection gap produces a pixel line overlap on inline boxes.
1947         https://bugs.webkit.org/show_bug.cgi?id=133429
1948
1949         Reviewed by Simon Fraser.
1950
1951         Do not floor logical right/left values when selection gap is calculated for RenderBlocks.
1952         It produces overlapping line/gap because the floored value is intersecting/too far from the
1953         non-floored content selection rect.
1954
1955         Tests: fast/inline/hidpi-selection-gap-and-inline-selection-have-gap-rtl.html
1956                fast/inline/hidpi-selection-gap-overlaps-inline-selection.html
1957
1958         * rendering/RenderBlock.cpp:
1959         (WebCore::RenderBlock::logicalLeftSelectionGap):
1960         (WebCore::RenderBlock::logicalRightSelectionGap):
1961
1962 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
1963
1964         REGRESSION (r169412): Garbage pixels when vertical rubber-banding on http://yvoschaap.com/pmarca/
1965         https://bugs.webkit.org/show_bug.cgi?id=133418
1966         <rdar://problem/17065494>
1967
1968         Reviewed by Sam Weinig.
1969
1970         * WebCore.exp.in:
1971         * platform/graphics/FloatPoint.h:
1972         (WebCore::toFloatPoint):
1973         * platform/graphics/Image.cpp:
1974         (WebCore::Image::drawTiled):
1975         The manual tiling code previously adjusted the initial
1976         tiling source rect so that if the pattern was out of phase,
1977         the first row and column would paint only the necessary part
1978         of the tile. However, it did not also adjust the destination rect,
1979         so the tile was painted in entirely the wrong place.
1980         Additional testing (by enabling manual tiling mode for all patterned
1981         images and running all of the layout tests) exposed another bug
1982         where the last row and column would paint too much, which
1983         was resolved by clipping to the outer image's destination rect.
1984
1985 2014-05-31  Benjamin Poulain  <benjamin@webkit.org>
1986
1987         CSS JIT cleanup: move two utility functions out of the properties-matcher section
1988         https://bugs.webkit.org/show_bug.cgi?id=133427
1989
1990         Reviewed by Andreas Kling.
1991
1992         Just move the code, no other modification.
1993
1994         * cssjit/SelectorCompiler.cpp:
1995         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
1996         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
1997
1998 2014-05-31  Darin Adler  <darin@apple.com>
1999
2000         Viewport percentage tests that resize the viewport are flaky
2001         https://bugs.webkit.org/show_bug.cgi?id=133351
2002
2003         Reviewed by Anders Carlsson.
2004
2005         * page/FrameView.cpp:
2006         (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
2007         The resize event will be sent as a side effect of layout instead.
2008         (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
2009         since this is what propagates the new geometry in so the JavaScript code can detect it. Also
2010         simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
2011         the code enqueues an event for an unknown time in the future. Removed the unneeded code that
2012         passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
2013         target by default.
2014
2015 2014-05-31  Anders Carlsson  <andersca@apple.com>
2016
2017         Don't use std::mutex::try_lock to check if we own a mutex
2018         https://bugs.webkit.org/show_bug.cgi?id=133421
2019
2020         Reviewed by Dan Bernstein.
2021
2022         According the C++ standard, calling try_lock on a mutex that's already owned by the current thread
2023         is undefined behavior, so don't do that.
2024
2025         * Modules/webdatabase/DatabaseBackendBase.cpp:
2026         (WebCore::guidToVersionMap):
2027         (WebCore::updateGuidVersionMap):
2028         (WebCore::guidToDatabaseMap):
2029         (WebCore::guidForOriginAndName):
2030
2031 2014-05-30  Enrica Casucci  <enrica@apple.com>
2032
2033         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
2034         https://bugs.webkit.org/show_bug.cgi?id=133413
2035         <rdar://problem/16948333>
2036
2037         Reviewed by Benjamin Poulain.
2038
2039         Adding utility functions and their exports.
2040
2041         * WebCore.exp.in:
2042         * editing/TextIterator.cpp:
2043         (WebCore::plainTextReplacingNoBreakSpace):
2044         * editing/TextIterator.h:
2045         * editing/VisibleUnits.cpp:
2046         (WebCore::charactersAroundPosition):
2047         (WebCore::characterBeforePosition): Deleted.
2048         * editing/VisibleUnits.h:
2049
2050 2014-05-30  Zalan Bujtas  <zalan@apple.com>
2051
2052         Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage*
2053         https://bugs.webkit.org/show_bug.cgi?id=133407
2054
2055         Reviewed by Darin Adler.
2056
2057         Add helper class to set/reset image interpolation quality value.
2058
2059         No change in functionality.
2060
2061         * platform/graphics/GraphicsContext.cpp:
2062         (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
2063         (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
2064         (WebCore::GraphicsContext::drawImage):
2065         (WebCore::GraphicsContext::drawTiledImage):
2066         (WebCore::GraphicsContext::drawImageBuffer):
2067
2068 2014-05-30  Myles C. Maxfield  <mmaxfield@apple.com>
2069
2070         Support -apple-system-font on OS X
2071         https://bugs.webkit.org/show_bug.cgi?id=133382
2072
2073         Addressing post-review comments.
2074
2075         * platform/mac/WebFontCache.mm:
2076         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2077
2078 2014-05-30  Prashant Hiremath  <hiremathprashants@gmail.com>
2079
2080         Remove repetitive header in HTMLInputElement.cpp
2081         https://bugs.webkit.org/show_bug.cgi?id=133376
2082
2083         Reviewed by Anders Carlsson.
2084
2085         It is just removal repeative headers hence no test needed.
2086
2087         * html/HTMLInputElement.cpp:
2088
2089 2014-05-30  Zalan Bujtas  <zalan@apple.com>
2090
2091         Remove redundant GraphicsContext::drawImage() function.
2092         https://bugs.webkit.org/show_bug.cgi?id=133347
2093
2094         Reviewed by Simon Fraser.
2095
2096         There are 2 GraphicsContext::drawImage functions with very similar parameter list. This looks
2097         to be a source of confusion and results in passing unneeded parameters.
2098
2099         No change in functionality.
2100
2101         * html/canvas/CanvasRenderingContext2D.cpp:
2102         (WebCore::CanvasRenderingContext2D::drawImage):
2103         (WebCore::drawImageToContext):
2104         * platform/graphics/GraphicsContext.cpp:
2105         (WebCore::GraphicsContext::drawImage):
2106         * platform/graphics/GraphicsContext.h:
2107         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2108         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2109         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2110         (WebCore::BitmapTextureImageBuffer::updateContents):
2111         * rendering/RenderBoxModelObject.cpp:
2112         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2113
2114 2014-05-29  Alex Christensen  <achristensen@webkit.org>
2115
2116         Prepare css jit for arm64 and other architectures.
2117         https://bugs.webkit.org/show_bug.cgi?id=133394
2118
2119         Reviewed by Benjamin Poulain.
2120
2121         * cssjit/FunctionCall.h:
2122         (WebCore::FunctionCall::swapArguments):
2123         * cssjit/RegisterAllocator.h:
2124         Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
2125         * cssjit/SelectorCompiler.cpp:
2126         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2127         Added assertion to make sure there are enough registers.
2128
2129 2014-05-29  Benjamin Poulain  <benjamin@webkit.org>
2130
2131         CSS JIT: add support for the pseudo classes :hover and :active
2132         https://bugs.webkit.org/show_bug.cgi?id=133295
2133
2134         Reviewed by Andreas Kling.
2135
2136         This patch adds compilation support for :hover and :active. The code generation of both of them is trivial,
2137         most of the patch is improving the infrastructure and safety.
2138
2139         The document compatibility mode is moved to its own typed enum. This ensure the values are exclusives and
2140         the native type is known (unsigned char here). The values are changes to binary flags to take advantage of
2141         test-and-branch on ARM64 (not used explicitely, it is automatically generated by the MacroAssembler).
2142
2143         The other important refactoring is the code updating the flags on RenderStyle::NonInheritedFlags.
2144         The code was duplicated in some places so it is move into its own function addFlagToElementStyleFromContext().
2145
2146         The generators themself are very simple. First we check the quirks-mode exceptions, that is generally excluded
2147         at compile time because the conditions are almost never met, even in strict mode.
2148         Then we have two cases: style resolution and query selector. Almost everything is just function calls.
2149
2150         * cssjit/SelectorCompiler.cpp:
2151         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2152         (WebCore::SelectorCompiler::addPseudoClassType):
2153         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagToElementStyleFromContext):
2154         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
2155         (WebCore::SelectorCompiler::getDocument):
2156         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
2157         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2158         (WebCore::SelectorCompiler::elementIsActive):
2159         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
2160         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2161         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2162         (WebCore::SelectorCompiler::elementIsHovered):
2163         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
2164         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2165         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2166         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2167         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2168         * dom/Document.cpp:
2169         (WebCore::Document::Document):
2170         (WebCore::Document::setCompatibilityMode):
2171         (WebCore::Document::implicitOpen):
2172         (WebCore::Document::cloneDataFromDocument):
2173         * dom/Document.h:
2174         (WebCore::Document::compatibilityModeMemoryOffset):
2175         (WebCore::Document::inQuirksMode):
2176         (WebCore::Document::inLimitedQuirksMode):
2177         (WebCore::Document::inNoQuirksMode):
2178         (WebCore::Document::compatibilityMode): Deleted.
2179         * html/ImageDocument.cpp:
2180         (WebCore::ImageDocument::ImageDocument):
2181         * html/MediaDocument.cpp:
2182         (WebCore::MediaDocument::MediaDocument):
2183         * html/PluginDocument.cpp:
2184         (WebCore::PluginDocument::PluginDocument):
2185         * html/TextDocument.cpp:
2186         (WebCore::TextDocument::TextDocument):
2187         * html/parser/HTMLConstructionSite.cpp:
2188         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
2189         (WebCore::HTMLConstructionSite::setCompatibilityMode):
2190         (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
2191         (WebCore::HTMLConstructionSite::insertDoctype):
2192         * html/parser/HTMLConstructionSite.h:
2193         * loader/DocumentWriter.cpp:
2194         (WebCore::DocumentWriter::replaceDocument):
2195         * loader/SinkDocument.cpp:
2196         (WebCore::SinkDocument::SinkDocument):
2197         * page/ios/FrameIOS.mm:
2198         (WebCore::Frame::initWithSimpleHTMLDocument):
2199         * rendering/style/RenderStyle.h:
2200
2201 2014-05-28  Jon Honeycutt  <jhoneycutt@apple.com>
2202
2203         Roll r168668 back in.
2204
2205         <https://bugs.webkit.org/show_bug.cgi?id=132621>
2206
2207         Reviewed by Brent Fulgham.
2208
2209         Tests: fast/events/beforeload-assertion.html
2210                fast/events/beforeload-iframe-crash.html
2211                fast/events/beforeload-input-time-crash.html
2212
2213         * WebCore.exp.in:
2214         * dom/Document.cpp:
2215         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
2216         * dom/Document.h:
2217         * html/HTMLAppletElement.cpp:
2218         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
2219         * html/HTMLEmbedElement.cpp:
2220         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
2221         * html/HTMLObjectElement.cpp:
2222         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
2223         * page/FrameView.cpp:
2224         (WebCore::FrameView::FrameView):
2225         (WebCore::FrameView::reset):
2226         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
2227         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
2228         (WebCore::FrameView::performPostLayoutTasks):
2229         * page/FrameView.h:
2230         * testing/Internals.cpp:
2231         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2232         * testing/Internals.h:
2233         * testing/Internals.idl:
2234
2235 2014-05-29  Myles C. Maxfield  <mmaxfield@apple.com>
2236
2237         Support -apple-system-font on OS X
2238         https://bugs.webkit.org/show_bug.cgi?id=133382
2239
2240         Reviewed by Simon Fraser.
2241
2242         Guard on both family names: "-apple-system-font" and "-webkit-system-font"
2243
2244         Test: platform/mac/fast/text/systemFont.html
2245
2246         * platform/mac/WebFontCache.mm:
2247         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2248
2249 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
2250
2251         Loading <object> from WebArchive crashes
2252         https://bugs.webkit.org/show_bug.cgi?id=133386
2253         <rdar://problem/13345509>
2254
2255         Reviewed by Brady Eidson.
2256
2257         Test: webarchive/loading/object.html
2258
2259         This (a) fixes the crash, and (b) avoids the crash.
2260
2261         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy):
2262         Some types of substitute data - such as WebArchive - don't contain HTTP result codes,
2263         so let's not drop to <object> fallback content when status is 0.
2264         And if the load somehow failed anyway, don't crash by trying to deliver substitute data
2265         to a finished loader.
2266
2267 2014-05-29  Alex Christensen  <achristensen@webkit.org>
2268
2269         [iOS WebGL] Fix depth buffer clearing issue.
2270         https://bugs.webkit.org/show_bug.cgi?id=133388
2271
2272         Reviewed by Dean Jackson.
2273
2274         No new tests, but this fixes webgl/1.0.1/conformance/canvas/buffer-preserve-test.html.
2275
2276         * platform/graphics/mac/WebGLLayer.mm:
2277         (-[WebGLLayer display]):
2278         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2279         (WebCore::GraphicsContext3D::prepareTexture):
2280         Moved marking the layer as composited from the mac-only prepareTexture to
2281         the end of [WebGLLayer display] which is called by mac and iOS.
2282
2283 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
2284
2285         Perserve caption selection in fullscreen.
2286         https://bugs.webkit.org/show_bug.cgi?id=133350
2287
2288         Reviewed by Eric Carlson.
2289
2290         Use the logic from the inline player to calculate the selected caption index.
2291
2292         * html/HTMLMediaElement.h:
2293         (WebCore::HTMLMediaElement::mediaControlsHost):
2294         Expose mediaControlsHost() for use by WebVideoFullscreenModelMediaElement.
2295
2296         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2297         (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
2298         Use logic from buildCaptionsMenu from mediaControlsApple.js.
2299
2300 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
2301
2302         Use correct version of requiresFullscreenForVideoPlayback().
2303         https://bugs.webkit.org/show_bug.cgi?id=133331
2304
2305         Reviewed by Eric Carlson.
2306
2307         Test: media/video-fullscreeen-only-controls.html
2308
2309         Update the last place not yet using m_mediaSession->requiresFullscreenForVideoPlayback.
2310
2311         * html/HTMLMediaElement.cpp:
2312         (WebCore::HTMLMediaElement::parseAttribute):
2313         switch to media session version for requriesFullscreenForVideoPlayback.
2314
2315 2014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2316
2317         [GTK] Add support for HiDPI icons
2318         https://bugs.webkit.org/show_bug.cgi?id=133377
2319
2320         Reviewed by Martin Robinson.
2321
2322         Use the GTK+ missing icon at 16 or 32 size depending on the device
2323         scale factor.
2324
2325         * platform/graphics/gtk/ImageGtk.cpp:
2326         (WebCore::loadMissingImageIconFromTheme):
2327         (WebCore::Image::loadPlatformResource):
2328
2329 2014-05-29  Owen Taylor  <otaylor@redhat.com>
2330
2331         [GTK] Add HighDPI support for non-accelerated compositing contents
2332         https://bugs.webkit.org/show_bug.cgi?id=131562
2333
2334         Reviewed by Anders Carlsson.
2335
2336         No new tests. This will be tested once we have the proper dependencies in the WebKit testing
2337         JHBuild.
2338
2339         * platform/cairo/WidgetBackingStore.h:
2340         (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
2341         * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
2342         * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
2343         * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
2344         * platform/graphics/cairo/CairoUtilities.h:
2345         * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
2346         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
2347         * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
2348
2349 2014-05-28  Brent Fulgham  <bfulgham@apple.com>
2350
2351         Captions during HLS playback flash/are difficult to readily
2352         https://bugs.webkit.org/show_bug.cgi?id=133365
2353         <rdar://problem/16584132>
2354
2355         Reviewed by Eric Carlson.
2356
2357         Correct two problems:
2358         1. Add new logic to handle cues that are identical to existing cues, except
2359            that they cover a slightly later moment in playback. For example, a cue
2360            encoding device might emit a cue at 24 fps, with many of the cues containing
2361            the same content but covering only 1/24th of a second.
2362            
2363            Rather than hiding and displaying our cues at the cue encoding rate, we should
2364            simply continue to display the same cue as long as the content is unchanged.
2365         2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
2366            VTTCue isEqual logic. This was done to avoid a false failure due to the cue
2367            type being 'generic' rather than 'vtt', but incorrectly treated cues with
2368            non-matching text as equal.
2369
2370         * html/track/DataCue.cpp:
2371         (WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
2372         doesn't check that the 'type' of the cue is identical.
2373         (WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
2374         (WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
2375         * html/track/DataCue.h:
2376         * html/track/TextTrack.cpp:
2377         (WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
2378         of an existing cue.
2379         * html/track/TextTrackCue.cpp:
2380         (WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
2381         that used to live in 'isEqual'.
2382         (WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
2383         (WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
2384         end times.
2385         * html/track/TextTrackCue.h:
2386         * html/track/TextTrackCueGeneric.cpp:
2387         (WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
2388         code that used to live in 'isEqual'.
2389         (WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
2390         (WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
2391         end times.
2392         * html/track/TextTrackCueGeneric.h:
2393         * html/track/VTTCue.cpp:
2394         (WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
2395         used to live in 'isEqual'.
2396         (WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
2397         (WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
2398         * html/track/VTTCue.h:
2399
2400 2014-05-28  Oliver Hunt  <oliver@apple.com>
2401
2402         Whoops, update bindings tests results.
2403
2404 2014-05-28  Oliver Hunt  <oliver@apple.com>
2405
2406         Make DOM properties exposed as instance properties use the base object instead of |this|
2407         https://bugs.webkit.org/show_bug.cgi?id=133353
2408
2409         Reviewed by Geoffrey Garen.
2410
2411         Make the bindings generator emit code that uses the base object for
2412         a property, rather than the this object. This means that attributes
2413         that we need to be treated as instance properties will match their old
2414         instance-based behaviour.
2415
2416         * bindings/scripts/CodeGeneratorJS.pm:
2417         (InterfaceRequiresAttributesOnInstanceForCompatibility):
2418         (InterfaceRequiresAttributesOnInstance):
2419         (GetCastingHelperForBaseObject):
2420         (GenerateImplementation):
2421         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2422         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2423         * bindings/scripts/test/JS/JSTestException.cpp:
2424         (WebCore::jsTestExceptionName):
2425         * bindings/scripts/test/JS/JSTestInterface.cpp:
2426         (WebCore::jsTestInterfaceImplementsStr3):
2427         (WebCore::jsTestInterfaceSupplementalStr3):
2428         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
2429         (WebCore::setJSTestInterfaceImplementsStr2):
2430         (WebCore::setJSTestInterfaceImplementsStr3):
2431         (WebCore::setJSTestInterfaceImplementsNode):
2432         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2433         (WebCore::setJSTestInterfaceSupplementalStr2):
2434         (WebCore::setJSTestInterfaceSupplementalStr3):
2435         (WebCore::setJSTestInterfaceSupplementalNode):
2436         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2437         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
2438         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
2439         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
2440         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
2441         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
2442         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2443         (WebCore::jsTestTypedefsConstructorTestSubObj):
2444         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
2445         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
2446         (WebCore::setJSTestTypedefsAttrWithGetterException):
2447         (WebCore::setJSTestTypedefsAttrWithSetterException):
2448         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
2449         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
2450
2451 2014-05-28  Simon Fraser  <simon.fraser@apple.com>
2452
2453         [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
2454         https://bugs.webkit.org/show_bug.cgi?id=133352
2455
2456         Reviewed by Tim Horton.
2457
2458         When adjusting layers inside accelerated overflow-scroll, pass a delta
2459         down to descendant nodes. Fix behavior of sticky nodes inside fixed nodes
2460         inside overflow scroll (sticky should only be affected if the parent node
2461         is a scrolling node).
2462
2463         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2464         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange): Just remove
2465         some .get()
2466         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2467         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): Remove .get()s.
2468         We never care about the cumulative delta here, because sticky nodes only respond to
2469         changes in their direct scrolling ancestors. Only adjust the layer if the parent
2470         is a scrolling node.
2471
2472 2014-05-27  Chris Fleizach  <cfleizach@apple.com>
2473
2474         AX: WebKit does not recognize ARIA 1.1 tables
2475         https://bugs.webkit.org/show_bug.cgi?id=133163
2476
2477         Reviewed by Darin Adler.
2478
2479         The AXObjectCache code that determines which object to create based on the role needs to be token fallback aware.
2480
2481         Test: accessibility/table-fallback-roles-expose-element-attributes.html
2482
2483         * accessibility/AXObjectCache.cpp:
2484         (WebCore::nodeHasRole):
2485
2486 2014-05-28  Radu Stavila  <stavila@adobe.com>
2487
2488         REGRESSION (r168046): Invalid layout in multicol
2489         https://bugs.webkit.org/show_bug.cgi?id=133322
2490
2491         Reviewed by Antti Koivisto.
2492
2493         In some situations, deleting the line boxes of a multicol element causes the line to region
2494         link to become invalid.
2495
2496         Test: fast/multicol/newmulticol/multicol-inside-multicol.html
2497
2498         * rendering/RenderFlowThread.cpp:
2499         (WebCore::RenderFlowThread::clearLinesToRegionMap):
2500         (WebCore::RenderFlowThread::deleteLines):
2501         (WebCore::RenderFlowThread::willBeDestroyed):
2502         * rendering/RenderFlowThread.h:
2503
2504 2014-05-28  Ryuan Choi  <ryuan.choi@samsung.com>
2505
2506         Remove DocumentThreadableLoaderClient.h
2507         https://bugs.webkit.org/show_bug.cgi?id=133341
2508
2509         Reviewed by Gyuyoung Kim.
2510
2511         DocumentThreadableLoaderClient is not used anymore.
2512
2513         * WebCore.order:
2514         * loader/DocumentThreadableLoader.cpp:
2515         (WebCore::DocumentThreadableLoader::redirectReceived):
2516         * loader/DocumentThreadableLoaderClient.h: Removed.
2517         * loader/ThreadableLoaderClient.h:
2518         (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient): Deleted.
2519
2520 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2521
2522         Unreviewed. Update GObject DOM bindings symbols file after r169017.
2523
2524         * bindings/gobject/webkitdom.symbols: Add webkit_dom_navigator_get_hardware_concurrency.
2525
2526 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2527
2528         REGRESSION(r168868): [GTK] Element.offset* client* scroll* API changed
2529         https://bugs.webkit.org/show_bug.cgi?id=133313
2530
2531         Reviewed by Philippe Normand.
2532
2533         Keep old API that uses long also for GObject bindings.
2534
2535         * dom/Element.idl:
2536
2537 2014-05-27  Commit Queue  <commit-queue@webkit.org>
2538
2539         Unreviewed, rolling out r169400.
2540         https://bugs.webkit.org/show_bug.cgi?id=133338
2541
2542         Broke the iOS build in
2543         LocalizedDateCache::calculateMaximumWidth() (Requested by smfr
2544         on #webkit).
2545
2546         Reverted changeset:
2547
2548         "SVG TextRuns do not always get RenderingContexts"
2549         https://bugs.webkit.org/show_bug.cgi?id=133198
2550         http://trac.webkit.org/changeset/169400
2551
2552 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
2553
2554         REGRESSION (Margin tiles): Background gradient on dom.spec.whatwg.org is very slow to render
2555         https://bugs.webkit.org/show_bug.cgi?id=133335
2556         <rdar://problem/17011392>
2557
2558         Reviewed by Simon Fraser.
2559
2560         * platform/graphics/Image.cpp:
2561         (WebCore::Image::drawTiled):
2562         Make cross-platform and use some iOS code which avoids patterned drawing when the pattern buffer
2563         would be very large. Instead, it calls draw() repeatedly over the pattern space, avoiding the allocation
2564         of a huge (in the case of bug 133335, nearly 2GB) buffer.
2565
2566 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
2567
2568         [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
2569         https://bugs.webkit.org/show_bug.cgi?id=133334
2570         <rdar://problem/16462535>
2571
2572         Reviewed by Tim Horton.
2573
2574         When the scroll position changes in an accelerated overflow-scroll element, we have
2575         to update child nodes in the scrolling tree for position:sticky. That requires a
2576         more generic ability to update the scrolling tree after some arbitrary zoom or
2577         scroll. To do this, we need to know the current fixed position rect, rather than
2578         having it passed in.
2579         
2580         So make the fixed position rect available from ScrollingTree, and make it possible
2581         to get the current scrollPosition() from any ScrollingTreeScrollingNode.
2582         
2583         Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
2584         and have it update descendant layers.
2585         
2586         Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
2587         constraints math, using the scroll position of the parent node if appropriate.
2588
2589         * page/scrolling/ScrollingTree.h:
2590         * page/scrolling/ScrollingTreeScrollingNode.h:
2591         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2592         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
2593         * page/scrolling/ios/ScrollingTreeIOS.cpp:
2594         (WebCore::ScrollingTreeIOS::fixedPositionRect):
2595         * page/scrolling/ios/ScrollingTreeIOS.h:
2596         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2597         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
2598
2599 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
2600
2601         Do some renaming in the scrolling tree
2602         https://bugs.webkit.org/show_bug.cgi?id=133333
2603
2604         Reviewed by Tim Horton.
2605
2606         Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
2607         since this goes deep and to indicate that it's about layer updating.
2608         
2609         Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
2610         this is the custom fixed-position rect that changes on zooming.
2611
2612         * page/scrolling/ScrollingTree.cpp:
2613         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
2614         * page/scrolling/ScrollingTree.h:
2615         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2616         * page/scrolling/ScrollingTreeNode.h:
2617         * page/scrolling/ScrollingTreeScrollingNode.h:
2618         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2619         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2620         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
2621         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
2622         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2623         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2624         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
2625         (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange): Deleted.
2626         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2627         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2628         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2629         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2630         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2631         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
2632         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange): Deleted.
2633
2634 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
2635
2636         Instantiate a ScrollingTreeMac on Mac
2637         https://bugs.webkit.org/show_bug.cgi?id=133332
2638
2639         Reviewed by Tim Horton.
2640
2641         Mac previously instantiated a ThreadedScrollingTree, but this has no platform
2642         knowledge. To support future expansion, create a ScrollingTreeMac subclass and
2643         instantiate that on Mac.
2644         
2645         Also protect ScrollingCoordinatorMac in PLATFORM(MAC) #ifdefs and remove it from the
2646         EXCLUDED_SOURCE_FILE_NAMES list in the xcconfig file, following general trends.
2647
2648         * Configurations/WebCore.xcconfig:
2649         * WebCore.xcodeproj/project.pbxproj:
2650         * page/scrolling/ThreadedScrollingTree.cpp:
2651         (WebCore::ThreadedScrollingTree::create): Deleted.
2652         * page/scrolling/ThreadedScrollingTree.h:
2653         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2654         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2655         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
2656         * page/scrolling/mac/ScrollingTreeMac.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
2657         (ScrollingTreeMac::create):
2658         (ScrollingTreeMac::ScrollingTreeMac):
2659         * page/scrolling/mac/ScrollingTreeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
2660
2661 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
2662
2663         Prepare for position:sticky support inside accelerated overflow-scroll with WK2
2664         https://bugs.webkit.org/show_bug.cgi?id=133329
2665
2666         Reviewed by Tim Horton.
2667
2668         RenderLayerCompositor::computeStickyViewportConstraints() was always using
2669         the viewport rect as the constraining rect for sticky position. This is not
2670         correct when inside overflow:scroll.
2671         
2672         Refactor code in RenderBoxModelObject to make getting the rect easy, and use
2673         it to compute the constraints.
2674
2675         * rendering/RenderBoxModelObject.cpp:
2676         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
2677         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2678         * rendering/RenderBoxModelObject.h:
2679         * rendering/RenderLayerCompositor.cpp:
2680         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2681
2682 2014-05-27  Bem Jones-Bey  <bjonesbe@adobe.com>
2683
2684         vw/vh units used as font/line-height values don't scale with the viewport
2685         https://bugs.webkit.org/show_bug.cgi?id=87846
2686
2687         Reviewed by Darin Adler.
2688
2689         This patch moves the resolution of viewport units to style recalc
2690         time. Currently viewport units are left unresolved during style
2691         recalcs, which leads to many problems with viewport units. Moving the
2692         resolution will fix these problems, as well as reduce the plumbing
2693         that goes on.
2694
2695         This patch touches a lot of files since the valueForLength functions
2696         no longer need a RenderView. The interesting changes are in:
2697
2698         - CSSToLengthConversionData -> CSSPrimitiveValue: for moving
2699             resolution to style recalc time.
2700         - Length / LengthFunctions: no longer needs to know about viewport
2701             units.
2702         - FrameView -> Document -> StyleResolver: for scheduling style recalcs
2703             upon resize
2704
2705         Note that getComputedStyle will now return pixel values when viewport
2706         units are used. This behavior matches Firefox and the css3-cascade
2707         spec.
2708
2709         This is based on a Blink patch by timloh@chromium.org.
2710
2711         Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
2712                css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
2713                css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
2714                css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
2715                css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html
2716
2717         * WebCore.exp.in: Remove RenderView argument to floatValueForLength.
2718         * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 
2719         (getAttributeSetForAccessibilityObject): Remove RenderView argument.
2720         * css/BasicShapeFunctions.cpp:
2721         (WebCore::convertToLength): Ditto.
2722         (WebCore::floatValueForCenterCoordinate): Ditto.
2723         * css/BasicShapeFunctions.h: Ditto.
2724         * css/CSSCalculationValue.cpp:
2725         (WebCore::unitCategory): Remove special handling for viewport units,
2726             as they get resolved to pixels.
2727         (WebCore::createCSS): Ditto.
2728         * css/CSSComputedStyleDeclaration.cpp:
2729         (WebCore::positionOffsetValue): Remove RendewView argument.
2730         (WebCore::getBorderRadiusCornerValues): Remove handling of viewport
2731             units, as they are already resolve to pixels here.
2732         (WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
2733         (WebCore::getBorderRadiusShorthandValue): Ditto.
2734         (WebCore::specifiedValueForGridTrackBreadth): Remove handling of
2735             viewport units, as they are already resolved to pixels here.
2736         (WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
2737         (WebCore::valueForGridTrackList): Ditto.
2738         (WebCore::lineHeightFromStyle): Ditto.
2739         (WebCore::ComputedStyleExtractor::propertyValue): Ditto.
2740         * css/CSSGradientValue.cpp:
2741         (WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
2742             CSSToLengthConversionData constructor.
2743         (WebCore::CSSRadialGradientValue::createGradient): Ditto.
2744         * css/CSSPrimitiveValue.cpp:
2745         (WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
2746             viewport units, as they get resolved to pixels.
2747         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
2748         (WebCore::CSSPrimitiveValue::init): Ditto.
2749         (WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
2750             units to pixels.
2751         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
2752         handling of viewport units, since they get resolved to pixels.
2753         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
2754         * css/CSSPrimitiveValue.h:
2755         (WebCore::CSSPrimitiveValue::isLength): Remove special handling of
2756             viewport units, since they get resolved to pixels.
2757         * css/CSSPrimitiveValueMappings.h:
2758         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
2759         * css/CSSToLengthConversionData.cpp:
2760         (WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
2761             conversion factor for viewport units to pixels. Note this does not
2762             set hasViewportUnits on the RenderStyle if computing the font
2763             size, because in the font size case, the RenderStyle is the
2764             parent's style, not the current renderer's style.
2765         (WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
2766         (WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
2767         (WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
2768         * css/CSSToLengthConversionData.h:
2769         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
2770             RenderView parameter, and make RenderStyle non-const so that
2771             hasViewportUnits can be set on the Style..
2772         (WebCore::CSSToLengthConversionData::style): style is now non-const.
2773         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
2774             RenderView argument.
2775         * css/CSSToStyleMap.cpp:
2776         (WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
2777             viewport units, as they are already resolved to pixels here.
2778         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
2779         * css/DeprecatedStyleBuilder.cpp:
2780         (WebCore::ApplyPropertyLength::applyValue): Ditto.
2781         (WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
2782         (WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
2783         (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
2784         (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
2785         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
2786         (WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
2787         (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
2788         (WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
2789         * css/LengthFunctions.cpp:
2790         (WebCore::minimumIntValueForLength): Remove RenderView argument.
2791         (WebCore::intValueForLength): Remove RenderView argument and
2792             roundPecentages.
2793         (WebCore::minimumValueForLength): Remove RenderView argument, and
2794             special handling of viewport units.
2795         (WebCore::valueForLength): Ditto.
2796         (WebCore::floatValueForLength): Ditto.
2797         (WebCore::floatSizeForLengthSize): Remove RenderView argument.
2798         * css/LengthFunctions.h: Ditto.
2799         * css/MediaQueryEvaluator.cpp:
2800         (WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
2801             CSSToLengthConversionData constuctor.
2802         * css/StyleResolver.cpp:
2803         (WebCore::StyleResolver::State::clear): Change to 0 arg constructor
2804             for CSSToLengthConversionData.
2805         (WebCore::StyleResolver::State::updateConversionData): In order to get
2806             the RenderView, we need to have a valid Element set on the state.
2807             Since this means that we need to set the conversion data in more
2808             places, move the contruction of conversion data into this helper
2809             method.
2810         (WebCore::StyleResolver::State::initElement): Make sure conversion
2811             data is up to date.
2812         (WebCore::StyleResolver::State::initForStyleResolve): Ditto.
2813         (WebCore::StyleResolver::State::setStyle): When the style is set, we
2814             need to make sure to update the conversion data.
2815         (WebCore::StyleResolver::styleForElement): If the style has viewport
2816             units, flage the document so that we can make sure to recalc the
2817             viewport unit values when the viewport is resized.
2818         (WebCore::StyleResolver::pseudoStyleForElement): Ditto.
2819         (WebCore::StyleResolver::updateFont): Make sure the font having
2820             viewport units updates the style.
2821         (WebCore::StyleResolver::convertToIntLength): Remove handling of
2822         viewport units, as they are resolved to pixels.
2823         (WebCore::StyleResolver::convertToFloatLength): Ditto.
2824         (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
2825             Invalidate the matched properties cache for styles with viewport
2826             units when the viewport is resized.
2827         (WebCore::createGridTrackBreadth): Remove handling of viewport units,
2828             as they are resolved to pixels.
2829         (WebCore::StyleResolver::applyProperty): Ditto.
2830         (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
2831             Rename to be less confusing, since it has nothing to do with
2832             viewport units.
2833         (WebCore::StyleResolver::createFilterOperations): Remove handling of
2834             viewport units, as they are resolved to pixels.
2835         (WebCore::StyleResolver::affectedByViewportChange): Deleted.
2836         (WebCore::StyleResolver::viewportPercentageValue): Deleted.
2837         * css/StyleResolver.h:
2838         (WebCore::StyleResolver::State::State): C++11 cleanup: 0 -> nullptr.
2839         (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
2840             the font size is specified in viewport units.
2841         (WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
2842         (WebCore::StyleResolver::State::setStyle): Deleted.
2843         * css/TransformFunctions.cpp:
2844         (WebCore::convertToFloatLength): Remove handling of viewport units,
2845             since they are resolved to pixels.
2846         * dom/Document.cpp:
2847         (WebCore::Document::Document): Add flag to determine if some style in
2848             the document has viewport units.
2849         (WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
2850             argument.
2851         (WebCore::Document::updateViewportUnitsOnResize): Mark elements with
2852             viewport units for style recalc when the viewport size has
2853             changed.
2854         * dom/Document.h:
2855         (WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
2856             if some style in the document has viewport units.
2857         (WebCore::Document::hasStyleWithViewportUnits): Ditto.
2858         * html/HTMLAreaElement.cpp:
2859         (WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
2860         * page/FrameView.cpp:
2861         (WebCore::FrameView::layout): When the viewport is resized, call
2862             updateViewportUnitsOnResize on the document.
2863         * platform/Length.h:
2864         (WebCore::Length::isSpecified): Remove handling of viewport units,
2865             since they are now resolved to pixels.
2866         (WebCore::Length::viewportPercentageLength): Deleted.
2867         (WebCore::Length::isViewportPercentage): Deleted.
2868         * rendering/ClipPathOperation.h:
2869         (WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
2870             RenderView argument.
2871         (WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
2872         * rendering/RenderBlock.cpp:
2873         (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
2874             handling of viewport units, since they get updated by
2875             updateViewportUnitsOnResize when the viewport is resized.
2876         (WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
2877         (WebCore::RenderBlock::lineHeight): Ditto.
2878         * rendering/RenderBox.cpp:
2879         (WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
2880         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
2881             Remove handling of viewport units, as they are resolved to pixels.
2882         (WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
2883         (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
2884         (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
2885         (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
2886         * rendering/RenderBox.h:
2887         * rendering/RenderBoxModelObject.cpp:
2888         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
2889             RenderView argument.
2890         (WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
2891             handling of viewport units, as they are resolved to pixels.
2892         (WebCore::computeBorderImageSide): Remove RenderView argument.
2893         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
2894         (WebCore::RenderBoxModelObject::paintBorder): Ditto.
2895         (WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
2896         * rendering/RenderElement.cpp:
2897         (WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
2898         * rendering/RenderElement.h:
2899         (WebCore::RenderElement::valueForLength): Remove unused
2900             roundPercentages argument.
2901         (WebCore::RenderElement::minimumValueForLength): Remove unused
2902             RoundPercentages and RenderView arguments.
2903         * rendering/RenderGrid.cpp:
2904         (WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
2905             units as they are resolved to pixels.
2906         * rendering/RenderInline.cpp:
2907         (WebCore::computeMargin): Ditto.
2908         (WebCore::RenderInline::lineHeight): Remove RenderView argument.
2909         * rendering/RenderLayer.cpp:
2910         (WebCore::RenderLayer::setupClipPath): Ditto.
2911         * rendering/RenderLineBreak.cpp:
2912         (WebCore::RenderLineBreak::lineHeight): Ditto.
2913         * rendering/RenderScrollbarPart.cpp:
2914         (WebCore::calcScrollbarThicknessUsing): Ditto.
2915         (WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
2916         (WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
2917         * rendering/RenderTable.cpp:
2918         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2919             Remove handling of viewport units, since they are resolved to
2920             pixels.
2921         (WebCore::RenderTable::computePreferredLogicalWidths): Now that
2922             viewport unit values are resolved to pixels at style recalc time,
2923             no special checking is needed to handle them, so update the
2924             comment to reflect that.
2925         * rendering/RenderThemeIOS.mm:
2926         (WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
2927             CSSToLengthConversionData constructor.
2928         (WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
2929         * rendering/RenderThemeMac.mm:
2930         (WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
2931             RenderView argument.
2932         * rendering/RenderView.cpp:
2933         (WebCore::RenderView::layout): Remove handling of viewport units,
2934             since they are resolved to pixels.
2935         * rendering/RootInlineBox.cpp:
2936         (WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
2937             argument.
2938         * rendering/shapes/Shape.cpp:
2939         (WebCore::Shape::createShape): Remove RenderView argument.
2940         * rendering/shapes/Shape.h:
2941         * rendering/shapes/ShapeOutsideInfo.cpp:
2942         (WebCore::ShapeOutsideInfo::computedShape): Ditto.
2943         * rendering/style/BasicShapes.cpp:
2944         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
2945         (WebCore::BasicShapeCircle::path): Ditto.
2946         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
2947         (WebCore::BasicShapeEllipse::path): Ditto.
2948         (WebCore::BasicShapePolygon::path): Ditto.
2949         (WebCore::floatSizeForLengthSize): Ditto.
2950         (WebCore::BasicShapeInset::path): Ditto.
2951         * rendering/style/BasicShapes.h:
2952         * rendering/style/RenderStyle.cpp:
2953         (WebCore::calcRadiiFor): Ditto.
2954         (WebCore::RenderStyle::getRoundedBorderFor): Ditto.
2955         (WebCore::RenderStyle::computedLineHeight): Remove handling of
2956             viewport units since they are resolved to pixels.
2957         * rendering/style/RenderStyle.h:
2958         (WebCore::RenderStyle::setHasViewportUnits): Set if this style has
2959         a property set with viewport units.
2960         (WebCore::RenderStyle::hasViewportUnits): Ditto.
2961         * rendering/svg/RenderSVGRoot.cpp:
2962         (WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
2963         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
2964         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
2965         * rendering/svg/SVGRenderingContext.cpp:
2966         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.
2967
2968 2014-05-27  Zoltan Horvath  <zoltan@webkit.org>
2969
2970         [CSS Shapes] serialization of the computed value should omit the default radii
2971         https://bugs.webkit.org/show_bug.cgi?id=132747
2972
2973         Reviewed by Darin Adler.
2974
2975         We should omit closest-side value, whereever is possible. Specification:
2976         http://www.w3.org/TR/2014/CR-css-shapes-1-20140320/#basic-shape-computed-values 
2977         This change aligns the behavior to the specification.
2978
2979         Added new test cases for the shape-outside parsing tests.
2980
2981         * css/CSSBasicShapes.cpp:
2982         (WebCore::buildCircleString):
2983         (WebCore::CSSBasicShapeCircle::cssText):
2984         (WebCore::CSSBasicShapeEllipse::cssText):
2985
2986 2014-05-27  Commit Queue  <commit-queue@webkit.org>
2987
2988         Unreviewed, rolling out r169399.
2989         https://bugs.webkit.org/show_bug.cgi?id=133326
2990
2991         Causes assertion failures in tests.  See
2992         http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r169399%20(5622)/results.html
2993         (Requested by mlam on #webkit).
2994
2995         Reverted changeset:
2996
2997         "Caret's screen position does not update during an overflow
2998         scroll"
2999         https://bugs.webkit.org/show_bug.cgi?id=133256
3000         http://trac.webkit.org/changeset/169399
3001
3002 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
3003
3004         Lists styled with SVG fonts are not rendered as expected
3005         https://bugs.webkit.org/show_bug.cgi?id=133198
3006
3007         Reviewed by Simon Fraser.
3008
3009         There were a couple places in RenderListMarker and RenderMenuList that were
3010         implicitly creating TextRuns by passing a String to a function which
3011         expected a TextRun. Because TextRun has a constructor which takes a single
3012         String and isn't marked explicit, TextRuns were being created without
3013         any of the associated code that initializes the TextRun (such as creating
3014         a RenderingContext if necessary).
3015
3016         This patch marks the aforementioned constructor as "explicit" to discourage
3017         such behavior in the future.
3018
3019         Test: svg/custom/list-items-with-svg-font-family.html
3020
3021         * platform/graphics/TextRun.h:
3022         (WebCore::TextRun::TextRun): Mark constructors as explicit.
3023         * rendering/RenderListMarker.cpp:
3024         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
3025         RenderBlock::constructTextRun.
3026         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
3027         * rendering/RenderMenuList.cpp:
3028         (RenderMenuList::updateOptionsWidth): Ditto.
3029
3030 2014-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
3031
3032         Caret's screen position does not update during an overflow scroll
3033         https://bugs.webkit.org/show_bug.cgi?id=133256
3034
3035         Reviewed by Simon Fraser.
3036
3037         During a scroll, we set a flag which caret position is gated on, but we never
3038         actually invalidate the caret's position. This patch does so.
3039
3040         Test: editing/input/caret-position-during-scroll.html
3041
3042         * editing/FrameSelection.h:
3043         * rendering/RenderLayer.cpp:
3044         (WebCore::RenderLayer::scrollTo):
3045
3046 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
3047
3048         Turn on the LayerPool for iOS
3049         https://bugs.webkit.org/show_bug.cgi?id=133299
3050
3051         Reviewed by Antti Koivisto.
3052
3053         * Configurations/WebCore.xcconfig:
3054         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3055         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3056         * platform/graphics/ca/mac/TileController.mm:
3057         (WebCore::TileController::createTileLayer):
3058         * platform/graphics/ca/mac/TileGrid.mm:
3059         (WebCore::TileGrid::removeTiles):
3060         Turn on the LayerPool for iOS.
3061         We've used this on Mac for a long time, and the WebKit1
3062         ("legacy") iOS TileCache also had a similar pool.
3063         This helps a good bit with flashiness while scrolling.
3064
3065 2014-05-27  David Hyatt  <hyatt@apple.com>
3066
3067         REGRESSION: Audio volume scrubber does not show volume level thumb
3068         <rdar://problem/16902004>
3069         https://bugs.webkit.org/show_bug.cgi?id=133310
3070
3071         Reviewed by Dean Jackson.
3072
3073         This was just a silly mistake on my part with the setting of the pagination
3074         layers. Layers inside transforms are supposed to clear out their pagination
3075         status based off their ancestor containing block layers, and not off the
3076         enclosing pagination layer.
3077         
3078         Added fast/multicol/pagination/nested-transforms.html
3079
3080         * rendering/RenderLayer.cpp:
3081         (WebCore::RenderLayer::updatePagination):
3082
3083 2014-05-27  Eric Carlson  <eric.carlson@apple.com>
3084
3085         [Mac] media controls should prevent 'click' events from reaching the page
3086         https://bugs.webkit.org/show_bug.cgi?id=133268
3087
3088         Reviewed by Jer Noble.
3089
3090         Test: media/media-controls-cancel-events.html
3091
3092         * Modules/mediacontrols/mediaControlsApple.js:
3093         (Controller.prototype.handleEvent): Allow event handler to cancel event default action.
3094         (Controller.prototype.handleRewindButtonClicked): Cancel event default.
3095         (Controller.prototype.handlePlayButtonClicked): Ditto.
3096         (Controller.prototype.handleMuteButtonClicked): Ditto.
3097         (Controller.prototype.handleMinButtonClicked): Ditto.
3098         (Controller.prototype.handleCaptionButtonClicked): Ditto.
3099         (Controller.prototype.handleFullscreenButtonClicked): Ditto.
3100         * Modules/mediacontrols/mediaControlsiOS.js:
3101         (ControllerIOS.prototype.handlePlayButtonTouchEnd): Ditto.
3102         (ControllerIOS.prototype.handlePlayButtonTouchCancel): Ditto.
3103         (ControllerIOS.prototype.handleFullscreenTouchEnd): Ditto.
3104         (ControllerIOS.prototype.handleFullscreenTouchCancel): Ditto.
3105         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
3106         (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): Ditto.
3107         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto.
3108
3109 2014-05-27  Jon Lee  <jonlee@apple.com>
3110
3111         Fix Mavericks bots from r169383.
3112         https://bugs.webkit.org/show_bug.cgi?id=133311
3113
3114         Reviewed by Eric Carlson.
3115
3116         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Update #ifdef to check for ENABLE(MEDIA_SOURCE).
3117         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Ditto.
3118
3119 2014-05-27  Radu Stavila  <stavila@adobe.com>
3120
3121         REGRESSION (r168046): Incorrect handling of multicol spanner
3122         https://bugs.webkit.org/show_bug.cgi?id=133249
3123
3124         Reviewed by David Hyatt.
3125
3126         When removing the child of an object, the removeChild method should return the next element
3127         following the one being deleted. This will ensure that proper iteration and destruction of
3128         an object's children is possible.
3129
3130         No new tests added. This is because the test that triggers this issue also triggers
3131         another assertion, in RenderMultiColumnSet::requiresBalancing(). However, that is a totally
3132         separate problem and will be handled in a separate bug: https://bugs.webkit.org/show_bug.cgi?id=133309
3133
3134         * rendering/RenderBlock.cpp:
3135         (WebCore::RenderBlock::removeChild):
3136         * rendering/RenderBlock.h:
3137         * rendering/RenderBlockFlow.cpp:
3138         (WebCore::RenderBlockFlow::removeChild):
3139         * rendering/RenderBlockFlow.h:
3140         * rendering/RenderButton.cpp:
3141         (WebCore::RenderButton::removeChild):
3142         * rendering/RenderButton.h:
3143         * rendering/RenderElement.cpp:
3144         (WebCore::RenderElement::removeChild):
3145         (WebCore::RenderElement::removeChildInternal):
3146         * rendering/RenderElement.h:
3147         * rendering/RenderMenuList.cpp:
3148         (RenderMenuList::removeChild):
3149         * rendering/RenderMenuList.h:
3150         * rendering/RenderMultiColumnFlowThread.cpp:
3151         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3152         * rendering/RenderRuby.cpp:
3153         (WebCore::RenderRubyAsInline::removeChild):
3154         (WebCore::RenderRubyAsBlock::removeChild):
3155         * rendering/RenderRuby.h:
3156         * rendering/RenderRubyRun.cpp:
3157         (WebCore::RenderRubyRun::removeChild):
3158         * rendering/RenderRubyRun.h:
3159         * rendering/mathml/RenderMathMLScripts.cpp:
3160         (WebCore::RenderMathMLScripts::removeChildInternal):
3161         (WebCore::RenderMathMLScripts::removeChild):
3162         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
3163         (WebCore::RenderMathMLScriptsWrapper::removeChild):
3164         * rendering/mathml/RenderMathMLScripts.h:
3165         * rendering/svg/RenderSVGContainer.cpp:
3166         (WebCore::RenderSVGContainer::removeChild):
3167         * rendering/svg/RenderSVGContainer.h:
3168         * rendering/svg/RenderSVGInline.cpp:
3169         (WebCore::RenderSVGInline::removeChild):
3170         * rendering/svg/RenderSVGInline.h:
3171         * rendering/svg/RenderSVGRoot.cpp:
3172         (WebCore::RenderSVGRoot::removeChild):
3173         * rendering/svg/RenderSVGRoot.h:
3174         * rendering/svg/RenderSVGText.cpp:
3175         (WebCore::RenderSVGText::removeChild):
3176         * rendering/svg/RenderSVGText.h:
3177
3178 2014-05-27  Jon Lee  <jonlee@apple.com>
3179
3180         Update ENABLE(MEDIA_SOURCE) on Mac
3181         https://bugs.webkit.org/show_bug.cgi?id=133141
3182
3183         Reviewed by Darin Adler.
3184
3185         * Configurations/FeatureDefines.xcconfig:
3186
3187 2014-05-27  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3188
3189         Remove BLOB guards
3190         https://bugs.webkit.org/show_bug.cgi?id=132863
3191
3192         Reviewed by Csaba Osztrogonác.
3193
3194         * Configurations/FeatureDefines.xcconfig:
3195         * Modules/websockets/WebSocketChannel.cpp:
3196         (WebCore::WebSocketChannel::WebSocketChannel):
3197         (WebCore::WebSocketChannel::didFail):
3198         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
3199         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
3200         * Modules/websockets/WebSocketChannel.h:
3201         * WebCore.exp.in:
3202         * WebCore.vcxproj/WebCore.vcxproj:
3203         * bindings/js/JSBlobCustom.cpp:
3204         (WebCore::JSBlobConstructor::constructJSBlob):
3205         * bindings/js/JSFileReaderCustom.cpp:
3206         * dom/DOMExceptions.in:
3207         * dom/EventTargetFactory.in:
3208         * dom/ScriptExecutionContext.cpp:
3209         (WebCore::ScriptExecutionContext::publicURLManager):
3210         * dom/ScriptExecutionContext.h:
3211         * fileapi/AsyncFileStream.cpp:
3212         * fileapi/AsyncFileStream.h:
3213         * fileapi/Blob.cpp:
3214         (WebCore::Blob::Blob):
3215         * fileapi/Blob.h:
3216         (WebCore::Blob::slice):
3217         * fileapi/Blob.idl:
3218         * fileapi/FileError.h:
3219         * fileapi/FileError.idl:
3220         * fileapi/FileException.cpp:
3221         * fileapi/FileException.h:
3222         * fileapi/FileException.idl:
3223         * fileapi/FileReader.cpp:
3224         * fileapi/FileReader.h:
3225         * fileapi/FileReader.idl:
3226         * fileapi/FileReaderLoader.cpp:
3227         * fileapi/FileReaderLoader.h:
3228         * fileapi/FileReaderLoaderClient.h:
3229         * fileapi/FileReaderSync.cpp:
3230         * fileapi/FileReaderSync.h:
3231         * fileapi/FileReaderSync.idl:
3232         * fileapi/FileThread.cpp:
3233         * fileapi/FileThread.h:
3234         * fileapi/ThreadableBlobRegistry.cpp:
3235         (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Deleted.
3236         (WebCore::ThreadableBlobRegistry::registerBlobURL): Deleted.
3237         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice): Deleted.
3238         (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Deleted.
3239         (WebCore::ThreadableBlobRegistry::blobSize): Deleted.
3240         (WebCore::ThreadableBlobRegistry::getCachedOrigin): Deleted.
3241         * fileapi/WebKitBlobBuilder.cpp:
3242         (WebCore::BlobBuilder::append):
3243         * fileapi/WebKitBlobBuilder.h:
3244         * html/DOMURL.cpp:
3245         * html/DOMURL.h:
3246         * html/DOMURL.idl:
3247         * html/PublicURLManager.cpp:
3248         * html/PublicURLManager.h:
3249         * loader/LoaderStrategy.cpp:
3250         (WebCore::LoaderStrategy::createBlobRegistry):
3251         * loader/LoaderStrategy.h:
3252         * page/DOMWindow.idl:
3253         * page/SecurityOrigin.cpp:
3254         (WebCore::SecurityOrigin::shouldUseInnerURL):
3255         (WebCore::getCachedOrigin):
3256         * platform/FileStream.cpp:
3257         * platform/FileStream.h:
3258         * platform/FileStreamClient.h:
3259         * platform/SchemeRegistry.cpp:
3260         (WebCore::canDisplayOnlyIfCanRequestSchemes):
3261         * platform/network/BlobRegistry.cpp:
3262         * platform/network/BlobRegistryImpl.cpp:
3263         * platform/network/BlobResourceHandle.cpp:
3264         * platform/network/BlobResourceHandle.h:
3265         * platform/network/FormData.cpp:
3266         (WebCore::FormData::deepCopy):
3267         (WebCore::FormData::appendFile):
3268         (WebCore::FormData::appendBlob):
3269         (WebCore::FormData::appendKeyValuePairItems):
3270         (WebCore::FormData::resolveBlobReferences):
3271         (WebCore::encodeElement):
3272         (WebCore::decodeElement):
3273         * platform/network/FormData.h:
3274         (WebCore::FormDataElement::FormDataElement):
3275         (WebCore::operator==):
3276         * platform/network/cf/FormDataStreamCFNet.cpp:
3277         (WebCore::closeCurrentStream):
3278         (WebCore::advanceCurrentStream):
3279         (WebCore::formCreate):
3280         (WebCore::formRead):
3281         (WebCore::setHTTPBody):
3282         * platform/network/curl/ResourceHandleManager.cpp:
3283         (WebCore::getFormElementsCount):
3284         * platform/network/soup/ResourceHandleSoup.cpp:
3285         (WebCore::addEncodedBlobToSoupMessageBody):
3286         (WebCore::addFormElementsToSoupMessage):
3287         * workers/WorkerGlobalScope.idl:
3288         * xml/XMLHttpRequest.cpp:
3289         (WebCore::XMLHttpRequest::send):
3290         (WebCore::XMLHttpRequest::createRequest):
3291
3292 2014-05-27  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3293
3294         Allow building CMake based ports with WEB_REPLAY
3295         https://bugs.webkit.org/show_bug.cgi?id=133154
3296
3297         Reviewed by Csaba Osztrogonác.
3298
3299         * CMakeLists.txt:
3300
3301 2014-05-27  Adrian Perez de Castro  <aperez@igalia.com>
3302
3303         [GStreamer] Add missing <wtf/MathExtras.h> header
3304         https://bugs.webkit.org/show_bug.cgi?id=133236
3305
3306         Reviewed by Philippe Normand.
3307
3308         In some configurations, not including <wtf/MathExtras.h> will cause
3309         errors about undefined functions. In particular, this happens in
3310         Linux with glibc 2.19 and compiling with Clang. Having the header
3311         included is the correct thing to do anyway.
3312
3313         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
3314         Include <wtf/MathExtras.h>
3315
3316 2014-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
3317
3318         Setting up OrderIterator shouldn't require an extra Vector
3319         https://bugs.webkit.org/show_bug.cgi?id=119061
3320
3321         Reviewed by Darin Adler.
3322
3323         From Blink r153971 by <jchaffraix@chromium.org>
3324
3325         This patches reuse the OrderIterator's Vector. It provides a helper class OrderIteratorPopulator, used for
3326         manipulating the Vector directly. Which allows to consolidate the code into a single implementation across
3327         flexbox and grid.
3328
3329         No new tests, already covered by current tests.
3330
3331         * rendering/OrderIterator.cpp:
3332         (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Reset OrderIterator and call
3333         removeDuplicatedOrderValues().
3334         (WebCore::OrderIteratorPopulator::removeDuplicatedOrderValues): Sorts the Vector and removes the duplicated
3335         order values.
3336         (WebCore::OrderIteratorPopulator::collectChild): Collect order value information from child.
3337         (WebCore::OrderIterator::setOrderValues): Deleted.
3338         * rendering/OrderIterator.h:
3339         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Add helper class to manipulate OrderValues Vector.
3340         * rendering/RenderFlexibleBox.cpp:
3341         (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
3342         (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
3343         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
3344         * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
3345         * rendering/RenderGrid.cpp:
3346         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
3347
3348 2014-05-26  Tim Horton  <timothy_horton@apple.com>
3349
3350         [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
3351         https://bugs.webkit.org/show_bug.cgi?id=133020
3352         <rdar://problem/16521736>
3353
3354         Reviewed by Simon Fraser.
3355
3356         * WebCore.exp.in:
3357         * platform/graphics/cg/IOSurfacePool.cpp:
3358         (WebCore::IOSurfacePool::willAddSurface):
3359         * platform/graphics/cocoa/IOSurface.h:
3360         * platform/graphics/cocoa/IOSurface.mm:
3361         (IOSurface::releaseGraphicsContext):
3362         Rename clearGraphicsContext to releaseGraphicsContext for clarity.
3363
3364 2014-05-26  Philip Rogers  <pdr@google.com>
3365
3366         Remove special case for transparent SVG root layers
3367         https://bugs.webkit.org/show_bug.cgi?id=116856
3368
3369         Reviewed by Dirk Schulze.
3370
3371         This patch removes a special case from RenderLayer for root SVG layers
3372         with opacity. Instead of checking whether a composited layer exists in
3373         SVGRenderingContext::prepareToRenderSVGContent we now exclude the root
3374         SVG renderobject from the opacity checks in prepareToRenderSVGContent.
3375
3376         This is a merge of https://src.chromium.org/viewvc/blink?view=rev&revision=174102
3377         by Philip Rogers <pdr@chromium.org>.
3378
3379         No new tests as this is covered by svg/custom/composited-svg-with-opacity.html.
3380
3381         * rendering/RenderLayer.cpp:
3382         (WebCore::RenderLayer::isTransparent): Deleted.
3383         * rendering/RenderLayer.h:
3384         * rendering/svg/SVGRenderingContext.cpp:
3385         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3386             The opacity case for root svg renderers is now handled by
3387             RenderLayer.
3388
3389 2014-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
3390
3391         CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
3392         https://bugs.webkit.org/show_bug.cgi?id=133266
3393
3394         Reviewed by Benjamin Poulain.
3395
3396         When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.
3397
3398         * cssjit/SelectorCompiler.cpp:
3399         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
3400         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
3401
3402 2014-05-26  Benjamin Poulain  <benjamin@webkit.org>
3403
3404         Fix the quirks mode selector matching of the pseudo classes :hover and :active
3405         https://bugs.webkit.org/show_bug.cgi?id=133063
3406
3407         Reviewed by Antti Koivisto.
3408
3409         Our implementation of the quirks mode of :active and :hover was very wrong. The only
3410         thing it was doing is verify the pseudo class is not the first selector of a fragment
3411         (which was conveniently the only thing that was tested :)).
3412
3413         Since those pseudo class were only checking for the order of the filters, something like
3414             #target:hover
3415         would succeed because :hover is not the first simple selector, while
3416             :hover#target
3417         would fail.
3418
3419         That behavior is also a problem for the CSS JIT as it is an implementation detail of SelectorChecker
3420         and compiling something like that with our out-of-order matching would be nonsense.
3421
3422         This patch update the implementation to follow http://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk
3423         Basically, the only cases that do not work in quirks mode are selectors composed only of "*, :hover and :active".
3424
3425         To implement this behavior, I needed to be able to inspect a complete selector fragment, including
3426         what is before and after :hover/:active.
3427         To do that, I replaced the boolean isSubSelector by a pointer to the first selector of the fragment.
3428         When we need to match :active/:hover in quirks mode, we just go over all the selectors in the fragment
3429         to find one of the qualifying match type.
3430
3431         Tests: fast/selectors/active-hover-quirks.html
3432                fast/selectors/active-quirks.html
3433                fast/selectors/hover-quirks.html
3434
3435         * css/SelectorChecker.cpp:
3436         (WebCore::SelectorChecker::matchRecursively):
3437         (WebCore::canMatchHoverOrActiveInQuirksMode):
3438         (WebCore::SelectorChecker::checkOne):
3439         * css/SelectorChecker.h:
3440         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
3441
3442 2014-05-26  Zalan Bujtas  <zalan@apple.com>
3443
3444         Split the call to adjustForLocalZoom out into a separate expression.
3445         https://bugs.webkit.org/show_bug.cgi?id=133286
3446
3447         Reviewed by Darin Adler.
3448
3449         This patch ensures that adjustForLocalZoom() always gets called before we look at
3450         zoomFactor's value. (and not rely on the undefined behavior of the order of function argument evaluation)
3451
3452         * dom/Element.cpp:
3453         (WebCore::Element::offsetLeft):
3454         (WebCore::Element::offsetTop):
3455
3456 2014-05-26  Darin Adler  <darin@apple.com>
3457
3458         Class name matching should use ASCII case-insensitive matching, not Unicode case folding
3459         https://bugs.webkit.org/show_bug.cgi?id=133292
3460
3461         Reviewed by Anders Carlsson.
3462
3463         Tests: fast/dom/getElementsByClassName/ASCII-case-insensitive.html
3464                fast/dom/getElementsByClassName/case-sensitive.html
3465
3466         * dom/SpaceSplitString.cpp:
3467         (WebCore::hasNonASCIIOrUpper): Deleted.
3468         (WebCore::tokenizeSpaceSplitString): Use a for loop instead of while.
3469         (WebCore::spaceSplitStringTable): Renamed from sharedDataMap; the new name is supposed
3470         to help us see the analogy with the atomic string table.
3471         (WebCore::SpaceSplitString::set): Removed unneeded special case for null and preflight
3472         since AtomicString::convertToASCIILowercase now handles both of those. Changed to call
3473         convertToASCIILowercase instead of foldCase, since we don't want to fold non-ASCII.
3474         (WebCore::SpaceSplitString::spaceSplitStringContainsValue): Ditto.
3475         (WebCore::SpaceSplitStringData::create): Marked this inline since it's only called in
3476         one place and that place is in this file. Also used auto a bit and used get instead of
3477         find since the value type is a simple pointer.
3478         (WebCore::SpaceSplitStringData::destroy): Removed unneeded check for null. We never
3479         create any SpaceSplitStringData with empty strings, and a null is a kind of empty string.
3480
3481         * dom/SpaceSplitString.h: Removed some unneeded includes and some unneeded uses of the
3482         inline keyword. Changed types from size_t to unsigned in a couple places; we had a mix
3483         of the types and there was no reason to use size_t there.
3484
3485 2014-05-26  Javier Fernandez  <jfernandez@igalia.com>
3486
3487         [CSS Grid Layout] Implementation of the "grid" shorthand.
3488         https://bugs.webkit.org/show_bug.cgi?id=132122
3489
3490         Reviewed by Darin Adler.
3491
3492         The grid property is a shorthand that sets all of the explicit
3493         grid properties (grid-template-rows, grid-template-columns, and
3494         grid-template-areas) as well as all the implicit grid properties
3495         (grid-auto-rows, grid-auto-columns, and grid-auto-flow) in a
3496         single declaration
3497
3498         Notice that either explicit or implicit grid can be specified,
3499         assigning the initial values to the omitted properties.
3500
3501         Test: fast/css-grid-layout/grid-shorthand-get-set.html
3502
3503         * css/CSSComputedStyleDeclaration.cpp:
3504         (WebCore::ComputedStyleExtractor::propertyValue):
3505         * css/CSSParser.cpp:
3506         (WebCore::CSSParser::parseValue):
3507         (WebCore::CSSParser::parseGridShorthand):
3508         * css/CSSParser.h:
3509         * css/CSSPropertyNames.in:
3510         * css/StylePropertyShorthand.cpp:
3511         (WebCore::webkitGridShorthand):
3512         * css/StylePropertyShorthand.h:
3513
3514 2014-05-26  Zalan Bujtas  <zalan@apple.com>
3515
3516         Subpixel layout: Legacy Element.offset* client* return values are invalid in certain cases.
3517         https://bugs.webkit.org/show_bug.cgi?id=133272
3518
3519         Reviewed by Simon Fraser.
3520
3521         Element.offset* client* functions applied various rounding strategies on the return values before r168868.
3522         (for example, offsetLeft/Top either floored through implicit integer arithmetics or rounded explicitly depending
3523         whether the zoom scale was 1. see http://trac.webkit.org/changeset/168868/trunk/Source/WebCore/dom/Element.cpp for details)
3524         This patch mimics the legacy behavior by either rounding or flooring the return value.
3525
3526         Not testable (legacy switch is not exposed)
3527
3528         * dom/Element.cpp:
3529         (WebCore::adjustForLocalZoom):
3530         (WebCore::convertToNonSubpixelValueIfNeeded):
3531         (WebCore::Element::offsetLeft):
3532         (WebCore::Element::offsetTop):
3533
3534 2014-05-26  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3535
3536         [EFL] Input fields and text areas are not rendered correctly after r167771
3537         https://bugs.webkit.org/show_bug.cgi?id=133181
3538
3539         Reviewed by Gyuyoung Kim.
3540
3541         r167771 changed arguments of RenderTheme two virtual method arguments which were not reflected
3542         in changes in derived classes, which caused parent method to be called. Arguments in derived class
3543         were updated, also 'override' specifiers were added to all virtual methods to prevent similar errors.
3544
3545         Already covered by fast/forms/textarea-placeholder-wrapping.html
3546
3547         * platform/efl/RenderThemeEfl.cpp:
3548         (WebCore::RenderThemeEfl::paintTextField):
3549         (WebCore::RenderThemeEfl::paintTextArea):
3550         * platform/efl/RenderThemeEfl.h:
3551         (WebCore::RenderThemeEfl::supportsHover):
3552         (WebCore::RenderThemeEfl::supportsControlTints):
3553
3554 2014-05-20  Sergio Villar Senin  <svillar@igalia.com>
3555
3556         [CSS Grid Layout] Children of grid containers must be turned into grid items
3557         https://bugs.webkit.org/show_bug.cgi?id=132991
3558
3559         Reviewed by Darin Adler.
3560
3561         From Blink r150472 by <jchaffraix@chromium.org>
3562
3563         According to specs each child of a grid container must become a
3564         grid item meaning that grid items are grid level boxes and thus,
3565         do not participate in the block formatting context but in the grid
3566         formatting one.
3567
3568         This change updates the grid items' 'display' property after style
3569         resolution so that we match the specification (see section 4. Grid
3570         Items). The spec basically instructs us to compute the value of
3571         'display' by applying the table in CSS2.1 Chapter 9.7
3572         http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
3573
3574         Test: fast/css-grid-layout/grid-item-display.html
3575
3576         * css/StyleResolver.cpp:
3577         (WebCore::isDisplayGridBox):
3578         (WebCore::StyleResolver::adjustRenderStyle):
3579
3580 2014-05-26  Zan Dobersek  <zdobersek@igalia.com>
3581
3582         Remove Vector copies in ShorthandPropertyWrapper implementation and use
3583         https://bugs.webkit.org/show_bug.cgi?id=133265
3584
3585         Reviewed by Simon Fraser.
3586
3587         * page/animation/CSSPropertyAnimation.cpp:
3588         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Move the passed-in Vector
3589         into the member variable instead of using Vector<>::swap().
3590         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Return a const reference of the member
3591         variable instead of a const value.
3592         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Move the Vector
3593         object into the ShorthandProperthyWrapper constructor.
3594         (WebCore::gatherEnclosingShorthandProperties): Deploy a range-based for-loop.
3595
3596 2014-05-26  Tanay C  <tanay.c@samsung.com>
3597
3598         [EFL] Fix build error in blob.cpp after r168435
3599         https://bugs.webkit.org/show_bug.cgi?id=132678
3600
3601         Reviewed by Alexey Proskuryakov.
3602
3603         * fileapi/Blob.cpp:
3604         (WebCore::Blob::size): Using isInBound to check range of local var
3605         actualsize to resolve build error
3606
3607 2014-05-25  Ryuan Choi  <ryuan.choi@samsung.com>
3608
3609         [EFL] Remove TileCairo and TiledBackingStoreBackendCairo
3610         https://bugs.webkit.org/show_bug.cgi?id=133274
3611
3612         Reviewed by Gyuyoung Kim.
3613
3614         Now, TiledBackingStore is only used for CoordinatedGraphics and the EFL port.
3615         CoordinatedGraphics does not use TileCairo and TiledBackingStoreBackendCairo.
3616
3617         This patch removed them and refactored related files.
3618
3619         * PlatformEfl.cmake:
3620         * PlatformGTK.cmake:
3621         * WebCore.vcxproj/WebCore.vcxproj:
3622         * WebCore.vcxproj/WebCore.vcxproj.filters:
3623         * platform/graphics/TiledBackingStore.cpp:
3624         (WebCore::TiledBackingStore::TiledBackingStore): Deleted.
3625         * platform/graphics/TiledBackingStore.h:
3626         * platform/graphics/TiledBackingStoreBackend.h:
3627         * platform/graphics/cairo/TileCairo.cpp: Removed.
3628         * platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp: Removed.
3629
3630 2014-05-25  Jinwoo Song  <jinwoo7.song@samsung.com>
3631
3632         setData() of DataTransfer has a void return type
3633         https://bugs.webkit.org/show_bug.cgi?id=133108
3634
3635         Reviewed by Alexey Proskuryakov.
3636
3637         According to HTML5 spec, setData() of DataTranfer interface does not return value.
3638         http://www.w3.org/TR/html/editing.html#the-datatransfer-interface
3639
3640         Test: editing/pasteboard/set_data_typeof_return.html
3641
3642         * dom/DataTransfer.cpp:
3643         (WebCore::DataTransfer::setData):
3644         * dom/DataTransfer.h:
3645         * dom/DataTransfer.idl:
3646         * platform/Pasteboard.h:
3647         * platform/efl/PasteboardEfl.cpp:
3648         (WebCore::Pasteboard::writeString):
3649         * platform/gtk/PasteboardGtk.cpp:
3650         (WebCore::Pasteboard::writeString):
3651         * platform/ios/PasteboardIOS.mm:
3652         (WebCore::Pasteboard::writeString):
3653         * platform/mac/PasteboardMac.mm:
3654         (WebCore::Pasteboard::writeString):
3655         * platform/win/PasteboardWin.cpp:
3656         (WebCore::Pasteboard::writeString):
3657
3658 2014-05-25  Benjamin Poulain  <bpoulain@apple.com>
3659
3660         [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
3661         https://bugs.webkit.org/show_bug.cgi?id=133262
3662
3663         Reviewed by Simon Fraser.
3664
3665         Since VisibleContentRect was fixed, we were no longer sending scroll events when updating the scrollOffset
3666         when updating the visible content rects. The reason is that the scrollOffset was defined as the top left of the
3667         VisibleContentRect, and as such was already at the end position after updating the unobscured rect.
3668
3669         This patch split the unobscuredContentRect in unobscuredContentSize (updated live on zoom) and the position defined
3670         by the ScrollView's scrollOffset (updated when scrolling).
3671
3672         * WebCore.exp.in:
3673         * platform/ScrollView.h:
3674         * platform/ios/ScrollViewIOS.mm:
3675         (WebCore::ScrollView::unobscuredContentRect):
3676         (WebCore::ScrollView::setUnobscuredContentSize):
3677         (WebCore::ScrollView::setUnobscuredContentRect): Deleted.
3678
3679 2014-05-25  David Kilzer  <ddkilzer@apple.com>
3680
3681         Add type-checked casts for TransformOperations
3682         <http://webkit.org/b/133217>
3683
3684         Reviewed by Simon Fraser.
3685
3686         * platform/graphics/GraphicsLayer.cpp:
3687         (WebCore::GraphicsLayer::validateTransformOperations):
3688         * platform/graphics/ca/GraphicsLayerCA.cpp:
3689         (WebCore::getTransformFunctionValue):
3690         - Switch to type-checked casts.
3691
3692         * platform/graphics/transforms/IdentityTransformOperation.h:
3693         * platform/graphics/transforms/Matrix3DTransformOperation.h:
3694         * platform/graphics/transforms/MatrixTransformOperation.h:
3695         * platform/graphics/transforms/PerspectiveTransformOperation.h:
3696         * platform/graphics/transforms/RotateTransformOperation.h:
3697         * platform/graphics/transforms/ScaleTransformOperation.h:
3698         * platform/graphics/transforms/SkewTransformOperation.h:
3699         * platform/graphics/transforms/TranslateTransformOperation.h:
3700         - Add 'final' to class declaration.
3701         - Add 'override' to overridden methods.
3702         - Add type-checked cast via TRANSFORMOPERATION_TYPE_CASTS macro.
3703         - Move implementation of operator==(const TransformOperation&)
3704           from header to source file so it is able to use a type-checked
3705           cast, and switch back to using a reference instead of a
3706           pointer.
3707         - Add or update ASSERT in private constructor to check for
3708           correct OperationType in classes that represent multiple
3709           types.
3710
3711         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
3712         (WebCore::Matrix3DTransformOperation::operator==): Added.
3713
3714         * platform/graphics/transforms/MatrixTransformOperation.cpp:
3715         (WebCore::Matrix3DTransformOperation::operator==): Added.
3716         (WebCore::MatrixTransformOperation::blend):
3717         - Switch to type-checked casts and use a reference.
3718
3719         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
3720         (WebCore::Matrix3DTransformOperation::operator==): Added.
3721         (WebCore::PerspectiveTransformOperation::blend):
3722         * platform/graphics/transforms/RotateTransformOperation.cpp:
3723         (WebCore::Matrix3DTransformOperation::operator==): Added.
3724         (WebCore::RotateTransformOperation::blend):
3725         * platform/graphics/transforms/ScaleTransformOperation.cpp:
3726         (WebCore::Matrix3DTransformOperation::operator==): Added.
3727         (WebCore::ScaleTransformOperation::blend):
3728         * platform/graphics/transforms/SkewTransformOperation.cpp:
3729         (WebCore::Matrix3DTransformOperation::operator==): Added.
3730         (WebCore::SkewTransformOperation::blend):
3731         * platform/graphics/transforms/TranslateTransformOperation.cpp:
3732         (WebCore::Matrix3DTransformOperation::operator==): Added.
3733         (WebCore::TranslateTransformOperation::blend):
3734         - Switch to type-checked casts.
3735
3736         * platform/graphics/transforms/TransformOperation.h:
3737         (WebCore::TransformOperation::isRotateTransformOperationType):
3738         (WebCore::TransformOperation::isScaleTransformOperationType):
3739         (WebCore::TransformOperation::isSkewTransformOperationType):
3740         (WebCore::TransformOperation::isTranslateTransformOperationType):
3741         - Add type-checking methods used in constructors and type-checked
3742           casts.
3743         - Define TRANSFORMOPERATION_TYPE_CASTS macro used by subclasses.
3744
3745 2014-05-25  David Kilzer  <ddkilzer@apple.com>
3746
3747         Crash in WebCore::TextResourceDecoder::checkForCSSCharset
3748         <http://webkit.org/b/133257>
3749         <rdar://problem/17027109>
3750
3751         Reviewed by Alexey Proskuryakov.
3752
3753         Test: fast/encoding/css-charset-missing-semi-colon-and-newline.html
3754
3755         * loader/TextResourceDecoder.cpp:
3756         (WebCore::TextResourceDecoder::checkForCSSCharset): Add early
3757         return.
3758
3759 2014-05-24  Eric Carlson  <eric.carlson@apple.com>
3760
3761         [Mac] preload AVAssetTrack properties before asking for them
3762         https://bugs.webkit.org/show_bug.cgi?id=133240
3763
3764         Reviewed by Jer Noble.
3765
3766         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3767         (WebCore::assetTrackMetadataKeyNames): Add preferredTransform and naturalSize to the list
3768             of properties we preload.
3769
3770 2014-05-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3771
3772         Remove one of the CSSProperty constructor
3773         https://bugs.webkit.org/show_bug.cgi?id=131094
3774
3775         Reviewed by Darin Adler.
3776
3777         Remove one of the CSSProperty constructor, because it is obsolete.
3778
3779         * css/CSSProperty.h:
3780         (WebCore::CSSProperty::CSSProperty): Deleted.
3781         * css/StyleProperties.h:
3782         (WebCore::StyleProperties::PropertyReference::toCSSProperty):
3783
3784 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
3785
3786         Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
3787         https://bugs.webkit.org/show_bug.cgi?id=133254
3788
3789         Reviewed by Tim Horton.
3790
3791         Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
3792         the member variable and associated getter to make it clear that they relate
3793         to the last committed scroll position.
3794
3795         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3796         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3797         * page/scrolling/ScrollingTreeScrollingNode.h:
3798         (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
3799         (WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.
3800
3801 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
3802
3803         Share some more ScrollingTreeScrollingNode code
3804         https://bugs.webkit.org/show_bug.cgi?id=133248
3805
3806         Reviewed by Sam Weinig.
3807
3808         Push scrollBy(), scrollByWithoutContentEdgeConstraints() and setScrollPosition()
3809         down to ScrollingTreeFrameScrollingNode.
3810         
3811         This requires that scrollPosition() return the right thing for each class, so make
3812         it virtual. Future patches will reduce the confusion between the committed scroll
3813         position and the one derived from layers.
3814
3815         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
3816         (WebCore::ScrollingTreeFrameScrollingNode::scrollBy):
3817         (WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints):
3818         (WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
3819         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
3820         * page/scrolling/ScrollingTreeScrollingNode.h:
3821         (WebCore::ScrollingTreeScrollingNode::scrollPosition):
3822         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
3823         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3824         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition): Deleted.
3825         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy): Deleted.
3826         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints): Deleted.
3827         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3828         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3829         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
3830         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
3831         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
3832         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
3833         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
3834         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy): Deleted.
3835         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints): Deleted.
3836
3837 2014-05-24  Chris Fleizach  <cfleizach@apple.com>
3838
3839         AX: fix coordinate mapping for iOS accessibility
3840         https://bugs.webkit.org/show_bug.cgi?id=133188
3841
3842         Reviewed by Sam Weinig.
3843
3844         Make WebCore aware of the accessibility point/rect conversion methods.
3845
3846         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3847         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
3848         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
3849         * loader/EmptyClients.h:
3850         * page/Chrome.cpp:
3851         (WebCore::Chrome::accessibilityScreenToRootView):
3852         (WebCore::Chrome::rootViewToAccessibilityScreen):
3853         * page/Chrome.h:
3854         * page/ChromeClient.h:
3855         * platform/HostWindow.h:
3856
3857 2014-05-24  Zalan Bujtas  <zalan@apple.com>
3858
3859         Subpixel rendering: Non-compositing transforms with subpixel coordinates paint to wrong position.
3860         https://bugs.webkit.org/show_bug.cgi?id=133184
3861         <rdar://problem/16745606>
3862
3863         Reviewed by Simon Fraser.
3864
3865         Snapping relative negative coordinate values should produce the same position as if they were
3866         positive absolute coordinates.
3867         When a child box gets positioned off of its containers towards top/left, its relative coordinates
3868         become negative. Pixel snapping those negative values should produce the same
3869         final painting position as if the child box was fixed positioned with positive coordinates.
3870         Since halfway values always round away from zero, negative and positive halfway values
3871         produce opposite rounding direction.
3872         This patch ensures that negative halfway values round to the direction as if they were positive.  
3873
3874         Test: fast/layers/hidpi-floor-negative-coordinate-values-to-maintain-rounding-direction.html
3875
3876         * platform/LayoutUnit.h:
3877         (WebCore::roundToDevicePixel):
3878         * rendering/RenderLayer.cpp:
3879         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3880
3881 2014-05-24  Frédéric Wang  <fred.wang@free.fr>
3882
3883         Use size variants and glyph assembly from the MATH data.
3884         https://bugs.webkit.org/show_bug.cgi?id=130322
3885
3886         Reviewed by Chris Fleizach.
3887
3888         This patch modifies the RenderMathMLOperator code to use the MATH table
3889         when one is provided in the current font on the <math> tag. More
3890         precisely, the MathVariants table is used to draw a size variant or
3891         a glyph assembly. The displaystyle attribute is not supported yet, so
3892         for now large operators are always assumed to be in display style. The
3893         MATH support does not work well with all platforms+fonts, so at the
3894         moment the default font-family on the <math> is not changed.
3895
3896         Tests: mathml/opentype/large-operators-LatinModern.html
3897                mathml/opentype/opentype-stretchy.html
3898                mathml/opentype/vertical-LatinModern.html
3899
3900         * css/mathml.css: We only specify the default font-family on the math root, so that people can easily style the mathematics.
3901         For now, old fonts without the MATH table are still used as the default.
3902         (math):
3903         (math, mfenced > *): Deleted.
3904         (mo, mfenced): Deleted.
3905         * platform/graphics/SimpleFontData.cpp: don't return the math data if the font is loading.
3906         (WebCore::SimpleFontData::mathData):
3907         * platform/graphics/opentype/OpenTypeMathData.cpp: update #ifdef so that disabling ENABLE_OPENTYPE_MATH won't lead to errors with unused parameters.
3908         (WebCore::OpenTypeMathData::OpenTypeMathData):
3909         (WebCore::OpenTypeMathData::getMathConstant):
3910         (WebCore::OpenTypeMathData::getItalicCorrection):
3911         (WebCore::OpenTypeMathData::getMathVariants):
3912         * rendering/mathml/RenderMathMLOperator.cpp:
3913         (WebCore::RenderMathMLOperator::boundsForGlyph):
3914         (WebCore::RenderMathMLOperator::heightForGlyph):
3915         (WebCore::RenderMathMLOperator::advanceForGlyph):
3916         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): We handle preferred width of size variants.
3917         (WebCore::RenderMathMLOperator::shouldAllowStretching): This function now only returns whether the operator will stretch and no longer has side effect.
3918         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): We add a function to convert from the MathVariant table data to the format supported by RenderMathMLOperator.
3919         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): We add a function to get the glyph that will be used for large operators in display style.
3920         (WebCore::RenderMathMLOperator::findStretchyData): We make this function handle size variants.
3921         (WebCore::RenderMathMLOperator::updateStyle): We handle size variants.
3922         (WebCore::RenderMathMLOperator::paint): We handle size variants.
3923         * rendering/mathml/RenderMathMLOperator.h:
3924
3925 2014-05-23  Tim Horton  <timothy_horton@apple.com>
3926
3927         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
3928         https://bugs.webkit.org/show_bug.cgi?id=132794
3929         <rdar://problem/16877909>
3930
3931         Reviewed by Simon Fraser.
3932
3933         Virtualize DisplayRefreshMonitor so that WebKit2 can implement its own DisplayRefreshMonitor for UI-side compositing views.
3934         This allows the synchronization of requestAnimationFrame callbacks with UI-side compositing painting.
3935
3936         * WebCore.exp.in:
3937         * WebCore.xcodeproj/project.pbxproj:
3938         
3939         * page/ChromeClient.h:
3940         (WebCore::ChromeClient::graphicsLayerFactory):
3941         (WebCore::ChromeClient::createDisplayRefreshMonitor):
3942         * platform/graphics/DisplayRefreshMonitorFactory.h: Added.
3943         * platform/graphics/GraphicsLayerUpdater.cpp:
3944         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
3945         * platform/graphics/GraphicsLayerUpdater.h:
3946         * rendering/RenderLayerCompositor.cpp:
3947         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
3948         * rendering/RenderLayerCompositor.h:
3949         Give the ChromeClient a chance to provide us with a custom DisplayRefreshMonitor.
3950         If it does not, we'll fall back to making a DisplayRefreshMonitorMac or
3951         DisplayRefreshMonitorIOS depending on the platform.
3952
3953         * dom/ScriptedAnimationController.cpp:
3954         * dom/ScriptedAnimationController.h:
3955         * platform/graphics/DisplayRefreshMonitor.cpp:
3956         * platform/graphics/DisplayRefreshMonitor.h:
3957         * platform/graphics/DisplayRefreshMo