Crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
4         https://bugs.webkit.org/show_bug.cgi?id=119068
5
6         Reviewed by Enrica Casucci.
7
8         The bug was caused by makeInsertedContentRoundTrippableWithHTMLTreeBuilder not updating
9         nodes kept tracked by insertedNodes and moveNodeOutOfAncestor stumbling upon it.
10
11         Fixed the bug by updating insertedNodes in makeInsertedContentRoundTrippableWithHTMLTreeBuilder.
12
13         Test: editing/inserting/insert-table-in-paragraph-crash.html
14
15         * editing/ReplaceSelectionCommand.cpp:
16         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
17         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
18         * editing/ReplaceSelectionCommand.h:
19
20 2015-05-14  Myles C. Maxfield  <mmaxfield@apple.com>
21
22         [Mac] Expose more font weights for -apple-system
23         https://bugs.webkit.org/show_bug.cgi?id=144707
24
25         Reviewed by Simon Fraser.
26
27         Previously, when we parsed a CSS declaration of the form font: keyword; where keyword
28         is one of caption, icon, menu, message-box, small-caption, -webkit-mini-control, -webkit-small-control,
29         or -webkit-control (which html.css does for form controls), we would ask the system what the appropriate
30         system font is, get that font's family name, and synthesize a font-family CSS property for the element.
31         Then, later when we actually go to look up the font, we would look up the font by family name using this
32         information. However, this round-tripping of a font through a family name is actually lossy, and is not
33         guaranteed to preserve system-font-ness (which we use for various things including metrics calculations).
34
35         This patch modifies this logic to specify a token family name instead, which the font lookup code special
36         cases (and reacts by making the appropriate system-font lookup call). This approach is currently how iOS
37         handles these system fonts; this patch simply brings this approach to OS X.
38
39         There is also an added progression here. We used to simply call [NSFont fontWithName:size:] on the system
40         font family name (which the parser found for us) which entirely disregards weight. This means that we
41         used to be getting synthesized bold in form controls which ask for a heavy weight. Migrating to this
42         system-font aware call means that we get the real bold font instead of synthesized bold.
43
44         Once this system-font-ness is guaranteed to be preserved between parsing time and font lookup time, we
45         can safely migrate to using [NSFont systemFontOfSize:weight] instead of [NSFont systemFontOfSize:] on
46         platforms which support it.
47
48         Tests: fast/text/systemFont.html
49                fast/css/css2-system-fonts.html
50                fast/forms/select/optgroup-rendering.html
51                fast/forms/validation-message-appearance.html
52
53         * css/CSSParser.cpp:
54         (WebCore::CSSParser::parseSystemFont): Add a comment regarding why we are bothering with expanding out
55         the font property in the first place.
56         * platform/graphics/cocoa/FontCascadeCocoa.mm:
57         (WebCore::FontCascade::primaryFontIsSystemFont): Update to use new system font tokens.
58         * platform/graphics/mac/FontCacheMac.mm:
59         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
60         Yosemite and later.
61         (WebCore::fontWithFamilySpecialCase): Pull all these special-case font token name handling into a
62         separate function, which returns an Optional.
63         (WebCore::fontWithFamily):
64         * platform/mac/ThemeMac.mm:
65         (WebCore::ThemeMac::controlFont): Use the font token name instead of the generated system font family
66         name.
67         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:] and the proper NSFontWeight
68         constants.
69         * rendering/RenderThemeMac.mm:
70         (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Use the font token names instead of the
71         generated system font family name.
72         (WebCore::RenderThemeMac::setFontFromControlSize): Ditto.
73
74 2015-05-14  Roger Fong  <roger_fong@apple.com>
75
76         Add internals setting to disable wireless playback availability for layout tests
77         https://bugs.webkit.org/show_bug.cgi?id=145012.
78         <rdar://problem/20946504>
79
80         Reviewed by Eric Carlson.
81
82         * testing/InternalSettings.cpp:
83         (WebCore::InternalSettings::resetToConsistentState):
84         (WebCore::InternalSettings::setWirelessPlaybackDisabled):
85         * testing/InternalSettings.idl:
86
87 2015-05-14  Beth Dakin  <bdakin@apple.com>
88
89         Change range of possible forces for mouseforcechanged DOM event
90         https://bugs.webkit.org/show_bug.cgi?id=144987
91         -and corresponding-
92         rdar://problem/20472802
93
94         Reviewed by Tim Horton.
95
96         Change to a 0-3 range.
97         * platform/PlatformMouseEvent.h:
98         * platform/mac/PlatformEventFactoryMac.mm:
99         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
100
101 2015-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
102
103         Fix typo in RenderBox::instrinsicScrollbarLogicalWidth()
104         https://bugs.webkit.org/show_bug.cgi?id=144999
105
106         Reviewed by Sergio Villar Senin.
107
108         Rename RenderBox::instrinsicScrollbarLogicalWidth() to
109         RenderBox::intrinsicScrollbarLogicalWidth().
110
111         No new tests, no behavior changes.
112
113         * rendering/RenderBlock.cpp:
114         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
115         * rendering/RenderBlockFlow.cpp:
116         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
117         * rendering/RenderBox.cpp:
118         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
119         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth): Deleted.
120         * rendering/RenderBox.h:
121         * rendering/RenderDeprecatedFlexibleBox.cpp:
122         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
123         * rendering/RenderFlexibleBox.cpp:
124         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
125
126 2015-05-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
127
128         SharedBuffer::createWithContentsOfFile should use map file routines
129         https://bugs.webkit.org/show_bug.cgi?id=144192
130
131         Reviewed by Darin Adler.
132
133         Made use of mmap routines within SharedBuffer::createWithContentsOfFile for EFL, GTK and Mac ports.
134         If mapping is failing, it falls back to the previous version of SharedBuffer::createWithContentsOfFile renamed as
135         SharedBuffer::createFromReadingFile (using open/read method).
136         File content is mapped until SharedBuffer is cleared, destroyed or additional content is appended to the SharedBuffer.
137
138         A helper class, MappedFileData, is introduced to handle mapped files through calls to open/mmap/munmap/close.
139
140         Patch covered by existing layout tests and added unit tests.
141
142         * platform/FileSystem.cpp:
143         (WebCore::MappedFileData::MappedFileData):
144         (WebCore::MappedFileData::operator=):
145         (WebCore::MappedFileData::~MappedFileData):
146         * platform/FileSystem.h:
147         (WebCore::MappedFileData::MappedFileData):
148         (WebCore::MappedFileData::operator bool):
149         (WebCore::MappedFileData::data):
150         (WebCore::MappedFileData::size):
151         * platform/SharedBuffer.cpp:
152         (WebCore::SharedBuffer::SharedBuffer):
153         (WebCore::SharedBuffer::createWithContentsOfFile): Making use of MappedFileData before using createFromReadingFile.
154         (WebCore::SharedBuffer::size): Checking whether data is coming from a MappedFileData.
155         (WebCore::SharedBuffer::data): Ditto.
156         (WebCore::SharedBuffer::append): Ditto.
157         (WebCore::SharedBuffer::clear): Clearing MappedFileData if needed.
158         (WebCore::SharedBuffer::copy): Transferring mapped data to buffer if needed.
159         (WebCore::SharedBuffer::getSomeData):
160         (WebCore::SharedBuffer::maybeTransferMappedFileData):
161         * platform/SharedBuffer.h:
162         * platform/gtk/SharedBufferGtk.cpp:
163         (WebCore::SharedBuffer::createFromReadingFile): renamed from createWithContentsOfFile.
164         * platform/mac/SharedBufferMac.mm:
165         (WebCore::SharedBuffer::createFromReadingFile): Dito.
166         * platform/posix/SharedBufferPOSIX.cpp:
167         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
168         * platform/win/SharedBufferWin.cpp:
169         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
170
171 2015-05-13  Simon Fraser  <simon.fraser@apple.com>
172
173         Get the ScriptController from the correct frame for media elements and plug-ins
174         https://bugs.webkit.org/show_bug.cgi?id=144983
175         rdar://problem/20692642&19943135
176
177         Reviewed by Sam Weinig.
178
179         HTMLMediaElement, QuickTimePluginReplacement and HTMLPlugInImageElement were
180         getting the main frame's ScriptController instead of the one for their frame.
181         This caused media controls JS to be running in the context of the main frame,
182         which broke media controls which use getCSSCanvasContext() and -webkit-canvas.
183         
184         Fix by getting the frame via the element's document.
185         
186         Also undo r180584 which was working around this bug.
187
188         * Modules/mediacontrols/mediaControlsiOS.js:
189         (ControllerIOS.prototype.drawTimelineBackground):
190         * Modules/plugins/QuickTimePluginReplacement.mm:
191         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
192         (WebCore::QuickTimePluginReplacement::installReplacement):
193         * html/HTMLMediaElement.cpp:
194         (WebCore::HTMLMediaElement::updateCaptionContainer):
195         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
196         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
197         (WebCore::HTMLMediaElement::pageScaleFactorChanged):
198         * html/HTMLPlugInImageElement.cpp:
199         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
200
201 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
202
203         Fix trivial typos in ApplyBlockElementCommand
204         https://bugs.webkit.org/show_bug.cgi?id=144984
205
206         Reviewed by Alexey Proskuryakov.
207
208         No new tests, no behavior change.
209
210         * editing/ApplyBlockElementCommand.cpp:
211         (WebCore::ApplyBlockElementCommand::formatSelection):
212         (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
213         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Deleted.
214         * editing/ApplyBlockElementCommand.h:
215
216 2015-05-13  David Kilzer  <ddkilzer@apple.com>
217
218         REGRESION (r179958): Crash in WebCore::DocumentLoader::detachFromFrame when -[id<WebPolicyDelegate> decidePolicyForMIMEType:request:frame:decisionListener:] fails to call -[id<WebPolicyDecisionListener> download|ignore|use]
219         <http://webkit.org/b/144975>
220
221         Reviewed by Andy Estes.
222
223         This change reverts r179958.  It changes RELEASE_ASSERT*()
224         statements back to Debug-only ASSERT*() statements.
225
226         * loader/DocumentLoader.cpp:
227         (WebCore::DocumentLoader::~DocumentLoader):
228         (WebCore::DocumentLoader::continueAfterContentPolicy):
229         (WebCore::DocumentLoader::detachFromFrame):
230
231 2015-05-13  Antti Koivisto  <antti@apple.com>
232
233         Cached CSS image resources don't show up after reloading <http://nightly.webkit.org/start/>
234         https://bugs.webkit.org/show_bug.cgi?id=144952
235         rdar://problem/13387307
236
237         Reviewed by Oliver Hunt.
238
239         This is a symptom of a general problem that we don't revalidate subresources of cached parsed stylesheets.
240
241         Fix by tightening the check we perform when choosing to used the cached sheet. If there are expired subresources
242         we reparse the sheet.
243
244         Test: http/tests/cache/stylesheet-sharing.html
245
246         * css/CSSCrossfadeValue.cpp:
247         (WebCore::CSSCrossfadeValue::traverseSubresources):
248         (WebCore::CSSCrossfadeValue::hasFailedOrCanceledSubresources): Deleted.
249
250             Replace hasFailedOrCanceledSubresources with general purpose subresource traversal functions.
251
252         * css/CSSCrossfadeValue.h:
253         * css/CSSFilterImageValue.cpp:
254         (WebCore::CSSFilterImageValue::traverseSubresources):
255         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources): Deleted.
256         * css/CSSFilterImageValue.h:
257         * css/CSSFontFaceSrcValue.cpp:
258         (WebCore::CSSFontFaceSrcValue::traverseSubresources):
259         (WebCore::CSSFontFaceSrcValue::hasFailedOrCanceledSubresources): Deleted.
260         * css/CSSFontFaceSrcValue.h:
261         * css/CSSImageSetValue.cpp:
262         (WebCore::CSSImageSetValue::traverseSubresources):
263         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources): Deleted.
264         * css/CSSImageSetValue.h:
265         * css/CSSImageValue.cpp:
266         (WebCore::CSSImageValue::traverseSubresources):
267         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources): Deleted.
268         * css/CSSImageValue.h:
269         * css/CSSValue.cpp:
270         (WebCore::CSSValue::traverseSubresources):
271         (WebCore::CSSValue::hasFailedOrCanceledSubresources): Deleted.
272         * css/CSSValue.h:
273         * css/CSSValueList.cpp:
274         (WebCore::CSSValueList::traverseSubresources):
275         (WebCore::CSSValueList::hasFailedOrCanceledSubresources): Deleted.
276         * css/CSSValueList.h:
277         * css/StyleProperties.cpp:
278         (WebCore::StyleProperties::traverseSubresources):
279         (WebCore::StyleProperties::hasFailedOrCanceledSubresources): Deleted.
280         * css/StyleProperties.h:
281         * css/StyleSheetContents.cpp:
282         (WebCore::traverseSubresourcesInRules):
283         (WebCore::StyleSheetContents::traverseSubresources):
284         (WebCore::StyleSheetContents::subresourcesAllowReuse):
285
286             Disallow reuse if there are expired subresources.
287
288         (WebCore::StyleSheetContents::isLoadingSubresources):
289
290             Testing support.
291
292         (WebCore::childRulesHaveFailedOrCanceledSubresources): Deleted.
293         (WebCore::StyleSheetContents::hasFailedOrCanceledSubresources): Deleted.
294         * css/StyleSheetContents.h:
295         (WebCore::StyleSheetContents::loadCompleted):
296         * html/HTMLLinkElement.cpp:
297         (WebCore::HTMLLinkElement::setCSSStyleSheet):
298         * loader/cache/CachedCSSStyleSheet.cpp:
299         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
300         * loader/cache/CachedCSSStyleSheet.h:
301         * loader/cache/CachedImage.cpp:
302         (WebCore::CachedImage::makeRevalidationDecision):
303         (WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Deleted.
304
305             Move the logging code out from this function (it requires frame access this function doesn't otherwise need)
306             and refactor to return a decision enum.
307
308         * loader/cache/CachedImage.h:
309         * loader/cache/CachedResource.cpp:
310         (WebCore::CachedResource::makeRevalidationDecision):
311         (WebCore::logResourceRevalidationReason): Deleted.
312         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders): Deleted.
313         * loader/cache/CachedResource.h:
314         (WebCore::CachedResource::loadFailedOrCanceled):
315         * loader/cache/CachedResourceLoader.cpp:
316         (WebCore::logRevalidation):
317         (WebCore::logResourceRevalidationDecision):
318         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
319
320             Move logging here.
321
322         * testing/Internals.cpp:
323         (WebCore::Internals::isSharingStyleSheetContents):
324         (WebCore::Internals::isStyleSheetLoadingSubresources):
325         * testing/Internals.h:
326         * testing/Internals.idl:
327
328 2015-05-13  Ryuan Choi  <ryuan.choi@navercorp.com>
329
330         [CoordinatedGraphics] Remove scaleFactor from SurfaceUpdateInfo
331         https://bugs.webkit.org/show_bug.cgi?id=144935
332
333         Reviewed by Darin Adler.
334
335         The members of SurfaceUpdateInfo are only used to update tile except scaleFactor.
336         So, this patch removes scaleFactor from SurfaceUpdateInfo.
337         In addition, removes unnecessary parameters in createTile() 
338
339         No new tests because there is no behavior change.
340
341         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
342         (WebCore::CoordinatedGraphicsLayer::createTile):
343         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
344         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
345         (WebCore::CoordinatedTile::updateBackBuffer):
346         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
347         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
348
349 2015-05-13  Sam Weinig  <sam@webkit.org>
350
351         Modernize ContainerNode::childElementCount
352         https://bugs.webkit.org/show_bug.cgi?id=144930
353
354         Reviewed by Darin Adler.
355
356         * dom/ContainerNode.cpp:
357         (WebCore::ContainerNode::childElementCount):
358         Use std::distance to compute the number of child elements.
359
360         * dom/ElementChildIterator.h:
361         Add typedefs to make the child element iterators conform STL standards.
362
363 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
364
365         REGRESSION(r183770): Crash inside WebEditorClient::shouldApplyStyle when applying underline
366         https://bugs.webkit.org/show_bug.cgi?id=144949
367         <rdar://problem/20895753>
368
369         Reviewed by Darin Adler.
370
371         The crash was caused by the variant of applyStyleToSelection that takes EditingStyle passing
372         a null pointer to shouldApplyStyle when we're only applying text decoration changes so that
373         m_mutableStyle in the editing style is null. This didn't reproduce in execCommand since we
374         wouldn't call shouldApplyStyle in that case. It didn't reproduce in my manual testing because
375         font panel also sets text shadow, which ends up filling up m_mutableStyle.
376
377         Fixed the bug by creating a mutable style properties when one is not provided by EditingStyle.
378         Also fixed the "FIXME" in the function by converting text decoration changes to a corresponding
379         text decoration value. The values passed to shouldApplyStyle now matches the old behavior prior
380         to r183770.
381
382         Test: editing/style/underline-by-user.html
383
384         * editing/EditingStyle.cpp:
385         (WebCore::EditingStyle::styleWithResolvedTextDecorations): Added.
386         * editing/EditingStyle.h:
387         * editing/Editor.cpp:
388         (WebCore::Editor::applyStyleToSelection): Use styleWithResolvedTextDecorations to avoid the crash.
389
390 2015-05-13  Eric Carlson  <eric.carlson@apple.com>
391
392         Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice
393         https://bugs.webkit.org/show_bug.cgi?id=144969
394
395         Reviewed by Alexey Proskuryakov.
396
397         * dom/Document.cpp:
398         (WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early 
399         return to work around https://webkit.org/b/144970.
400
401 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
402
403         Going back after resizing causes scroll knob to appear in the middle of the page
404         https://bugs.webkit.org/show_bug.cgi?id=144968
405         <rdar://problem/18299827>
406
407         Reviewed by Beth Dakin.
408
409         * history/CachedPage.cpp:
410         (WebCore::CachedPage::restore):
411         (WebCore::CachedPage::clear):
412         * history/CachedPage.h:
413         (WebCore::CachedPage::markForContentsSizeChanged):
414         * history/PageCache.cpp:
415         (WebCore::PageCache::markPagesForContentsSizeChanged):
416         * history/PageCache.h:
417         Add a flag that will cause us to call updateContentsSize() after a page
418         comes out of the page cache, if necessary.
419
420         * page/FrameView.cpp:
421         (WebCore::FrameView::setContentsSize):
422         * page/FrameView.h:
423         Mark all cached pages for this frame as needing updateContentsSize()
424         when setContentsSize happens. This will ensure that scrollbar layers
425         are repositioned when coming out of the page cache.
426
427 2015-05-13  Beth Dakin  <bdakin@apple.com>
428
429         Need SPI to set the overlay scroll bar style
430         https://bugs.webkit.org/show_bug.cgi?id=144928
431         -and corresponding-
432         rdar://problem/20143614
433
434         Reviewed by Anders Carlsson.
435
436         New ChromeClient function preferredScrollbarOverlayStyle() will fetch the 
437         scrollbar style that was set via the new SPI.
438         * page/ChromeClient.h:
439
440         If the preferredScrollbarOverlayStyle() is anything but None, then use it. None is 
441         used to indicate that the normal heuristic should compute the appropriate color.
442         * page/FrameView.cpp:
443         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
444         * page/FrameView.h:
445
446 2015-05-13  Brent Fulgham  <bfulgham@apple.com>
447
448         Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points
449         https://bugs.webkit.org/show_bug.cgi?id=142521
450         <rdar://problem/20100706>
451
452         Reviewed by Darin Adler.
453
454         The scrollbars were not being dismissed because they were not being notified that the wheel
455         gesture was finished. This was happening because the wheel event 'ended' state has zero
456         deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing
457         through the 'handleWheelEventPhase' code that would notify the scrollbar controller that
458         the gesture had ended.
459
460         * platform/ScrollableArea.cpp:
461         (WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being
462         called when the mouse exited the content area.
463         * platform/mac/ScrollAnimatorMac.mm:
464         (WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has
465         no change in X or Y coordinate.
466
467 2015-05-12  David Hyatt  <hyatt@apple.com>
468
469         Don't compute selection painting info when we don't have selection.
470         https://bugs.webkit.org/show_bug.cgi?id=144920
471         <rdar://problem/20919920>
472
473         Reviewed by Simon Fraser.
474
475         * rendering/InlineTextBox.cpp:
476         (WebCore::InlineTextBox::paint):
477
478         Just set the selection paint style to the text paint style when we don't have a selection
479         at all. Computing the selection style takes time in the case where a ::selection pseudo is
480         used on the page, so we don't want to waste time computing that info unless it's actually
481         needed.
482
483 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
484
485         Pass String as reference in more places
486         https://bugs.webkit.org/show_bug.cgi?id=144769
487
488         Reviewed by Daniel Bates.
489
490         * bindings/js/SerializedScriptValue.cpp:
491         (WebCore::CloneSerializer::dumpString):
492         (WebCore::CloneSerializer::dumpStringObject):
493         * dom/DocumentMarkerController.cpp:
494         (WebCore::DocumentMarkerController::addMarker):
495         * dom/DocumentMarkerController.h:
496         * inspector/InspectorApplicationCacheAgent.cpp:
497         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
498         * inspector/InspectorApplicationCacheAgent.h:
499         * inspector/InspectorNodeFinder.cpp:
500         (WebCore::stripCharacters):
501         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
502         * inspector/InspectorNodeFinder.h:
503
504 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
505
506         View scale changes are temporarily lost after restoring a page from the page cache
507         https://bugs.webkit.org/show_bug.cgi?id=144934
508
509         Reviewed by Brady Eidson.
510
511         * history/CachedPage.cpp:
512         (WebCore::CachedPage::CachedPage):
513         (WebCore::CachedPage::restore):
514         (WebCore::CachedPage::clear):
515         * history/CachedPage.h:
516         (WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed.
517         * history/PageCache.cpp:
518         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed.
519         * history/PageCache.h:
520         Rename PageCache/CachedPage methods to make it more clear that they
521         will eventually result in calling deviceOrPageScaleFactorChanged().
522         Also, use modern initialization for CachedPage members.
523
524         * loader/HistoryController.cpp:
525         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
526         (WebCore::HistoryController::restoreScrollPositionAndViewState):
527         Store the pageScaleFactor on HistoryItem with the view scale factored out,
528         because the view scale can change while the page is in the page cache, and
529         WebCore needs a way - without consulting with WebKit2 - to apply the changed
530         view scale to the cached page scale.
531
532         * page/Page.cpp:
533         (WebCore::Page::setViewScaleFactor):
534         (WebCore::Page::setDeviceScaleFactor):
535         * page/Page.h:
536         (WebCore::Page::viewScaleFactor):
537         Keep track of the viewScaleFactor, and mark all pages in the page cache
538         as needing to call deviceOrPageScaleFactorChanged and do a full style recalc
539         when they come back from the page cache.
540
541         For now, we expect all callers of setPageScaleFactor (including WebKit2 and
542         HistoryController) to multiply the viewScale in manually, to avoid the
543         significant amount of change in WebCore that would be required to keep them
544         totally separately.
545
546 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
547
548         Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation
549         https://bugs.webkit.org/show_bug.cgi?id=144797
550
551         Reviewed by Darin Adler.
552
553         Using std::swap() on TransformationMatrix objects which don't
554         provide move constructors will result in copies.
555
556         Instead, use a helper function in both MatrixTransformOperation
557         and Matrix3DTransformOperation that calls TransformationMatrix::blend()
558         and returns the new Matrix(3D)TransformOperation object, and call it
559         with fromT and toT arguments switched when blending to identity.
560
561         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
562         (WebCore::createOperation):
563         (WebCore::Matrix3DTransformOperation::blend):
564         * platform/graphics/transforms/Matrix3DTransformOperation.h: No need
565         to copy the m_matrix member, it won't change when passed to
566         TransformationMatrix::multiply().
567         * platform/graphics/transforms/MatrixTransformOperation.cpp:
568         (WebCore::createOperation):
569         (WebCore::MatrixTransformOperation::blend):
570
571 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
572
573         [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
574         https://bugs.webkit.org/show_bug.cgi?id=144909
575
576         Reviewed by Sergio Villar Senin and Žan Doberšek.
577
578         The pixmap is created and passed to eglCreatePixmapSurface(), but
579         never released. eglCreatePixmapSurface() doesn't take the
580         ownership of the pixmap, so we should explicitly free it when the
581         GLContextEGL is destroyed.
582
583         * platform/graphics/egl/GLContextEGL.cpp:
584         (WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap
585         and transfer the ownership to the context by using the new
586         constructor that receives a XUniquePixmap&&.
587         (WebCore::GLContextEGL::createContext): createPixmapContext() is
588         now only defined for X11.
589         (WebCore::GLContextEGL::GLContextEGL): New constructor that
590         receives a XUniquePixmap&&.
591         * platform/graphics/egl/GLContextEGL.h: Add new constructor and
592         initialize the cairo device when defined to simplify constructors.
593
594 2015-05-12  Sungmann Cho  <sungmann.cho@navercorp.com>
595
596         Reindent DIBPixelData.h for consistency.
597         https://bugs.webkit.org/show_bug.cgi?id=144942
598
599         Reviewed by Darin Adler.
600
601         No new tests, no behavior change.
602
603         * platform/graphics/win/DIBPixelData.h:
604         (WebCore::DIBPixelData::DIBPixelData):
605         (WebCore::DIBPixelData::buffer):
606         (WebCore::DIBPixelData::bufferLength):
607         (WebCore::DIBPixelData::size):
608         (WebCore::DIBPixelData::bytesPerRow):
609         (WebCore::DIBPixelData::bitsPerPixel):
610
611 2015-05-12  Commit Queue  <commit-queue@webkit.org>
612
613         Unreviewed, rolling out r184224.
614         https://bugs.webkit.org/show_bug.cgi?id=144946
615
616         Made inspector/page/main-frame-resource.html assert every time
617         (Requested by ap on #webkit).
618
619         Reverted changeset:
620
621         "Web Inspector: REGRESSION (r181625): Timeline recording
622         started from console.profile is always empty"
623         https://bugs.webkit.org/show_bug.cgi?id=144882
624         http://trac.webkit.org/changeset/184224
625
626 2015-05-12  Jer Noble  <jer.noble@apple.com>
627
628         [Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
629         https://bugs.webkit.org/show_bug.cgi?id=144937
630
631         Reviewed by Eric Carlson.
632
633         Querying for the -[AVAsset tracks] property blocks for network loading; and could
634         block forever if the asset in question is not reachable. Add a "safe" mechanism for
635         querying the list of audible tracks, and use that when providing the audioSourceProvider()
636         with an audible track.
637
638         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
639         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
640         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
641         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
642         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
643         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
644         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):
645
646 2015-05-12  Ryosuke Niwa  <rniwa@webkit.org>
647
648         Mac build fix after r184228.
649
650         * bindings/scripts/CodeGeneratorJS.pm:
651
652 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
653
654         Turn antialiased font dilation off by default
655         https://bugs.webkit.org/show_bug.cgi?id=144940
656         rdar://problem/20923031
657
658         Reviewed by Sam Weinig.
659
660         Turn antialised font dilation off by default.
661
662         * page/Settings.cpp:
663         (WebCore::Settings::Settings):
664         * platform/graphics/FontCascade.cpp:
665
666 2015-05-12  Alex Christensen  <achristensen@webkit.org>
667
668         Don't export all JS bindings classes.
669         https://bugs.webkit.org/show_bug.cgi?id=144932
670
671         Reviewed by Dan Bernstein.
672
673         This change is good if it compiles and links successfully.
674
675         * bindings/scripts/CodeGeneratorJS.pm:
676         (ExportLabelForClass):
677         Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
678         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
679         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
680         * bindings/scripts/test/JS/JSTestEventConstructor.h:
681         * bindings/scripts/test/JS/JSTestEventTarget.h:
682         * bindings/scripts/test/JS/JSTestException.h:
683         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
684         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
685         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
686         * bindings/scripts/test/JS/JSTestNode.h:
687         * bindings/scripts/test/JS/JSTestNondeterministic.h:
688         * bindings/scripts/test/JS/JSTestObj.h:
689         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
690         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
691         * bindings/scripts/test/JS/JSTestTypedefs.h:
692         * bindings/scripts/test/JS/JSattribute.h:
693         * bindings/scripts/test/JS/JSreadonly.h:
694         Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
695         but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
696
697 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
698
699         [Win] Update DXSDK_DIR settings for build system.
700
701         Unreviewed build fix.
702
703         * WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.
704
705 2015-05-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
706
707         Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
708         https://bugs.webkit.org/show_bug.cgi?id=144904
709
710         Reviewed by Andreas Kling.
711
712         We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.
713
714         No new tests, no behavior changes.
715
716         * dom/AutocompleteErrorEvent.h:
717         * dom/DOMNamedFlowCollection.h:
718         (WebCore::DOMNamedFlowCollection::create):
719         * dom/MessageChannel.h:
720         (WebCore::MessageChannel::create):
721         * dom/MessagePort.h:
722         * dom/MutationObserver.cpp:
723         (WebCore::MutationObserver::create):
724         * dom/MutationObserver.h:
725         * dom/NamedFlowCollection.h:
726         * dom/NodeFilter.h:
727         (WebCore::NodeFilter::create):
728         * dom/NodeIterator.h:
729         (WebCore::NodeIterator::create):
730         * dom/ProcessingInstruction.cpp:
731         (WebCore::ProcessingInstruction::create):
732         * dom/ProcessingInstruction.h:
733         * dom/ScriptedAnimationController.h:
734         (WebCore::ScriptedAnimationController::create):
735         * dom/SecurityPolicyViolationEvent.h:
736         * dom/StaticNodeList.h:
737         * dom/TemplateContentDocumentFragment.h:
738         * dom/Touch.cpp:
739         (WebCore::Touch::cloneWithNewTarget):
740         * dom/Touch.h:
741         (WebCore::Touch::create):
742         * dom/TouchEvent.h:
743         * dom/TouchList.h:
744         (WebCore::TouchList::create):
745         * dom/TreeWalker.h:
746         (WebCore::TreeWalker::create):
747         * dom/WebKitNamedFlow.cpp:
748         (WebCore::WebKitNamedFlow::create):
749         * dom/WebKitNamedFlow.h:
750         * dom/default/PlatformMessagePortChannel.cpp:
751         (WebCore::PlatformMessagePortChannel::create):
752         * dom/default/PlatformMessagePortChannel.h:
753         (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
754
755 2015-05-12  Matt Baker  <mattbaker@apple.com>
756
757         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
758         https://bugs.webkit.org/show_bug.cgi?id=144882
759
760         Reviewed by Brian Burg.
761
762         A timeline recording will always be stopped before the end of the current run loop is observed. Before
763         dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
764         to prevent it from being discarded.
765
766         * inspector/InspectorTimelineAgent.cpp:
767         (WebCore::InspectorTimelineAgent::internalStop):
768
769 2015-05-12  Zalan Bujtas  <zalan@apple.com>
770
771         REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
772         https://bugs.webkit.org/show_bug.cgi?id=144917
773         rdar://problem/20545878
774
775         Reviewed by Andreas Kling.
776
777         This patch ensures that text stroke width value is taken into account while
778         calculating visual overflow for simple line layout.
779         Ceiling the text stroke width value matches the normal text layout behaviour.
780
781         Test: fast/text/simple-line-layout-text-stroke-width.html
782
783         * rendering/SimpleLineLayoutFunctions.cpp:
784         (WebCore::SimpleLineLayout::paintFlow):
785         (WebCore::SimpleLineLayout::collectFlowOverflow):
786
787 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
788
789         Build fix.
790
791         * platform/spi/cf/CFNetworkSPI.h:
792
793 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
794
795         ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
796
797         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
798
799 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
800
801         AX: [ATK] ARIA menu items should not have anonymous block children
802         https://bugs.webkit.org/show_bug.cgi?id=144653
803
804         Reviewed by Chris Fleizach.
805
806         Exclude anonymous block children of menu items from the accessible tree
807         for ATK. Exclude list markers from the accessibility tree if the parent
808         is not being exposed as an accessible list item.
809
810         No new tests. Instead, modified the existing tests to reflect the correct
811         behavior.
812
813         * accessibility/AccessibilityRenderObject.cpp:
814         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
815         * accessibility/atk/AccessibilityObjectAtk.cpp:
816         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
817
818 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
819
820         [Mac] Share cookie storage between UI process and secondary processes
821         https://bugs.webkit.org/show_bug.cgi?id=144820
822         rdar://problem/20572830
823
824         Reviewed by Darin Adler.
825
826         * platform/network/mac/CookieJarMac.mm:
827         * platform/spi/cf/CFNetworkSPI.h:
828         Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.
829
830 2015-05-12  Chris Dumez  <cdumez@apple.com>
831
832         [WK2] Log using diagnostic logging how far back in history we navigate
833         https://bugs.webkit.org/show_bug.cgi?id=144919
834         <rdar://problem/20920043>
835
836         Reviewed by Gavin Barraclough.
837
838         Add diagnostic logging keys for logging back history navigation delta.
839
840         * page/DiagnosticLoggingKeys.cpp:
841         (WebCore::DiagnosticLoggingKeys::deltaKey):
842         (WebCore::DiagnosticLoggingKeys::backNavigationKey):
843         * page/DiagnosticLoggingKeys.h:
844
845 2015-05-12  Yoav Weiss  <yoav@yoav.ws>
846
847         Avoid CSSPrimitiveValue allocation when parsing sizes
848         https://bugs.webkit.org/show_bug.cgi?id=144910
849
850         Reviewed by Darin Adler.
851
852         Turn non-calc length calculation logic into a static method,
853         so that it can be called without a CSSPrimitiveValue object.
854         Then, call that method to calculate the default source-size length.
855
856         No new tests, since no functionality change.
857
858         * css/CSSPrimitiveValue.cpp:
859         (WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method.
860         (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc.
861         * css/CSSPrimitiveValue.h:
862         (WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static.
863         * css/SourceSizeList.cpp:
864         (WebCore::defaultLength): Use the new static method to compute the length.
865         (WebCore::computeLength): Use the calc length computation methods directly.
866
867 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
868
869         [Win] Unreviewed build fix for older DirectX build environments.
870
871         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our
872         d3d stub header to avoid build failures on July 2004 DXSDK build environments.
873
874 2015-05-12  Eric Carlson  <eric.carlson@apple.com>
875
876         [Mac] Refine media playback target client configuration
877         https://bugs.webkit.org/show_bug.cgi?id=144892
878
879         Reviewed by Brent Fulgham.
880
881         Client and target picker state changes fequently happen several times in quick succession, so
882         don't react to immediately so we can batch callbacks to the web process. 
883         * Modules/mediasession/WebMediaSessionManager.cpp:
884         (WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer
885         because it can never be NULL.
886         (WebCore::ClientState::operator == ): New.
887         (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client 
888         configuration and a target configuration check.
889         (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring
890         update, and a target configuration check.
891         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
892         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update.
893         (WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed
894         can play to a target, tell it to start using the target even if it isn't playing as long as
895         no other client is actively using a target.
896         (WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause.
897         (WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration.
898         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients.
899         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer.
900         (WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks.
901         (WebCore::WebMediaSessionManager::find): 
902         * Modules/mediasession/WebMediaSessionManager.h:
903
904         * html/HTMLMediaElement.cpp:
905         (WebCore::HTMLMediaElement::setMuted): Call updateMediaState.
906         (WebCore::HTMLMediaElement::setPlaying): Ditto.
907         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
908         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging.
909         (WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change
910         unless something actually changed.
911         * html/HTMLMediaElement.h:
912
913         * html/HTMLMediaSession.cpp:
914         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging.
915         (WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto.
916         (WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup.
917
918         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
919         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to
920         deprecated API and the "-Wdeprecated-declarations".
921
922 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
923
924         AX: [GTK] Defer to WebCore Accessibility for table exposure
925         https://bugs.webkit.org/show_bug.cgi?id=144896
926
927         Reviewed by Chris Fleizach.
928
929         Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
930         for WebKitGtk.
931
932         No new tests. Several existing tests already cover table exposure. They have
933         been updated accordingly.
934
935         * accessibility/AccessibilityTable.cpp:
936         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
937
938 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
939
940         [GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
941         https://bugs.webkit.org/show_bug.cgi?id=116971
942
943         Reviewed by Chris Fleizach.
944
945         Because ATK lacks API to directly get an accessible row via its index,
946         the implementation of rowAtIndex gets a cell in the indexed row and
947         returns the parent row. The failing test continued to fail because
948         AccessibilityARIAGridCell::parentTable called parentObjectUnignored at
949         most twice, the second call in place to handle rows which are included
950         in the tree. However, given a well-formed ARIA grid with a rowgroup that
951         is interactive, that rowgroup also needs to be in the tree necessitating
952         parentObjectUnignored be called a third time to get to the grid. Given a
953         poorly-formed ARIA grid, there may additional objects which pass the test
954         for inclusion standing in between the cell and grid necessitating more
955         calls still. Therefore, ascend the hierarchy to find the parent grid.
956
957         No new tests. The failing test now passes.
958
959         * accessibility/AccessibilityARIAGridCell.cpp:
960         (WebCore::AccessibilityARIAGridCell::parentTable):
961
962 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
963
964         [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
965         https://bugs.webkit.org/show_bug.cgi?id=144521
966
967         Reviewed by Darin Adler.
968
969         Add XUniquePtr as a template alias of std:unique_ptr to handle X
970         resources using pointers and XUniqueResource as a new class to
971         handle X resources using a long unsigned identifier. This
972         simplifies the code and makes it more difficult to leak X resources.
973
974         * PlatformEfl.cmake: Add new files to compilation.
975         * PlatformGTK.cmake: Ditto.
976         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
977         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
978         Remove the display member, and use XUnique for Pixmap and GC.
979         (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
980         Remove code to explicitly free Pixmap and GC.
981         (WebCore::BackingStoreBackendCairoX11::scroll):
982         * platform/graphics/cairo/BackingStoreBackendCairoX11.h:
983         * platform/graphics/glx/GLContextGLX.cpp:
984         (WebCore::GLContextGLX::createWindowContext): Use XUnique and the
985         new constructor that receives a XID, since there's no longer
986         conflict with the one receiving a Pbuffer.
987         (WebCore::GLContextGLX::createPbufferContext): Use XUnique and the
988         new constructor that receives a XUniqueGLXPbuffer&&.
989         (WebCore::GLContextGLX::createPixmapContext):
990         (WebCore::GLContextGLX::createContext):
991         (WebCore::GLContextGLX::GLContextGLX):
992         (WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly
993         free X resources.
994         (WebCore::GLContextGLX::makeContextCurrent):
995         (WebCore::GLContextGLX::cairoDevice):
996         (WebCore::GLContextGLX::platformContext):
997         * platform/graphics/glx/GLContextGLX.h:
998         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
999         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
1000         (WebCore::EGLXTransportSurfaceClient::destroy):
1001         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
1002         * platform/graphics/surfaces/egl/EGLXSurface.h:
1003         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1004         (WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique
1005         instead of the custom std::unique X11Deleter.
1006         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
1007         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1008         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
1009         (WebCore::GLXOffScreenSurface::initialize):
1010         * platform/graphics/surfaces/glx/X11Helper.cpp:
1011         (WebCore::X11Helper::createOffScreenWindow): Ditto.
1012         (WebCore::X11Helper::createPixmap): Ditto.
1013         * platform/graphics/surfaces/glx/X11Helper.h:
1014         * platform/graphics/x11/XUniquePtr.h: Remove X11Deleter.
1015         (WebCore::XPtrDeleter::operator()):
1016         * platform/graphics/x11/XUniqueResource.cpp: Added.
1017         (WebCore::XUniqueResource<XResource::Colormap>::deleteXResource):
1018         (WebCore::XUniqueResource<XResource::Damage>::deleteXResource):
1019         (WebCore::XUniqueResource<XResource::Pixmap>::deleteXResource):
1020         (WebCore::XUniqueResource<XResource::Window>::deleteXResource):
1021         (WebCore::XUniqueResource<XResource::GLXPbuffer>::deleteXResource):
1022         (WebCore::XUniqueResource<XResource::GLXPixmap>::deleteXResource):
1023         * platform/graphics/x11/XUniqueResource.h: Added.
1024         (WebCore::XUniqueResource::XUniqueResource):
1025         (WebCore::XUniqueResource::operator=):
1026         (WebCore::XUniqueResource::~XUniqueResource):
1027         (WebCore::XUniqueResource::get):
1028         (WebCore::XUniqueResource::release):
1029         (WebCore::XUniqueResource::reset):
1030         (WebCore::XUniqueResource::operator!):
1031         (WebCore::XUniqueResource::operator UnspecifiedBoolType*):
1032
1033 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
1034
1035         Move TransformOperation-based classes off of PassRefPtr
1036         https://bugs.webkit.org/show_bug.cgi?id=144876
1037
1038         Reviewed by Darin Adler.
1039
1040         Remove uses of PassRefPtr from the TransformOperation class and its
1041         derivatives, operating on Ref and RefPtr objects instead.
1042
1043         * platform/graphics/transforms/IdentityTransformOperation.h:
1044         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
1045         (WebCore::Matrix3DTransformOperation::blend):
1046         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1047         * platform/graphics/transforms/MatrixTransformOperation.cpp:
1048         (WebCore::MatrixTransformOperation::blend):
1049         * platform/graphics/transforms/MatrixTransformOperation.h:
1050         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1051         (WebCore::PerspectiveTransformOperation::blend):
1052         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1053         * platform/graphics/transforms/RotateTransformOperation.cpp:
1054         (WebCore::RotateTransformOperation::blend):
1055         * platform/graphics/transforms/RotateTransformOperation.h:
1056         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1057         (WebCore::ScaleTransformOperation::blend):
1058         * platform/graphics/transforms/ScaleTransformOperation.h:
1059         * platform/graphics/transforms/SkewTransformOperation.cpp:
1060         (WebCore::SkewTransformOperation::blend):
1061         * platform/graphics/transforms/SkewTransformOperation.h:
1062         * platform/graphics/transforms/TransformOperation.h:
1063         * platform/graphics/transforms/TransformOperations.cpp:
1064         (WebCore::TransformOperations::blendByMatchingOperations):
1065         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1066         (WebCore::TranslateTransformOperation::blend):
1067         * platform/graphics/transforms/TranslateTransformOperation.h:
1068
1069 2015-05-12  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1070
1071         [Streams API] ReadableStream reader should not be disposable when having pending promises
1072         https://bugs.webkit.org/show_bug.cgi?id=144869
1073
1074         Reviewed by Darin Adler.
1075
1076         Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved.
1077
1078         Covered by tests added to streams/readable-stream-gc.html.
1079
1080         * Modules/streams/ReadableStreamReader.cpp:
1081         (WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref.
1082         (WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector.
1083         * Modules/streams/ReadableStreamReader.h:
1084         * bindings/js/JSReadableStreamReaderCustom.cpp:
1085         (WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader.
1086         * bindings/js/ReadableJSStream.cpp:
1087         (WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef().
1088
1089 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1090
1091         Clean up redundant resources in case of failure in GLContextEGL context creation methods
1092         https://bugs.webkit.org/show_bug.cgi?id=144878
1093
1094         Reviewed by Martin Robinson.
1095
1096         GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods
1097         should clean up the freshly-created resources when prematurely returning due to a
1098         failure.
1099
1100         * platform/graphics/egl/GLContextEGL.cpp:
1101         (WebCore::GLContextEGL::createWindowContext):
1102         (WebCore::GLContextEGL::createPixmapContext):
1103
1104 2015-05-11  Dan Bernstein  <mitz@apple.com>
1105
1106         WebCore part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
1107
1108         Reviewed by Alexey Proskuryakov.
1109
1110         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm
1111
1112         In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
1113         When the about:blank load is committed, the UI process still thinks that the provisional
1114         URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
1115         has been committed.
1116
1117         The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
1118         happens, (3) when the client changes the request in willSendRequest, and (4) in this
1119         about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
1120         initiated. So this patch addresses (4).
1121
1122         * loader/DocumentLoader.cpp:
1123         (WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
1124         while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
1125         * loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
1126         implementation.
1127
1128 2015-05-11  Zalan Bujtas  <zalan@apple.com>
1129
1130         Text is misplaced when custom font does not have space glyph.
1131         https://bugs.webkit.org/show_bug.cgi?id=144879
1132
1133         Reviewed by Myles C. Maxfield
1134
1135         This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it.
1136
1137         If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while
1138         measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient.
1139         (even when the text does not require space at all)
1140         Fallback fonts impact line positions through ascent/descent calculation.
1141
1142         Test: fast/text/font-with-no-space-glyph.html
1143
1144         * rendering/RenderText.cpp:
1145         (WebCore::RenderText::computePreferredLogicalWidths):
1146         * rendering/line/BreakingContext.h:
1147         (WebCore::WordTrailingSpace::WordTrailingSpace):
1148         (WebCore::WordTrailingSpace::width):
1149         (WebCore::BreakingContext::handleText):
1150
1151 2015-05-11  Simon Fraser  <simon.fraser@apple.com>
1152
1153         Small tidyup in animations code
1154         https://bugs.webkit.org/show_bug.cgi?id=144893
1155
1156         Reviewed by Eric Carlson.
1157
1158         Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing,
1159         particularly as the last parameter is a TimingFunction*. Put default values 
1160         in the header (with nullptr) and fix the callers. Also fix variable names in
1161         the implementation.
1162
1163         * page/animation/AnimationBase.cpp:
1164         (WebCore::AnimationBase::progress):
1165         * page/animation/AnimationBase.h:
1166         * page/animation/ImplicitAnimation.cpp:
1167         (WebCore::ImplicitAnimation::animate):
1168         (WebCore::ImplicitAnimation::getAnimatedStyle):
1169         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
1170
1171 2015-05-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1172
1173         Purge PassRefPtr in WebCore/rendering
1174         https://bugs.webkit.org/show_bug.cgi?id=144872
1175
1176         Reviewed by Darin Adler.
1177
1178         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering.
1179
1180         No new tests, no behavior changes.
1181
1182         * rendering/HitTestingTransformState.h:
1183         (WebCore::HitTestingTransformState::create):
1184         * rendering/RenderLayer.cpp:
1185         (WebCore::ClipRects::create):
1186         * rendering/RenderThemeGtk.cpp:
1187         (WebCore::RenderThemeGtk::create):
1188         (WebCore::RenderTheme::themeForPage):
1189         * rendering/RenderThemeGtk.h:
1190         * rendering/RenderThemeIOS.h:
1191         * rendering/RenderThemeIOS.mm:
1192         (WebCore::RenderTheme::themeForPage):
1193         (WebCore::RenderThemeIOS::create):
1194         * rendering/RenderThemeMac.h:
1195         * rendering/RenderThemeMac.mm:
1196         (WebCore::RenderTheme::themeForPage):
1197         (WebCore::RenderThemeMac::create):
1198         * rendering/RenderThemeSafari.cpp:
1199         (WebCore::RenderThemeSafari::create):
1200         (WebCore::RenderTheme::themeForPage):
1201         * rendering/RenderThemeSafari.h:
1202         * rendering/RenderThemeWin.cpp:
1203         (WebCore::RenderThemeWin::create):
1204         (WebCore::RenderTheme::themeForPage):
1205         * rendering/RenderThemeWin.h:
1206         * rendering/TextAutoSizing.h:
1207         (WebCore::TextAutoSizingValue::create):
1208         * rendering/style/ShapeValue.h:
1209         (WebCore::ShapeValue::createShapeValue):
1210         (WebCore::ShapeValue::createBoxShapeValue):
1211         (WebCore::ShapeValue::createImageValue):
1212         * rendering/style/StyleCachedImage.h:
1213         * rendering/style/StyleCachedImageSet.h:
1214         * rendering/style/StyleGeneratedImage.h:
1215         * rendering/style/StylePendingImage.h:
1216         * rendering/style/StyleReflection.h:
1217         (WebCore::StyleReflection::create):
1218
1219 2015-05-11  Eric Carlson  <eric.carlson@apple.com>
1220
1221         [Mac] Update device picker icon when video tracks change
1222         https://bugs.webkit.org/show_bug.cgi?id=144889
1223         <rdar://problem/20907253>
1224
1225         Reviewed by Brent Fulgham.
1226
1227         * Modules/mediacontrols/mediaControlsApple.js:
1228         (Controller.prototype.updateHasVideo):
1229
1230 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
1231
1232         Scroll snap logic should be triggered when resizing the WebView
1233         https://bugs.webkit.org/show_bug.cgi?id=142590
1234         <rdar://problem/20125088>
1235
1236         Reviewed by Simon Fraser.
1237
1238         Tests coming in a second patch.
1239
1240         Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
1241         but there was no code to honor these values when window resizing was occurring. The correction was
1242         handled in two ways:
1243         1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
1244            it had shifted to a new snap point, so that the resize code (which happens on the main thread)
1245            could ensure that we stayed clamped to the correct 'tile' in the snap region.
1246         2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
1247            after resizing calculations were complete.
1248
1249         This change also required the addition of two indices to the scrollable area to track which scroll
1250         snap point was currently being used. We don't bother with a 'none' case because you cannot have a
1251         'none' state when you have an active set of scroll snap points, and we do not execute this code
1252         if the scroll snap points are null.
1253
1254         The FrameView code was computing updated snap offsets after it had dispatched frame view layout
1255         information to the scrolling thread, which was wrong. This was also corrected.
1256
1257         I think it might be possible to track all of this state inside the ScrollController, but the current
1258         scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
1259         This should be fixed in the future, which would allow us to remove some of this local state.
1260
1261         * page/FrameView.cpp:
1262         (WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
1263         calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
1264         call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
1265         resize (if appropriate).
1266         * page/scrolling/AsyncScrollingCoordinator.cpp:
1267         (WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
1268         the correct scroll region when a new snap position (index) has been selected by user interaction on
1269         the scrolling thread.
1270         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
1271         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
1272         * page/scrolling/AsyncScrollingCoordinator.h:
1273         * page/scrolling/AxisScrollSnapOffsets.h:
1274         (WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
1275         it to handle resize operations.
1276         * page/scrolling/ScrollingTree.h:
1277         (WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
1278         * page/scrolling/ThreadedScrollingTree.cpp:
1279         (WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
1280         horizontal and vertical scroll snap indices back to the main thread.
1281         * page/scrolling/ThreadedScrollingTree.h:
1282         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1283         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
1284         the current event, notify the main thread of any change in the active scroll snap index.
1285         * platform/ScrollAnimator.cpp:
1286         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
1287         clients to find out about the current scroll snap state, which is only known by the ScrollController.
1288         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
1289         * platform/ScrollAnimator.h:
1290         * platform/ScrollView.cpp:
1291         (WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
1292         to one of our active scroll snap offsets.
1293         * platform/ScrollView.h:
1294         * platform/ScrollableArea.cpp:
1295         (WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
1296         keep track of the new values for potential resize operations.
1297         (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
1298         (WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
1299         (WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
1300         the proper scroll position based on the active scroll snap offset.
1301         * platform/ScrollableArea.h:
1302         (WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
1303         (WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
1304         (WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
1305         (WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
1306         (WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
1307         * platform/cocoa/ScrollController.h:
1308         (WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
1309         (WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
1310         (WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
1311         * platform/cocoa/ScrollController.mm:
1312         (WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
1313         index (if applicable).
1314         (WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
1315         the current active index.
1316         (WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
1317         index, as well as whether the current animation actually changed the active snap point offset.
1318         * platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
1319         that represents the current scroll snap offset.
1320         * platform/cocoa/ScrollSnapAnimatorState.mm:
1321         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
1322         * rendering/RenderLayer.cpp:
1323         (WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
1324         active scroll snap points.
1325         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
1326         we stay on the current scroll snap offset during resizing.
1327         * rendering/RenderLayer.h:
1328
1329 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
1330
1331         Addressing post-review comments after r184037.
1332
1333         Unreviewed.
1334
1335         No new tests because there is no behavior change.
1336
1337         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1338         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1339
1340 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
1341
1342         [Win] Move Windows build target to Windows 7 (or newer)
1343         https://bugs.webkit.org/show_bug.cgi?id=144890
1344         <rdar://problem/20707307>
1345
1346         Reviewed by Anders Carlsson.
1347
1348         Update linked SDK and minimal Windows level to be compatible with
1349         Windows 7 or newer.
1350
1351         * WebCore.vcxproj/WebCore.vcxproj:
1352         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
1353         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
1354         * WebCorePrefix.h:
1355         * config.h:
1356         * testing/js/WebCoreTestSupportPrefix.h:
1357
1358 2015-05-11  Joanmarie Diggs  <jdiggs@igalia.com>
1359
1360         AX: [ATK] Always include rows in the tree of accessible tables
1361         https://bugs.webkit.org/show_bug.cgi?id=144885
1362
1363         Reviewed by Chris Fleizach.
1364
1365         Remove the code that excluded rows from the tree of accessible tables for
1366         Gtk and Efl, the latter of which inherited the exclusion from the former.
1367
1368         No new tests. We already have several tests which cover table hierarchy.
1369         The associated expectations have been updated as part of this fix.
1370
1371         * accessibility/AccessibilityTable.cpp:
1372         (WebCore::AccessibilityTable::addChildrenFromSection):
1373         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1374         (webkitAccessibleGetParent):
1375
1376 2015-05-11  Matt Baker  <mattbaker@apple.com>
1377
1378         Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
1379         https://bugs.webkit.org/show_bug.cgi?id=144808
1380
1381         Reviewed by Darin Adler.
1382
1383         Profiles started from the console should always use the Inspector environment's shared stopwatch.
1384
1385         * inspector/InspectorTimelineAgent.cpp:
1386         (WebCore::InspectorTimelineAgent::startFromConsole):
1387
1388 2015-05-11  Alex Christensen  <achristensen@webkit.org>
1389
1390         [Content Extensions] Support domain-specific rules and exceptions.
1391         https://bugs.webkit.org/show_bug.cgi?id=144833
1392
1393         Reviewed by Darin Adler.
1394
1395         Test: http/tests/contentextensions/domain-rules.html
1396         (And lots of API tests)
1397
1398         This patch adds if-domain and unless-domain to the trigger in the JSON format.
1399         if-domain makes the rule apply only to domains in the list.
1400         unless-domain makes the rule apply to domains that are not in the list.
1401         
1402         All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
1403         All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
1404         The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.
1405         
1406         If there are no domain specific rules, there is no change in behavior.
1407         If there are domain specific rules, the URL will be checked for matches in both
1408         filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from 
1409         filtersWithDomainsBytecode then the domain of the main document will be checked with 
1410         domainFiltersBytecode to see which of the matches applies to this domain.
1411
1412         * contentextensions/CombinedURLFilters.cpp:
1413         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
1414         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
1415         * contentextensions/CombinedURLFilters.h:
1416         Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
1417         * contentextensions/CompiledContentExtension.cpp:
1418         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1419         * contentextensions/CompiledContentExtension.h:
1420         * contentextensions/ContentExtensionCompiler.cpp:
1421         (WebCore::ContentExtensions::serializeActions):
1422         (WebCore::ContentExtensions::compileRuleList):
1423         Separate the rules into rules with domains and rules without domains and compile to bytecode.
1424         * contentextensions/ContentExtensionCompiler.h:
1425         Updated compiler interface to reflect the slightly more complicated structure.
1426         * contentextensions/ContentExtensionError.cpp:
1427         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1428         * contentextensions/ContentExtensionError.h:
1429         Added new parsing errors.
1430         * contentextensions/ContentExtensionParser.cpp:
1431         (WebCore::ContentExtensions::getDomainList):
1432         (WebCore::ContentExtensions::loadTrigger):
1433         (WebCore::ContentExtensions::loadEncodedRules):
1434         * contentextensions/ContentExtensionRule.h:
1435         (WebCore::ContentExtensions::Trigger::operator==):
1436         Parse the new domain structures from JSON into the Trigger structure.
1437         * contentextensions/ContentExtensionsBackend.cpp:
1438         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1439         Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
1440         * contentextensions/DFABytecode.h:
1441         (WebCore::ContentExtensions::instructionSizeWithArguments):
1442         * contentextensions/DFABytecodeCompiler.cpp:
1443         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
1444         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
1445         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1446         * contentextensions/DFABytecodeCompiler.h:
1447         * contentextensions/DFABytecodeInterpreter.cpp:
1448         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
1449         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
1450         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1451         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1452         * contentextensions/DFABytecodeInterpreter.h:
1453         * loader/ResourceLoadInfo.h:
1454         Keep track of which actions have an if-domain trigger.  If an action is in the 
1455         filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
1456         This requires additional information in the bytecode, so there are two new bytecode types.
1457
1458 2015-05-11  Yoav Weiss  <yoav@yoav.ws>
1459
1460         Add srcset, sizes and picture to the features json
1461         https://bugs.webkit.org/show_bug.cgi?id=144862
1462
1463         Reviewed by Benjamin Poulain.
1464
1465         Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
1466         as well as adding the picture element and srcset's x descriptor as seperate features.
1467
1468         No new tests, since no new functionality added.
1469
1470         * features.json:
1471
1472 2015-05-11  Chris Dumez  <cdumez@apple.com>
1473
1474         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
1475         https://bugs.webkit.org/show_bug.cgi?id=144873
1476
1477         Reviewed by Simon Fraser.
1478
1479         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
1480         checkingLogicalHeight should only be initialized to true when
1481         "dimensionsCheck & WidthDimensionsCheck" if isVertical is true.
1482
1483         * dom/Document.cpp:
1484         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1485
1486 2015-05-11  Daniel Bates  <dabates@apple.com>
1487
1488         [iOS] Close all open databases in expiration handler of process assertion
1489         https://bugs.webkit.org/show_bug.cgi?id=144661
1490         <rdar://problem/20845052>
1491
1492         Reviewed by Darin Adler.
1493
1494         Expose functionality in WebCore to close all open databases. Closing a SQLite database
1495         will interrupt any in-progress database transactions.
1496
1497         * Modules/webdatabase/AbstractDatabaseServer.h:
1498         * Modules/webdatabase/DatabaseManager.cpp:
1499         (WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
1500         * Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
1501         we can call in from WebKit2.
1502         * Modules/webdatabase/DatabaseServer.cpp:
1503         (WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
1504         * Modules/webdatabase/DatabaseServer.h:
1505         * Modules/webdatabase/DatabaseTracker.cpp:
1506         (WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
1507         * Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
1508         we can call in from Legacy WebKit.
1509
1510 2015-05-11  Antti Koivisto  <antti@apple.com>
1511
1512         WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
1513         https://bugs.webkit.org/show_bug.cgi?id=144870
1514         rdar://problem/20727702
1515
1516         Reviewed by Simon Fraser.
1517
1518         No repro but we are seeing null pointer crashes like this:
1519
1520         Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
1521         0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
1522         1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
1523         2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30
1524
1525         * platform/graphics/MaskImageOperation.cpp:
1526         (WebCore::MaskImageOperation::MaskImageOperation):
1527         (WebCore::MaskImageOperation::isCSSValueNone):
1528
1529             This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
1530             There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
1531             and there is setImage which may turn m_styleImage null later too.
1532
1533             Fix by making null m_cssMaskImageValue always signify CSSValueNone.
1534
1535         (WebCore::MaskImageOperation::cssValue):
1536
1537 2015-05-11  Chris Fleizach  <cfleizach@apple.com>
1538
1539         AX: Crash at WebCore::AccessibilityMenuList::addChildren()
1540         https://bugs.webkit.org/show_bug.cgi?id=144860
1541
1542         Reviewed by Mario Sanchez Prada.
1543
1544         There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.
1545
1546         Test: accessibility/menu-list-crash2.html
1547
1548         * accessibility/AccessibilityMenuList.cpp:
1549         (WebCore::AccessibilityMenuList::addChildren):
1550
1551 2015-05-11  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
1552
1553         [WebGL] Unnecessary condition check in the while loop
1554         https://bugs.webkit.org/show_bug.cgi?id=125001
1555
1556         Reviewed by Csaba Osztrogonác.
1557
1558         While loop in this case needs to be optimized a little.
1559         For now a conditional statement in while will execute two
1560         times at begin. do-while loop avoids to check first statement.
1561
1562         No new tests. No behaviour changed.
1563
1564         * html/canvas/WebGLFramebuffer.cpp:
1565         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
1566
1567 2015-05-11  Joonghun Park  <jh718.park@samsung.com>
1568
1569         [GTK] Reorder Performance class's member initialization sequence
1570         https://bugs.webkit.org/show_bug.cgi?id=144858
1571
1572         Reviewed by Csaba Osztrogonác.
1573
1574         No new tests, no new behaviors.
1575
1576         * page/Performance.cpp:
1577         (WebCore::Performance::Performance):
1578
1579 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1580
1581         Reduce TransformationMatrix copies in WebKitCSSMatrix operations
1582         https://bugs.webkit.org/show_bug.cgi?id=144795
1583
1584         Reviewed by Darin Adler.
1585
1586         Instead of copying the TransformationMatrix member, performing
1587         the operation on it and then copying it again when creating
1588         the new WebKitCSSMatrix object, copy it just once by first
1589         creating the new WebKitCSSMatrix object and then performing
1590         the operation on that object's TransformationMatrix directly.
1591
1592         * css/WebKitCSSMatrix.cpp:
1593         (WebCore::WebKitCSSMatrix::multiply):
1594         (WebCore::WebKitCSSMatrix::translate):
1595         (WebCore::WebKitCSSMatrix::scale):
1596         (WebCore::WebKitCSSMatrix::rotate):
1597         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
1598         (WebCore::WebKitCSSMatrix::skewX):
1599         (WebCore::WebKitCSSMatrix::skewY):
1600
1601 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1602
1603         Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
1604         https://bugs.webkit.org/show_bug.cgi?id=144793
1605
1606         Reviewed by Darin Adler.
1607
1608         Update virtual method overrides under Source/WebCore/loader
1609         and Source/WebCore/dom which are missing the override specifier.
1610
1611         * loader/DocumentThreadableLoader.h:
1612         (WebCore::DocumentThreadableLoader::refThreadableLoader):
1613         (WebCore::DocumentThreadableLoader::derefThreadableLoader):
1614         * loader/cache/CachedRawResource.h:
1615         * xml/parser/XMLDocumentParser.h:
1616
1617 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
1618
1619         Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
1620         https://bugs.webkit.org/show_bug.cgi?id=144792
1621
1622         Reviewed by Darin Adler.
1623
1624         Update virtual method overrides under Source/WebCore/accessibility
1625         and Source/WebCore/dom which are missing the override specifier.
1626
1627         * accessibility/AccessibilityMockObject.h:
1628         (WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
1629         * accessibility/AccessibilityRenderObject.h:
1630         * dom/DecodedDataDocumentParser.h:
1631         * dom/TouchEvent.h:
1632
1633 2015-05-10  Zan Dobersek  <zdobersek@igalia.com>
1634
1635         Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
1636         https://bugs.webkit.org/show_bug.cgi?id=144794
1637
1638         Reviewed by Philippe Normand.
1639
1640         * Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
1641         should return a const reference to the member variables, instead of
1642         copying the objects on every call.
1643
1644 2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1645
1646         Use Ref instead of PassRefPtr in WebCore/page
1647         https://bugs.webkit.org/show_bug.cgi?id=144841
1648
1649         Reviewed by Darin Adler.
1650
1651         To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
1652         in WebCore/page.
1653
1654         No new tests, no behavior changes.
1655
1656         * page/DebugPageOverlays.cpp:
1657         * page/EventSource.cpp:
1658         (WebCore::EventSource::create):
1659         * page/EventSource.h:
1660         * page/History.h:
1661         (WebCore::History::create):
1662         * page/Location.h:
1663         (WebCore::Location::create):
1664         * page/MainFrame.cpp:
1665         (WebCore::MainFrame::create):
1666         * page/MainFrame.h:
1667         * page/Navigator.h:
1668         (WebCore::Navigator::create):
1669         * page/PageOverlay.cpp:
1670         (WebCore::PageOverlay::create):
1671         * page/PageOverlay.h:
1672         * page/Performance.h:
1673         * page/PerformanceEntryList.h:
1674         (WebCore::PerformanceEntryList::create):
1675         * page/PerformanceMark.h:
1676         (WebCore::PerformanceMark::create):
1677         * page/PerformanceMeasure.h:
1678         (WebCore::PerformanceMeasure::create):
1679         * page/PerformanceNavigation.h:
1680         (WebCore::PerformanceNavigation::create):
1681         * page/PerformanceResourceTiming.h:
1682         (WebCore::PerformanceResourceTiming::create):
1683         * page/PerformanceTiming.h:
1684         (WebCore::PerformanceTiming::create):
1685         * page/PerformanceUserTiming.h:
1686         (WebCore::UserTiming::create):
1687         * page/Screen.h:
1688         * page/Settings.cpp:
1689         (WebCore::Settings::create):
1690         * page/Settings.h:
1691         * page/TextIndicator.cpp:
1692         (WebCore::TextIndicator::create):
1693         * page/TextIndicator.h:
1694         * page/UserContentController.cpp:
1695         (WebCore::UserContentController::create):
1696         * page/UserContentController.h:
1697         * page/UserMessageHandlerDescriptor.h:
1698         (WebCore::UserMessageHandlerDescriptor::create):
1699         * page/UserMessageHandlersNamespace.h:
1700         * page/VisitedLinkStore.h:
1701         * page/WebKitNamespace.h:
1702         (WebCore::WebKitNamespace::create):
1703         * page/WebKitPoint.h:
1704         (WebCore::WebKitPoint::create):
1705         * page/WorkerNavigator.h:
1706         (WebCore::WorkerNavigator::create):
1707         * page/animation/ImplicitAnimation.h:
1708         (WebCore::ImplicitAnimation::create):
1709         * page/animation/KeyframeAnimation.h:
1710         * page/mac/ServicesOverlayController.h:
1711         * page/mac/ServicesOverlayController.mm:
1712         (WebCore::ServicesOverlayController::Highlight::createForSelection):
1713         (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
1714         * page/scrolling/ScrollingCoordinator.cpp:
1715         (WebCore::ScrollingCoordinator::create):
1716         * page/scrolling/ScrollingCoordinator.h:
1717         * page/scrolling/ScrollingStateFixedNode.cpp:
1718         (WebCore::ScrollingStateFixedNode::create):
1719         (WebCore::ScrollingStateFixedNode::clone):
1720         * page/scrolling/ScrollingStateFixedNode.h:
1721         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1722         (WebCore::ScrollingStateFrameScrollingNode::create):
1723         (WebCore::ScrollingStateFrameScrollingNode::clone):
1724         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1725         * page/scrolling/ScrollingStateNode.h:
1726         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1727         (WebCore::ScrollingStateOverflowScrollingNode::create):
1728         (WebCore::ScrollingStateOverflowScrollingNode::clone):
1729         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
1730         * page/scrolling/ScrollingStateStickyNode.cpp:
1731         (WebCore::ScrollingStateStickyNode::create):
1732         (WebCore::ScrollingStateStickyNode::clone):
1733         * page/scrolling/ScrollingStateStickyNode.h:
1734         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1735         (WebCore::ScrollingCoordinator::create):
1736         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1737         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1738         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
1739         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1740         (WebCore::ScrollingTreeIOS::create):
1741         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1742         (WebCore::ScrollingCoordinator::create):
1743         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1744         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1745         (WebCore::ScrollingTreeFixedNode::create):
1746         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1747         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1748         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
1749         * page/scrolling/mac/ScrollingTreeMac.cpp:
1750         (ScrollingTreeMac::create):
1751         * page/scrolling/mac/ScrollingTreeMac.h:
1752         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1753         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1754         (WebCore::ScrollingTreeStickyNode::create):
1755
1756 2015-05-10  Simon Fraser  <simon.fraser@apple.com>
1757
1758         background-position sometimes doesn't work properly with background-attachment: fixed
1759         https://bugs.webkit.org/show_bug.cgi?id=103757
1760         rdar://problem/18749925
1761
1762         Reviewed by Darin Adler.
1763         
1764         Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
1765         effect.
1766         
1767         The primary issue was that positioningAreaSize was including the top content inset
1768         height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
1769         code path, which kicks in when the root background is fixed.
1770
1771         Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
1772                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
1773                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
1774                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html
1775
1776         * rendering/RenderBoxModelObject.cpp:
1777         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1778
1779 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1780
1781         Get rid of the public item accessors in BackForwardClient
1782         https://bugs.webkit.org/show_bug.cgi?id=144827
1783
1784         Reviewed by Darin Adler.
1785
1786         Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
1787         We can still use these functionalities through BackForwardController.
1788
1789         No new tests, no behavior change.
1790
1791         * history/BackForwardClient.h:
1792         (WebCore::BackForwardClient::backItem): Deleted.
1793         (WebCore::BackForwardClient::currentItem): Deleted.
1794         (WebCore::BackForwardClient::forwardItem): Deleted.
1795
1796 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1797
1798         Rename Length::isPercent() and Length::isPercentNotCalculated().
1799         https://bugs.webkit.org/show_bug.cgi?id=144791
1800
1801         Reviewed by Darin Adler.
1802
1803         1. Rename these methods as below for consistency and clarity.
1804
1805         Length::isPercentNotCalculated() => Length::isPercent()
1806         Length::isPercent() => Length::isPercentOrCalculated()
1807
1808         2. Simplify the condition check of length type in SVGLengthContext::valueForLength().
1809
1810         "length.isPercent() && !length.isCalculated()" => "length.isPercent()"
1811
1812         No new tests, no behavior change.
1813
1814         * css/CSSComputedStyleDeclaration.cpp:
1815         (WebCore::valueForImageSliceSide):
1816         (WebCore::valueForReflection):
1817         (WebCore::percentageOrZoomAdjustedValue):
1818         (WebCore::lineHeightFromStyle):
1819         (WebCore::ComputedStyleExtractor::propertyValue):
1820         * html/HTMLPlugInImageElement.cpp:
1821         (WebCore::is100Percent):
1822         * page/animation/AnimationBase.cpp:
1823         (WebCore::AnimationBase::computeTransformedExtentViaTransformList):
1824         * platform/Length.h:
1825         (WebCore::Length::percent):
1826         (WebCore::Length::isPercent):
1827         (WebCore::Length::isPercentOrCalculated):
1828         (WebCore::Length::isSpecified):
1829         (WebCore::Length::isPercentNotCalculated): Deleted.
1830         * platform/graphics/transforms/TranslateTransformOperation.h:
1831         * rendering/AutoTableLayout.cpp:
1832         (WebCore::AutoTableLayout::recalcColumn):
1833         (WebCore::AutoTableLayout::fullRecalc):
1834         (WebCore::shouldScaleColumns):
1835         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1836         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1837         (WebCore::AutoTableLayout::layout):
1838         * rendering/FixedTableLayout.cpp:
1839         (WebCore::FixedTableLayout::calcWidthArray):
1840         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
1841         (WebCore::FixedTableLayout::layout):
1842         * rendering/RenderBlock.cpp:
1843         (WebCore::RenderBlock::isSelfCollapsingBlock):
1844         (WebCore::RenderBlock::textIndentOffset):
1845         * rendering/RenderBox.cpp:
1846         (WebCore::RenderBox::needsPreferredWidthsRecalculation):
1847         (WebCore::RenderBox::computeLogicalHeight):
1848         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1849         (WebCore::RenderBox::computePercentageLogicalHeight):
1850         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1851         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1852         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1853         (WebCore::RenderBox::availableLogicalHeightUsing):
1854         (WebCore::logicalWidthIsResolvable):
1855         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1856         (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
1857         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1858         * rendering/RenderBoxModelObject.cpp:
1859         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1860         (WebCore::RenderBoxModelObject::relativePositionOffset):
1861         (WebCore::RenderBoxModelObject::computedCSSPadding):
1862         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
1863         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1864         * rendering/RenderDeprecatedFlexibleBox.cpp:
1865         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1866         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
1867         * rendering/RenderElement.cpp:
1868         (WebCore::mustRepaintFillLayers):
1869         * rendering/RenderFileUploadControl.cpp:
1870         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
1871         * rendering/RenderFrameSet.cpp:
1872         (WebCore::RenderFrameSet::layOutAxis):
1873         * rendering/RenderImage.cpp:
1874         (WebCore::RenderImage::repaintOrMarkForLayout):
1875         * rendering/RenderInline.cpp:
1876         (WebCore::computeMargin):
1877         * rendering/RenderListBox.cpp:
1878         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
1879         * rendering/RenderMenuList.cpp:
1880         (RenderMenuList::computeIntrinsicLogicalWidths):
1881         * rendering/RenderObject.cpp:
1882         (WebCore::objectIsRelayoutBoundary):
1883         * rendering/RenderReplaced.cpp:
1884         (WebCore::RenderReplaced::computePreferredLogicalWidths):
1885         * rendering/RenderSlider.cpp:
1886         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
1887         * rendering/RenderTable.cpp:
1888         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1889         * rendering/RenderTableSection.cpp:
1890         (WebCore::RenderTableSection::layoutRows):
1891         * rendering/RenderTextControl.cpp:
1892         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
1893         * rendering/RenderView.cpp:
1894         (WebCore::RenderView::layout):
1895         * rendering/RootInlineBox.cpp:
1896         (WebCore::RootInlineBox::verticalPositionForBox):
1897         * rendering/style/GridLength.h:
1898         (WebCore::GridLength::isPercentage):
1899         * rendering/style/GridTrackSize.h:
1900         (WebCore::GridTrackSize::isPercentage):
1901         * rendering/style/RenderStyle.cpp:
1902         (WebCore::RenderStyle::computedLineHeight):
1903         * rendering/svg/RenderSVGRoot.cpp:
1904         (WebCore::RenderSVGRoot::hasRelativeDimensions):
1905         * svg/SVGLengthContext.cpp:
1906         (WebCore::SVGLengthContext::valueForLength):
1907         * svg/graphics/SVGImage.cpp:
1908         (WebCore::SVGImage::hasRelativeWidth):
1909         (WebCore::SVGImage::hasRelativeHeight):
1910
1911 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1912
1913         Remove unnecessary semicolons.
1914         https://bugs.webkit.org/show_bug.cgi?id=144844
1915
1916         Reviewed by Darin Adler.
1917
1918         No new tests, no behavior change.
1919
1920         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1921         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1922         * platform/ios/PasteboardIOS.mm:
1923         (WebCore::Pasteboard::readString):
1924         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
1925         (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
1926         * platform/network/mac/ResourceErrorMac.mm:
1927         (WebCore::ResourceError::nsError):
1928         * rendering/RenderThemeIOS.mm:
1929         (WebCore::getSharedFunctionRef):
1930
1931 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
1932
1933         Remove unnecessary forward declarations in StyleProperties.h
1934         https://bugs.webkit.org/show_bug.cgi?id=144843
1935
1936         Reviewed by Darin Adler.
1937
1938         No new tests, no behavior change.        
1939
1940         * css/StyleProperties.h:
1941
1942 2015-05-10  Darin Adler  <darin@apple.com>
1943
1944         [Cocoa] Fix paths and resort WebCore project file
1945         https://bugs.webkit.org/show_bug.cgi?id=144838
1946
1947         Reviewed by Dan Bernstein.
1948
1949         * WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
1950         sort-Xcode-project-file script and fixed the paths in the platform/ios directory.
1951
1952 2015-05-10  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1953
1954         [Streams API] Refactor ReadableStreamReader close promise callback cleaning
1955         https://bugs.webkit.org/show_bug.cgi?id=144799
1956
1957         Reviewed by Darin Adler.
1958
1959         Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
1960         Moved that method to private as it is no longer needed by subclasses.
1961
1962         No behavior changes.
1963
1964         * Modules/streams/ReadableStreamReader.cpp:
1965         (WebCore::ReadableStreamReader::releaseStreamAndClean):
1966         (WebCore::ReadableStreamReader::changeStateToClosed):
1967         (WebCore::ReadableStreamReader::changeStateToErrored):
1968         * Modules/streams/ReadableStreamReader.h:
1969
1970 2015-05-10  Darin Adler  <darin@apple.com>
1971
1972         [Cocoa] Don't soft link DataDetectorsCore
1973         https://bugs.webkit.org/show_bug.cgi?id=144837
1974
1975         Reviewed by Dan Bernstein.
1976
1977         Linking this in the normal way should slightly speed up the web process
1978         startup time. We don't need to soft link it: It's present in the
1979         OS X base system and there is no reference cycle with WebKit.
1980
1981         * Configurations/WebCore.xcconfig: Added PrivateFrameworks to
1982         FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
1983         OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.
1984
1985         * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.
1986
1987         * editing/mac/DataDetection.mm:
1988         (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
1989         if DataDetectorsCore is available.
1990
1991         * page/mac/ServicesOverlayController.h: Simplified a forward declaration to
1992         only declare what we actually use.
1993         * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
1994         DataDetectorsSPI.h header.
1995
1996         * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
1997         DataDetectorsCore framework, which has no reference cycle with WebKit, and
1998         which we can link to normally. Moved the content here from DataDetectorsSPI.h,
1999         added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
2000         the incorrect return type on DDScannerScanQuery, which was detected when
2001         using the system headers in conjunction with this file.
2002
2003         * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
2004         was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
2005         path that uses the system headers and moved a few stray DataDetectors SPI
2006         definitions from elsewhere into this header.
2007
2008 2015-05-10  Chris Fleizach  <cfleizach@apple.com>
2009
2010         AX: Don't expose elements as data tables just because they use display: table
2011         https://bugs.webkit.org/show_bug.cgi?id=144804
2012
2013         Reviewed by Mario Sanchez Prada.
2014
2015         Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.
2016
2017         Test: accessibility/css-table-ignored.html
2018
2019         * accessibility/AccessibilityTable.cpp:
2020         (WebCore::AccessibilityTable::isDataTable):
2021
2022 2015-05-09  Chris Dumez  <cdumez@apple.com>
2023
2024         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
2025         https://bugs.webkit.org/show_bug.cgi?id=144825
2026
2027         Reviewed by Sam Weinig.
2028
2029         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
2030         specification and to avoid IDL code duplication:
2031         - https://dom.spec.whatwg.org/#interface-parentnode
2032         - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
2033
2034         No Web-Exposed behavior change.
2035
2036         * CMakeLists.txt:
2037         * DerivedSources.make:
2038         * WebCore.xcodeproj/project.pbxproj:
2039         * dom/CharacterData.idl:
2040         * dom/Document.idl:
2041         * dom/DocumentFragment.idl:
2042         * dom/Element.idl:
2043         * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
2044         * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
2045
2046 2015-05-09  Chris Dumez  <cdumez@apple.com>
2047
2048         Invalidate the FontCache on WebProcess suspension / critical memory pressure
2049         https://bugs.webkit.org/show_bug.cgi?id=144821
2050
2051         Reviewed by Antti Koivisto.
2052
2053         Invalidate the FontCache on WebProcess suspension / critical memory
2054         pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
2055         the pages I tested). We already purge inactive font data on
2056         non-critical memory warning but invalidating the whole FontCache takes
2057         care of clearing the FontCascade cache and the fontPlatformData cache
2058         as well.
2059
2060         * platform/MemoryPressureHandler.cpp:
2061         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2062
2063 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
2064
2065         Remove the PICTURE_SIZES build flag
2066         https://bugs.webkit.org/show_bug.cgi?id=144679
2067
2068         Reviewed by Benjamin Poulain.
2069
2070         Removed the PICTURE_SIZES build time flag.
2071
2072         No new tests, since there's no functionality change.
2073
2074         * Configurations/FeatureDefines.xcconfig:
2075         * css/CSSGrammar.y.in:
2076         * css/CSSParser.cpp:
2077         (WebCore::CSSParser::detectAtToken):
2078         * css/CSSParser.h:
2079         * css/SourceSizeList.cpp:
2080         (WebCore::parseSizesAttribute): Deleted.
2081         * html/HTMLImageElement.cpp:
2082         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2083         * html/HTMLImageElement.h:
2084         (WebCore::HTMLImageElement::currentSrc):
2085         * html/HTMLImageElement.idl:
2086         * html/parser/HTMLPreloadScanner.cpp:
2087         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2088         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2089         * html/parser/HTMLSrcsetParser.cpp:
2090         (WebCore::parseDescriptors):
2091         (WebCore::pickBestImageCandidate):
2092
2093 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
2094
2095         Remove convenience constructors for TextRun
2096         https://bugs.webkit.org/show_bug.cgi?id=144752
2097
2098         These convenience constructors are unnecessary. Moving the code that makes the StringView
2099         back to the call site will also help us make things more elegant in future refactoring.
2100
2101         Reviewed by Darin Adler.
2102
2103         No new tests because there is no behavior change.
2104
2105         * css/CSSPrimitiveValue.cpp:
2106         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
2107         * platform/graphics/StringTruncator.cpp:
2108         (WebCore::stringWidth):
2109         * platform/graphics/TextRun.h:
2110         (WebCore::TextRun::TextRun):
2111         * platform/mac/DragImageMac.mm:
2112         (WebCore::widthWithFont):
2113         (WebCore::drawAtPoint):
2114         * rendering/SimpleLineLayout.cpp:
2115         (WebCore::SimpleLineLayout::canUseFor):
2116         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2117         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
2118         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
2119         * rendering/TextPainter.cpp:
2120         (WebCore::TextPainter::paintText):
2121
2122 2015-05-08  Sam Weinig  <sam@webkit.org>
2123
2124         Element Traversal is not just Elements anymore
2125         https://bugs.webkit.org/show_bug.cgi?id=144822
2126
2127         Reviewed by Simon Fraser.
2128
2129         Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by
2130         exposing the element traversal methods on non-Elements.
2131
2132         - Makes firstElementChild, lastElementChild and childElementCount available on
2133           Document and DocumentFragment in addition to Element.
2134         - Makes nextElementSibling and previousElementSibling available on CharacterData
2135           in addition to Element.
2136
2137         Tests: fast/dom/element-traversal-on-character-data.html
2138                fast/dom/element-traversal-on-document-fragment.html
2139                fast/dom/element-traversal-on-document.html
2140
2141         * dom/CharacterData.idl:
2142         Expose nextElementSibling and previousElementSibling.
2143
2144         * dom/ContainerNode.cpp:
2145         (WebCore::ContainerNode::firstElementChild):
2146         (WebCore::ContainerNode::lastElementChild):
2147         (WebCore::ContainerNode::childElementCount):
2148         * dom/ContainerNode.h:
2149         Move implementations of firstElementChild, lastElementChild and childElementCount here
2150         from Element to make them shareable.
2151
2152         * dom/Document.idl:
2153         * dom/DocumentFragment.idl:
2154         Expose firstElementChild, lastElementChild and childElementCount.
2155
2156         * dom/Element.cpp:
2157         (WebCore::Element::firstElementChild): Deleted.
2158         (WebCore::Element::lastElementChild): Deleted.
2159         (WebCore::Element::previousElementSibling): Deleted.
2160         (WebCore::Element::nextElementSibling): Deleted.
2161         (WebCore::Element::childElementCount): Deleted.
2162         * dom/Element.h:
2163         Move element traversal functions down to Node and ContainerNode.
2164
2165         * dom/Element.idl:
2166         Update comments to indicate where these functions are defined now.
2167
2168         * dom/Node.cpp:
2169         (WebCore::Node::previousElementSibling):
2170         (WebCore::Node::nextElementSibling):
2171         * dom/Node.h:
2172         Move implementations of nextElementSibling and previousElementSibling here
2173         from Element to make them shareable.
2174
2175 2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
2176
2177         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2178         https://bugs.webkit.org/show_bug.cgi?id=144746
2179
2180         Reviewed by Carlos Garcia Campos.
2181
2182         Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
2183
2184         * platform/gtk/GtkUtilities.cpp:
2185         * platform/gtk/GtkUtilities.h:
2186         * platform/text/gtk/HyphenationLibHyphen.cpp:
2187         (WebCore::availableLocales):
2188
2189 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
2190
2191         Crashes in SocketStreamHandleBase::close
2192         https://bugs.webkit.org/show_bug.cgi?id=144767
2193         rdar://problem/20486538
2194
2195         Reviewed by Brady Eidson.
2196
2197         This is a speculative fix, I could not reproduce the crash.
2198
2199         * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame):
2200         Normally, processOutgoingFrameQueue() closes the handle in the end when called in
2201         OutgoingFrameQueueClosing state. But there is no definitive protection against
2202         processing two CLOSE frames, in which case we'd try to close the handle twice.
2203
2204         * platform/network/cf/SocketStreamHandleCFNet.cpp:
2205         (WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client
2206         results in the socket being closed, which makes no sense here.
2207
2208 2015-05-08  Commit Queue  <commit-queue@webkit.org>
2209
2210         Unreviewed, rolling out r183996.
2211         https://bugs.webkit.org/show_bug.cgi?id=144806
2212
2213         ASan detected use-after free (Requested by ap on #webkit).
2214
2215         Reverted changeset:
2216
2217         "Remove convenience constructors for TextRun"
2218         https://bugs.webkit.org/show_bug.cgi?id=144752
2219         http://trac.webkit.org/changeset/183996
2220
2221 2015-05-08  Eric Carlson  <eric.carlson@apple.com>
2222
2223         [Mac] Playback target clients do not unregister on page reload
2224         https://bugs.webkit.org/show_bug.cgi?id=144761
2225
2226         Reviewed by Brady Eidson.
2227
2228         * dom/Document.cpp:
2229         (WebCore::Document::prepareForDestruction): Unregister all target picker clients.
2230
2231         * html/HTMLMediaElement.cpp:
2232         (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
2233         (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
2234         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
2235         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.
2236
2237 2015-05-08  Chris Dumez  <cdumez@apple.com>
2238
2239         Throttle RequestAnimationFrame in subframes that are outside the viewport
2240         https://bugs.webkit.org/show_bug.cgi?id=144718
2241         <rdar://problem/20688782>
2242
2243         Reviewed by Simon Fraser.
2244
2245         Throttle RequestAnimationFrame in subframes that are outside the
2246         viewport or have "display: none" for performance and power.
2247
2248         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
2249                fast/animation/request-animation-frame-throttle-subframe.html
2250
2251         * dom/Document.h:
2252         (WebCore::Document::scriptedAnimationController):
2253         * dom/ScriptedAnimationController.cpp:
2254         (WebCore::ScriptedAnimationController::setThrottled):
2255         (WebCore::ScriptedAnimationController::isThrottled):
2256         * dom/ScriptedAnimationController.h:
2257         * loader/FrameLoader.cpp:
2258         (WebCore::FrameLoader::open):
2259         Call FrameView::setFrameRect() only *after* the view has been
2260         set on the Frame. Otherwise, setFrameRect() ends up calling
2261         viewportContentsChanged() and we hit the
2262         ASSERT(frame().view() == this) assertion in windowClipRect()
2263         because the Frame still has its old FrameView. This is covered
2264         by loader/go-back-to-different-window-size.html layout test.
2265
2266         * page/FrameView.cpp:
2267         (WebCore::FrameView::viewportContentsChanged):
2268         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
2269         (WebCore::FrameView::resumeVisibleImageAnimations):
2270         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
2271         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
2272         (WebCore::FrameView::updateThrottledDOMTimersState):
2273         (WebCore::FrameView::scrollPositionChanged): Deleted.
2274         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
2275         * page/FrameView.h:
2276         * testing/Internals.cpp:
2277         (WebCore::Internals::isRequestAnimationFrameThrottled):
2278         (WebCore::Internals::isTimerThrottled): Deleted.
2279         * testing/Internals.h:
2280         * testing/Internals.idl:
2281
2282 2015-05-08  Daniel Bates  <dabates@apple.com>
2283
2284         Fix the iOS Simulator external SDK build following <http://trac.webkit.org/changeset/181918>
2285
2286         Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard
2287         IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE)
2288         since it is only applicable on platforms that use IOSurface.
2289
2290         * platform/spi/cocoa/QuartzCoreSPI.h:
2291
2292 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
2293
2294         Remove convenience constructors for TextRun
2295         https://bugs.webkit.org/show_bug.cgi?id=144752
2296
2297         These convenience constructors are unnecessary. Moving the code that makes the StringView
2298         back to the call site will also help us make things more elegant in future refactoring.
2299
2300         Reviewed by Darin Adler.
2301
2302         No new tests because there is no behavior change.
2303
2304         * css/CSSPrimitiveValue.cpp:
2305         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
2306         * platform/graphics/StringTruncator.cpp:
2307         (WebCore::stringWidth):
2308         * platform/graphics/TextRun.h:
2309         (WebCore::TextRun::TextRun):
2310         * platform/mac/DragImageMac.mm:
2311         (WebCore::widthWithFont):
2312         (WebCore::drawAtPoint):
2313         * rendering/SimpleLineLayout.cpp:
2314         (WebCore::SimpleLineLayout::canUseFor):
2315         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2316         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
2317         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
2318         * rendering/TextPainter.cpp:
2319         (WebCore::TextPainter::paintText):
2320
2321 2015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2322
2323         [Streams API] ReadableStream constructor start function should be able to error the stream
2324         https://bugs.webkit.org/show_bug.cgi?id=141162
2325
2326         Reviewed by Darin Adler.
2327
2328         This patch implements the functionality of the ReadableStreamController error function.
2329         It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise.
2330         Adding support to reject promise with any JSValue.
2331
2332         Support for storing the error is added to both reader and stream.
2333
2334         Test: streams/readable-stream-controller-error.html and rebased tests
2335
2336         * Modules/streams/ReadableStream.cpp:
2337         (WebCore::ReadableStream::changeStateToErrored):
2338         * Modules/streams/ReadableStream.h:
2339         * Modules/streams/ReadableStreamReader.cpp:
2340         (WebCore::ReadableStreamReader::initialize):
2341         (WebCore::ReadableStreamReader::closed):
2342         (WebCore::ReadableStreamReader::changeStateToClosed):
2343         (WebCore::ReadableStreamReader::changeStateToErrored):
2344         * Modules/streams/ReadableStreamReader.h:
2345         * bindings/js/JSDOMPromise.h:
2346         (WebCore::DeferredWrapper::reject):
2347         * bindings/js/JSReadableStreamControllerCustom.cpp:
2348         (WebCore::JSReadableStreamController::error):
2349         * bindings/js/JSReadableStreamReaderCustom.cpp:
2350         (WebCore::JSReadableStreamReader::closed):
2351         * bindings/js/ReadableJSStream.cpp:
2352         (WebCore::ReadableJSStream::createReader):
2353         (WebCore::ReadableJSStream::storeError):
2354         (WebCore::ReadableJSStream::Reader::storeError):
2355         (WebCore::ReadableJSStream::jsController): Deleted.
2356         * bindings/js/ReadableJSStream.h:
2357
2358 2015-05-08  Commit Queue  <commit-queue@webkit.org>
2359
2360         Unreviewed, rolling out r183985.
2361         https://bugs.webkit.org/show_bug.cgi?id=144796
2362
2363         broke loader/go-back-to-different-window-size.html (Requested
2364         by kling on #webkit).
2365
2366         Reverted changeset:
2367
2368         "Throttle RequestAnimationFrame in subframes that are outside
2369         the viewport"
2370         https://bugs.webkit.org/show_bug.cgi?id=144718
2371         http://trac.webkit.org/changeset/183985
2372
2373 2015-05-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2374
2375         SharedBuffer::m_size should be initialized to 0 when defining it
2376         https://bugs.webkit.org/show_bug.cgi?id=144740
2377
2378         Reviewed by Darin Adler.
2379
2380         Setting m_size to 0 when declaring it and updating constructor definitions.
2381
2382         No change in behaviour.
2383
2384         * platform/SharedBuffer.cpp:
2385         (WebCore::SharedBuffer::SharedBuffer):
2386         * platform/SharedBuffer.h:
2387         * platform/cf/SharedBufferCF.cpp:
2388         (WebCore::SharedBuffer::SharedBuffer):
2389         * platform/soup/SharedBufferSoup.cpp:
2390         (WebCore::SharedBuffer::SharedBuffer):
2391
2392 2015-05-08  Commit Queue  <commit-queue@webkit.org>
2393
2394         Unreviewed, rolling out r183945.
2395         https://bugs.webkit.org/show_bug.cgi?id=144789
2396
2397         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
2398
2399         Reverted changeset:
2400
2401         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
2402         https://bugs.webkit.org/show_bug.cgi?id=144746
2403         http://trac.webkit.org/changeset/183945
2404
2405 2015-05-07  Chris Dumez  <cdumez@apple.com>
2406
2407         Throttle RequestAnimationFrame in subframes that are outside the viewport
2408         https://bugs.webkit.org/show_bug.cgi?id=144718
2409         <rdar://problem/20688782>
2410
2411         Reviewed by Simon Fraser.
2412
2413         Throttle RequestAnimationFrame in subframes that are outside the
2414         viewport or have "display: none" for performance and power.
2415
2416         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
2417                fast/animation/request-animation-frame-throttle-subframe.html
2418
2419         * dom/Document.h:
2420         (WebCore::Document::scriptedAnimationController):
2421         * dom/ScriptedAnimationController.cpp:
2422         (WebCore::ScriptedAnimationController::setThrottled):
2423         (WebCore::ScriptedAnimationController::isThrottled):
2424         * dom/ScriptedAnimationController.h:
2425         * page/FrameView.cpp:
2426         (WebCore::FrameView::viewportContentsChanged):
2427         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
2428         (WebCore::FrameView::resumeVisibleImageAnimations):
2429         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
2430         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
2431         (WebCore::FrameView::updateThrottledDOMTimersState):
2432         (WebCore::FrameView::scrollPositionChanged): Deleted.
2433         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
2434         * page/FrameView.h:
2435         * testing/Internals.cpp:
2436         (WebCore::Internals::isRequestAnimationFrameThrottled):
2437         (WebCore::Internals::isTimerThrottled): Deleted.
2438         * testing/Internals.h:
2439         * testing/Internals.idl:
2440
2441 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2442
2443         Calculate source-size length as a float
2444         https://bugs.webkit.org/show_bug.cgi?id=144766
2445
2446         Reviewed by Dean Jackson.
2447
2448         Make sure that the source-size length is calculated as a float,
2449         to align with the spec.
2450
2451         Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
2452               fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
2453
2454         * css/SourceSizeList.cpp:
2455         (WebCore::parseSizesAttribute):
2456         (WebCore::defaultLength):
2457         (WebCore::computeLength):
2458         * css/SourceSizeList.h:
2459         * html/HTMLImageElement.cpp:
2460         (WebCore::HTMLImageElement::parseAttribute):
2461         * html/parser/HTMLPreloadScanner.cpp:
2462         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2463         * html/parser/HTMLSrcsetParser.cpp:
2464         (WebCore::pickBestImageCandidate):
2465         (WebCore::bestFitSourceForImageAttributes):
2466         * html/parser/HTMLSrcsetParser.h:
2467
2468 2015-05-07  Commit Queue  <commit-queue@webkit.org>
2469
2470         Unreviewed, rolling out r183895.
2471         https://bugs.webkit.org/show_bug.cgi?id=144786
2472
2473         Many tests became flaky (Requested by ap on #webkit).
2474
2475         Reverted changeset:
2476
2477         "Expose more font weights for -apple-system"
2478         https://bugs.webkit.org/show_bug.cgi?id=144707
2479         http://trac.webkit.org/changeset/183895
2480
2481 2015-05-07  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2482
2483         Add first-letter assert exception in RenderButton::setupInnerStyle().
2484         https://bugs.webkit.org/show_bug.cgi?id=140517OB
2485
2486         Reviewed by Darin Adler.
2487
2488         StyleResolver references inner block's render style temporary in
2489         RenderBlock::styleDidChange() when we have first-letter css pseudo
2490         element.
2491
2492         * rendering/RenderButton.cpp:
2493         (WebCore::RenderButton::setupInnerStyle):
2494
2495 2015-05-07  Chris Dumez  <cdumez@apple.com>
2496
2497         Unreviewed, fix build after r183970.
2498
2499         WEBCORE_EXPORT should not be used on inlined functions.
2500
2501         * platform/graphics/ca/GraphicsLayerCA.h:
2502
2503 2015-05-07  Anders Carlsson  <andersca@apple.com>
2504
2505         Build fixes.
2506
2507         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2508         (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
2509         * editing/cocoa/HTMLConverter.mm:
2510         (HTMLConverter::_addMarkersToList):
2511         * platform/mac/PasteboardMac.mm:
2512         (WebCore::writeFileWrapperAsRTFDAttachment):
2513         * platform/mac/PlatformPasteboardMac.mm:
2514         (WebCore::PlatformPasteboard::setTypes):
2515         Pass empty arrays and dictionaries instead of nil.
2516
2517         * rendering/RenderThemeMac.mm:
2518         (WebCore::RenderThemeMac::paintSliderThumb):
2519         Pass the document view to the AppKit paint method.
2520
2521 2015-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2522
2523         Purge PassRefPtr in WebCore/html - 3
2524         https://bugs.webkit.org/show_bug.cgi?id=144686
2525
2526         Reviewed by Andreas Kling.
2527
2528         Replace PassRefPtr with Ref in create() factory functions, because
2529         it doesn't have to change to be null.
2530
2531         No new tests, no behavior changes.
2532
2533         * html/FTPDirectoryDocument.h:
2534         * html/HTMLDetailsElement.cpp:
2535         (WebCore::DetailsContentElement::create):
2536         * html/HTMLKeygenElement.cpp:
2537         * html/HTMLSummaryElement.cpp:
2538         (WebCore::SummaryContentElement::create):
2539         * html/TimeRanges.cpp:
2540         (WebCore::TimeRanges::create):
2541         * html/shadow/SliderThumbElement.cpp:
2542         (WebCore::SliderContainerElement::create):
2543         * html/shadow/SliderThumbElement.h:
2544         (WebCore::SliderThumbElement::create):
2545         * html/shadow/SpinButtonElement.cpp:
2546         (WebCore::SpinButtonElement::create):
2547         * html/shadow/SpinButtonElement.h:
2548         * html/shadow/TextControlInnerElements.cpp:
2549         (WebCore::TextControlInnerContainer::create):
2550         (WebCore::TextControlInnerElement::create):
2551         (WebCore::TextControlInnerTextElement::create):
2552         (WebCore::SearchFieldResultsButtonElement::create):
2553         (WebCore::SearchFieldCancelButtonElement::create):
2554         * html/shadow/TextControlInnerElements.h:
2555         * html/shadow/YouTubeEmbedShadowElement.cpp:
2556         (WebCore::YouTubeEmbedShadowElement::create):
2557         * html/track/InbandDataTextTrack.cpp:
2558         (WebCore::InbandDataTextTrack::create):
2559         * html/track/InbandDataTextTrack.h:
2560         * html/track/InbandGenericTextTrack.cpp:
2561         (WebCore::InbandGenericTextTrack::create):
2562         * html/track/InbandGenericTextTrack.h:
2563         * html/track/InbandWebVTTTextTrack.cpp:
2564         (WebCore::InbandWebVTTTextTrack::create):
2565         * html/track/InbandWebVTTTextTrack.h:
2566         * html/track/LoadableTextTrack.h:
2567         * html/track/TextTrack.h:
2568         (WebCore::TextTrack::create):
2569         * html/track/TextTrackCueGeneric.cpp:
2570         * html/track/TextTrackCueGeneric.h:
2571         * html/track/TextTrackList.h:
2572         * html/track/VTTRegionList.h:
2573         (WebCore::VTTRegionList::create):
2574
2575 2015-05-07  Dean Jackson  <dino@apple.com>
2576
2577         [iOS] MediaControls: disappear while scrubbing
2578         https://bugs.webkit.org/show_bug.cgi?id=144777
2579         <rdar://problem/20065572>
2580
2581         Reviewed by Eric Carlson.
2582
2583         If we are scrubbing we shouldn't hide the controls.
2584
2585         * Modules/mediacontrols/mediaControlsApple.js:
2586         (Controller.prototype.hideControls): Return early if we are scrubbing.
2587         * Modules/mediacontrols/mediaControlsiOS.js:
2588         (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
2589         rename from non-underscored value throughout the file.
2590         (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
2591         the timer to hide the controls.
2592
2593 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
2594
2595         REGRESSION (r183300): Fixed elements flash when scrolling
2596         https://bugs.webkit.org/show_bug.cgi?id=144778
2597         rdar://problem/20769741
2598
2599         Reviewed by Dean Jackson.
2600
2601         After r183300 we can detached layer backing store when outside the coverage region.
2602         However, position:fixed layers are moved around by the ScrollingCoordinator behind
2603         GraphicsLayer's back, so we can do layer flushes with stale information about layer
2604         geometry.
2605         
2606         To avoid dropping backing store for layers in this situation, prevent backing
2607         store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
2608         layers. Preventing detachment on a layer also prevents detachment on all descendant
2609         layers.
2610
2611         * platform/graphics/GraphicsLayer.h:
2612         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
2613         (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
2614         * platform/graphics/ca/GraphicsLayerCA.cpp:
2615         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2616         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
2617         if backing store detachment is prevented.
2618         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to 
2619         communicate to descendants that detachment is prevented.
2620         * platform/graphics/ca/GraphicsLayerCA.h:
2621         (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
2622         * rendering/RenderLayerBacking.cpp:
2623         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
2624         * rendering/RenderLayerBacking.h:
2625         (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
2626         nodeID for the ViewportConstrained role, turn off backing store detachment.
2627
2628 2015-05-07  Sam Weinig  <sam@webkit.org>
2629
2630         Consider implementing Document.scrollingElement
2631         <rdar://problem/20845213>
2632         https://bugs.webkit.org/show_bug.cgi?id=143609
2633
2634         Reviewed by Simon Fraser.
2635
2636         Add the non-compliant implementation of Document.scrollingElement that the spec,
2637         found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement, 
2638         says we should have while we have non-compliant implementations of Element.scrollTop
2639         and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
2640
2641         Tests: fast/dom/Document/scrollingElement-quirks-mode.html
2642                fast/dom/Document/scrollingElement-standards-mode.html
2643
2644         * dom/Document.cpp:
2645         (WebCore::Document::scrollingElement):
2646         * dom/Document.h:
2647         * dom/Document.idl:
2648
2649 2015-05-07  Dean Jackson  <dino@apple.com>
2650
2651         [iOS] While scrubbing and holding down, video continues to play
2652         https://bugs.webkit.org/show_bug.cgi?id=144776
2653         <rdar://problem/20863757>
2654
2655         Reviewed by Simon Fraser.
2656
2657         When we are scrubbing a video, we should pause playback. As we
2658         let go of the scrubber playback can resume (but only if it was
2659         playing originally).
2660
2661         * Modules/mediacontrols/mediaControlsiOS.js:
2662         (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
2663         (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
2664         (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
2665         (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
2666         potentially about to scrub.
2667         (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
2668
2669 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
2670
2671         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
2672         https://bugs.webkit.org/show_bug.cgi?id=144335
2673
2674         Reviewed by Daniel Bates.
2675
2676         Address comments raised by Darin Adler in review.
2677
2678         * platform/graphics/ImageBuffer.cpp:
2679         (WebCore::ImageBuffer::sizeNeedsClamping):
2680         (WebCore::ImageBuffer::clampedSize):
2681         (WebCore::ImageBuffer::isSizeClamped): Deleted.
2682         * platform/graphics/ImageBuffer.h:
2683         The condition for the negative width/height in isSizeClamped() was wrong. Use
2684         FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping().
2685         The new function should return the opposite of the old function return value.
2686         
2687         * platform/graphics/filters/FilterEffect.cpp:
2688         (WebCore::FilterEffect::apply):
2689         (WebCore::FilterEffect::asUnmultipliedImage):
2690         (WebCore::FilterEffect::asPremultipliedImage):
2691         (WebCore::FilterEffect::copyUnmultipliedImage):
2692         (WebCore::FilterEffect::copyPremultipliedImage):
2693         (WebCore::FilterEffect::createUnmultipliedImageResult):
2694         (WebCore::FilterEffect::createPremultipliedImageResult):
2695         * rendering/FilterEffectRenderer.cpp:
2696         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
2697         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
2698         * rendering/svg/RenderSVGResourceFilter.cpp:
2699         (WebCore::RenderSVGResourceFilter::applyResource):
2700         Call the new function and negate the condition for the return value.
2701
2702 2015-05-07  Anders Carlsson  <andersca@apple.com>
2703
2704         Build fix.
2705
2706         * editing/mac/EditorMac.mm:
2707         (WebCore::dataInRTFDFormat):
2708         (WebCore::dataInRTFFormat):
2709
2710 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
2711
2712         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
2713         https://bugs.webkit.org/show_bug.cgi?id=144335
2714
2715         Reviewed by Darin Adler.
2716
2717         When the SVG element is larger than 4096x4096 pixels and it has a filter,
2718         a clipper or a masker, the ImageBuffer which is created for drawing the
2719         sourceGraphicBuffer has to be clamped to this size. The reason for this
2720         clamping is the FilterEffect simply ignores processing any ImageBuffer
2721         larger than this size.
2722         
2723         The bug was happening because we did not propagate the clamping logic to
2724         the FilterEffect. The FilterEffect result ImageBuffer was not clamped as
2725         what we do for drawing the sourceGraphicBuffer. If only the destination
2726         point is specified, the GraphicsContext::drawImageBuffer() assumes the
2727         source and the destination images have the same size which is not true
2728         with the clamping.
2729         
2730         The fix is to add the clamping logic to the FilterEffect. Two places we
2731         need to change. (1) FilterEffect::createImageBufferResult() has to apply
2732         the same clamping we do in SVGRenderingContext::createImageBuffer(). (2)
2733         FilterEffect::drawingRegionOfInputImage() has to consider the clamping 
2734         when mapping from absolute coordinates to the ImageBuffer coordinates.
2735         
2736         Tests: svg/filters/big-sized-off-viewport-filter.svg
2737
2738         * platform/graphics/ImageBuffer.cpp:
2739         (WebCore::ImageBuffer::isSizeClamped):
2740         (WebCore::ImageBuffer::clampedSize):
2741         (WebCore::ImageBuffer::clampedRect):
2742         * platform/graphics/ImageBuffer.h:
2743         (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods
2744         from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer.
2745
2746         * platform/graphics/filters/FEColorMatrix.cpp:
2747         (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the
2748         result image instead of using absolutePaintRect(). The later returns the
2749         rectangle of the element without clamping.
2750         
2751         * platform/graphics/filters/FETile.cpp:
2752         (WebCore::FETile::platformApplySoftware):
2753         * rendering/svg/RenderSVGResourceClipper.cpp:
2754         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2755         * rendering/svg/RenderSVGResourceFilter.cpp:
2756         (WebCore::RenderSVGResourceFilter::applyResource):
2757         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted.
2758         * rendering/svg/RenderSVGResourceFilter.h:
2759         * rendering/svg/RenderSVGResourceGradient.cpp:
2760         (WebCore::createMaskAndSwapContextForTextGradient):
2761         (WebCore::clipToTextMask):
2762         * rendering/svg/RenderSVGResourceMasker.cpp:
2763         (WebCore::RenderSVGResourceMasker::applySVGMask):
2764         * rendering/svg/RenderSVGResourcePattern.cpp:
2765         (WebCore::RenderSVGResourcePattern::buildPattern):
2766         (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications
2767         which are needed because of moving the clamping helper methods to ImageBuffer
2768         and because of changing the prototype of SVGRenderingContext methods.
2769
2770         * platform/graphics/filters/FilterEffect.cpp:
2771         (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping
2772         when mapping from absolute coordinates to the ImageBuffer coordinates.
2773
2774         (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping
2775         we do in SVGRenderingContext::createImageBuffer() when creating the 
2776         FilterEffect result ImageBuffer.
2777         
2778         (WebCore::FilterEffect::apply):
2779         (WebCore::FilterEffect::asUnmultipliedImage):
2780         (WebCore::FilterEffect::asPremultipliedImage):
2781         (WebCore::FilterEffect::copyUnmultipliedImage):
2782         (WebCore::FilterEffect::copyPremultipliedImage):
2783         (WebCore::FilterEffect::createUnmultipliedImageResult):
2784         (WebCore::FilterEffect::createPremultipliedImageResult):
2785         (WebCore::FilterEffect::maxFilterArea): Deleted.
2786         (WebCore::FilterEffect::isFilterSizeValid): Deleted.
2787         * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping
2788         helper methods and delete the local ones.
2789
2790         * platform/graphics/transforms/AffineTransform.cpp:
2791         (WebCore::AffineTransform::scaleNonUniform):
2792         (WebCore::AffineTransform::scale):
2793         (WebCore::AffineTransform::translate):
2794         * platform/graphics/transforms/AffineTransform.h: Add new scale and translate
2795         overloads to AffineTransform.
2796         
2797         * rendering/FilterEffectRenderer.cpp:
2798         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
2799         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up.
2800         
2801         * rendering/svg/SVGRenderingContext.cpp:
2802         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
2803         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
2804         Return the AffineTransform instead of passing it through the reference of
2805         an argument.
2806         
2807         (WebCore::SVGRenderingContext::createImageBuffer):
2808         (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted.
2809         Code clean up and method rename.
2810         
2811         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted.
2812         (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted.
2813         * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to
2814         the ImageBuffer class.
2815     
2816 2015-05-07  Beth Dakin  <bdakin@apple.com>
2817
2818         New force-related DOM events should fire in WK1 views
2819         https://bugs.webkit.org/show_bug.cgi?id=144663
2820         -and corresponding-
2821         rdar://problem/20281886
2822
2823         Reviewed by Sam Weinig.
2824
2825         All of the WK1 mouse events need to take the correspondingPressureEvent.
2826         * page/EventHandler.h:
2827
2828         Make correspondingPressureEvent a part of CurrentEventScope. This is needed to 
2829         have accurate pressure information for all of the mouse events in subframes.
2830         * page/mac/EventHandlerMac.mm:
2831         (WebCore::correspondingPressureEventSlot):
2832         (WebCore::EventHandler::correspondingPressureEvent):
2833         (WebCore::CurrentEventScope::CurrentEventScope):
2834         (WebCore::CurrentEventScope::~CurrentEventScope):
2835
2836         These events don’t have an associated pressure, so send nil for the 
2837         correspondingPressureEvent.
2838         (WebCore::EventHandler::wheelEvent):
2839         (WebCore::EventHandler::keyEvent):
2840
2841         Pipe through correspondingPressureEvent.
2842         (WebCore::EventHandler::mouseDown):
2843         (WebCore::EventHandler::mouseDragged):
2844         (WebCore::EventHandler::mouseUp):
2845         (WebCore::EventHandler::mouseMoved):
2846
2847         New function to handle pressure change events.
2848         (WebCore::EventHandler::pressureChange):
2849
2850         Pipe through correspondingPressureEvent.
2851         (WebCore::EventHandler::passMouseMovedEventToScrollbars):
2852         (WebCore::EventHandler::currentPlatformMouseEvent):
2853
2854         Take the correspondingPressureEvent in order to build a PlatformMouseEvent with 
2855         the correct pressure information.
2856         * platform/mac/PlatformEventFactoryMac.h:
2857         * platform/mac/PlatformEventFactoryMac.mm:
2858         (WebCore::globalPointForEvent):
2859         (WebCore::pointForEvent):
2860         (WebCore::mouseButtonForEvent):
2861         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2862         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
2863
2864 2015-05-06  Roger Fong  <roger_fong@apple.com>
2865
2866         Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
2867         https://bugs.webkit.org/show_bug.cgi?id=144700.
2868         <rdar://problem/19997548>
2869
2870         Reviewed by Jer Noble.
2871
2872         Update time and timeline during the timeline input event instead of the wrapper's mousemove.
2873         (Controller.prototype.handleWrapperMouseMove):
2874         (Controller.prototype.handleTimelineMouseMove):
2875         (Controller.prototype.drawTimelineBackground): 
2876
2877         (Controller.prototype.updateControlsWhileScrubbing): 
2878         Updates time and scrubber to reflect timeline user input.
2879
2880 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2881
2882         Handle meta viewport in HTMLPreloadScanner
2883         https://bugs.webkit.org/show_bug.cgi?id=144640
2884
2885         Reviewed by Dean Jackson.
2886
2887         Add support for the <meta> tag to the HTMLPreloadScanner
2888         and when the meta tag's name is viewport, get the document
2889         to process the tag's attribute value, and set its ViewportArgument.
2890
2891         Tests: fast/dom/HTMLMetaElement/meta-preloader.html
2892
2893         * html/parser/HTMLPreloadScanner.cpp:
2894         (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
2895         (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
2896         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
2897         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2898         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
2899         (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
2900         * html/parser/HTMLPreloadScanner.h:
2901         * testing/Internals.cpp:
2902         (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
2903         * testing/Internals.h:
2904         * testing/Internals.idl:
2905
2906 2015-05-07  Zalan Bujtas  <zalan@apple.com>
2907
2908         REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.
2909         https://bugs.webkit.org/show_bug.cgi?id=144723
2910         rdar://problem/18307094
2911
2912         Reviewed by Simon Fraser.
2913
2914         This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary.
2915
2916         While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account.
2917         However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly,
2918         we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position.
2919
2920         Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html
2921
2922         * rendering/RenderLayerBacking.cpp:
2923         (WebCore::RenderLayerBacking::updateGeometry):
2924
2925 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
2926
2927         Fix sizes crash and add invalid value tests.
2928         https://bugs.webkit.org/show_bug.cgi?id=144739
2929
2930         Reviewed by Darin Adler.
2931
2932         Make sure that only CSS length are allowed when the sizes parser is calling computeLength.
2933         Also make sure that for invalid lengths, the 100vw default is used instead.
2934
2935         Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
2936
2937         * css/SourceSizeList.cpp:
2938         (WebCore::computeLength):
2939         (WebCore::defaultLength):
2940         (WebCore::parseSizesAttribute):
2941
2942 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
2943
2944         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
2945         https://bugs.webkit.org/show_bug.cgi?id=144746
2946
2947         Reviewed by Martin Robinson.
2948
2949         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
2950
2951         * platform/gtk/GtkUtilities.cpp:
2952         * platform/gtk/GtkUtilities.h:
2953         * platform/text/gtk/HyphenationLibHyphen.cpp:
2954         (WebCore::availableLocales):
2955
2956 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
2957
2958         Remove the WK1-only code path for independently composited iframes
2959         https://bugs.webkit.org/show_bug.cgi?id=144722
2960
2961         Reviewed by Dean Jackson.
2962
2963         In WebKit1 on Mac, we allowed iframes to be composited independently of their
2964         parent document, relying on the fact that the frame's platform view can host
2965         a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
2966         and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
2967         because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
2968         
2969         Removing the WK1-only code path solves these problems. It also eliminates the need
2970         to do compositing-specific frame overlap testing.
2971
2972         * page/FrameView.cpp:
2973         (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
2974         Any iframe that gets composited will participate in the normal compositing overlap
2975         testing in its parent frame.
2976         (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
2977         (WebCore::FrameView::hasCompositingAncestor): Deleted.
2978         * page/FrameView.h:
2979         * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
2980         with an isMainFrameCompositor() for readability. Some 0->nullptr.
2981         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2982         (WebCore::RenderLayerCompositor::chromeClient):
2983         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
2984         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2985         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
2986         (WebCore::RenderLayerCompositor::updateBacking):
2987         (WebCore::RenderLayerCompositor::layerTreeAsText):
2988         (WebCore::RenderLayerCompositor::frameContentsCompositor):
2989         (WebCore::RenderLayerCompositor::setIsInWindow):
2990         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
2991         (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
2992         already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
2993         nothing and is removed.
2994         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
2995         (WebCore::RenderLayerCompositor::requiresScrollLayer):
2996         (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
2997         (WebCore::RenderLayerCompositor::isMainFrameCompositor):
2998         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
2999         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
3000         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
3001         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3002         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3003         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3004         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3005         (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
3006         all other frames attach via parent frame.
3007         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
3008         scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
3009         layout, but is no longer needed so remove it.
3010         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
3011         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
3012         (WebCore::RenderLayerCompositor::scrollingCoordinator):
3013         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
3014         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
3015         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
3016         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
3017         it really asks whether the document uses tiled backing, but does not check for main frame.
3018         * rendering/RenderLayerCompositor.h:
3019         * rendering/RenderWidget.cpp:
3020         (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
3021         compositing now.
3022
3023 2015-05-06  Dean Jackson  <dino@apple.com>
3024
3025         Handle backdrop views that have to tile
3026         https://bugs.webkit.org/show_bug.cgi?id=142317
3027         <rdar://problem/20049088>
3028
3029         Reviewed by Simon Fraser.
3030
3031         Take 2 - this was rolled out because Mavericks was crashing.
3032
3033         Make sure backdrop layers don't tile. If they are big
3034         enough, we'll leave it to the platform compositor to handle.
3035
3036         This also fixes a bug where if a layer changed from a backdrop
3037         type to a tiled type, it would still retain its custom appearance
3038         and we'd try to add children to the wrong layer.
3039
3040         Test: compositing/media-controls-bar-appearance-big.html
3041
3042         * platform/graphics/ca/GraphicsLayerCA.cpp:
3043         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
3044         a layer needs a backdrop before checking if it needs to tile.
3045
3046 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
3047
3048         Revert "Introducing the Platform Abstraction Layer (PAL)"
3049         https://bugs.webkit.org/show_bug.cgi?id=144751
3050
3051         Unreviewed.
3052
3053         PAL should be a new target inside WebCore, rather than a top-level folder.
3054
3055         * WebCore.xcodeproj/project.pbxproj:
3056         * Configurations/FeatureDefines.xcconfig:
3057
3058 2015-05-07  Dan Bernstein  <mitz@apple.com>
3059
3060         Tried to fix the build.
3061
3062         * Configurations/WebCoreTestSupport.xcconfig:
3063
3064 2015-05-07  Joanmarie Diggs  <jdiggs@igalia.com>
3065
3066         AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
3067         https://bugs.webkit.org/show_bug.cgi?id=144702
3068
3069         Reviewed by Chris Fleizach.
3070
3071         Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
3072         Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
3073         for the Mac. Add PreRole to the list of "text type" ATK roles.
3074
3075         No new tests. Existing tests were updated to reflect the corrected mapping.
3076
3077         * accessibility/AccessibilityObject.h:
3078         * accessibility/AccessibilityRenderObject.cpp:
3079         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3080         * accessibility/atk/AccessibilityObjectAtk.cpp:
3081         (WebCore::AccessibilityObject::allowsTextRanges):
3082         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3083         (atkRole):
3084         (roleIsTextType):
3085         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3086         (createAccessibilityRoleMap):
3087
3088 2015-05-07  Dan Bernstein  <mitz@apple.com>
3089
3090         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
3091         https://bugs.webkit.org/show_bug.cgi?id=144727
3092
3093         Reviewed by Darin Adler.
3094
3095         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig.
3096         * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of
3097         INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator.
3098         * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of
3099         INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x
3100         Simulator.
3101
3102 2015-05-07  Eric Carlson  <eric.carlson@apple.com>
3103
3104         [Mac] Playback target isn't set on new element
3105         https://bugs.webkit.org/show_bug.cgi?id=144724
3106
3107         Reviewed by Jer Noble.
3108
3109         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3110         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3111         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
3112         if necessary.
3113         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
3114         the setting in case we don't have an AVPlayer yet.
3115
3116 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
3117
3118         Fix <script srcset> being loaded by the preloader.
3119         https://bugs.webkit.org/show_bug.cgi?id=144675
3120
3121         Reviewed by Darin Adler.
3122
3123         Fix HTMLPreloadScanner to make sure that srcset is only loaded
3124         when it is present on an <img>.
3125
3126         Tests: http/tests/loading/preload-script-src.html
3127                http/tests/loading/preload-script-srcset-ignored.html
3128
3129         * html/parser/HTMLPreloadScanner.cpp:
3130         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3131
3132 2015-05-07  Žan Doberšek  <zdobersek@igalia.com>
3133
3134         Add missing type traits specialization for PlatformDisplayWayland
3135         https://bugs.webkit.org/show_bug.cgi?id=144671
3136
3137         Reviewed by Carlos Garcia Campos.
3138
3139         * platform/graphics/wayland/PlatformDisplayWayland.h:
3140         Add missing type traits specialization for the PlatformDisplayWayland
3141         class via the SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY macro.
3142
3143 2015-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
3144
3145         [CSS Grid Layout] Mark grid shorthands as layout dependent
3146         https://bugs.webkit.org/show_bug.cgi?id=144687
3147
3148         Reviewed by Darin Adler.
3149
3150         grid-template and grid shorthands were not marked us layout dependent,
3151         so you can end up calling them before the grid has been laid out and
3152         you'll get a crash at valueForGridTrackList() because of trackPositions
3153         won't be initialized yet.
3154
3155         Tests: fast/css-grid-layout/grid-shorthand-computed-style-crash.html
3156                fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html
3157
3158         * css/CSSComputedStyleDeclaration.cpp:
3159         (WebCore::isLayoutDependent): Add the grid shorthands only if the object
3160         is a RenderGrid as otherwise it's not needed (using the same condition
3161         for grid-template-columns and grid-template-rows properties too).
3162
3163 2015-05-06  Daniel Bates  <dabates@apple.com>
3164
3165         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
3166         https://bugs.webkit.org/show_bug.cgi?id=144657
3167         <rdar://problem/18894598>
3168
3169         Reviewed by Andy Estes.
3170
3171         Export WebCore functionality to pause and resume the database thread so that we can
3172         make use of this functionality from WebKit2.
3173
3174         * Modules/webdatabase/AbstractDatabaseServer.h:
3175         * Modules/webdatabase/DatabaseManager.cpp:
3176         (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
3177         * Modules/webdatabase/DatabaseManager.h:
3178         * Modules/webdatabase/DatabaseServer.cpp:
3179         (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
3180         DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
3181         For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
3182         we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
3183         * Modules/webdatabase/DatabaseServer.h:
3184
3185 2015-05-06  Brent Fulgham  <bfulgham@apple.com>
3186
3187         Scroll-snap points do not handle margins and padding propertly
3188         https://bugs.webkit.org/show_bug.cgi?id=144647
3189         <rdar://problem/20829473>
3190
3191         Reviewed by Simon Fraser.
3192
3193         The calculation of scroll snap points was incorrect because it did not account for margins or padding.
3194         This was fixed by using the "paddingBoxRect" to represent the overall size of the view area, and
3195         subtracting the relevant padding when computing the size of the scroll snap offsets.
3196
3197         Extend testing internals with accessor methods to retrieve string representations of the scroll snap
3198         offsets and scroll snap coordinates computed during layout. These values are used in the new
3199         'css3/scroll-snap/scroll-snap-offsets-and-coordinates.html' test.
3200
3201         New tests:
3202         * css3/scroll-snap/scroll-snap-offsets-and-coordinates.html: Added.
3203         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: Added.
3204         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: Added.
3205         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: Added.
3206
3207         * css/LengthFunctions.h: Expose the 'valueForLength' method so we can use it in WebCoreTestSupport.
3208         * dom/Node.h: Expose the 'renderBox' method so we can use it in WebCoreTestSupport.
3209         * page/scrolling/AxisScrollSnapOffsets.cpp:
3210         (WebCore::appendChildSnapOffsets): Use 'contentBoxRect' for overall size, so that we don't use padding
3211         as part of our offset calculations.
3212         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
3213         * rendering/RenderBox.h: Expose 'canBeScrolledAndHasScrollableArea' for use in WebCoreTestSupport.
3214         * rendering/style/RenderStyle.h: Expose 'scrollSnapCoordinates' for use in WebCoreTestSupport.
3215         * testing/Internals.cpp:
3216         (WebCore::appendOffsets): Helper function.
3217         (WebCore::Internals::scrollSnapOffsets): Added.
3218         * testing/Internals.h:
3219         * testing/Internals.idl:
3220
3221 2015-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
3222
3223         Clean up TextRun constructors
3224         https://bugs.webkit.org/show_bug.cgi?id=144712
3225
3226         Reviewed by Zalan Bujtas.
3227
3228         This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
3229         updates the implementations of RenderBlock::constructTextRun() to be more consistent with
3230         TextRun (via using StringViews).
3231
3232         No new tests because there is no behavior change.
3233
3234         * mathml/MathMLMencloseElement.cpp:
3235         (WebCore::MathMLMencloseElement::longDivLeftPadding):
3236         * platform/graphics/TextRun.h:
3237         (WebCore::TextRun::TextRun):
3238         * rendering/RenderBlock.cpp:
3239         (WebCore::RenderBlock::constructTextRun):
3240         (WebCore::constructTextRunInternal): Deleted.
3241         * rendering/RenderBlock.h:
3242         * rendering/RenderEmbeddedObject.cpp:
3243         (WebCore::RenderEmbeddedObject::paintReplaced):
3244         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
3245         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
3246         * rendering/svg/SVGTextMetricsBuilder.cpp:
3247         (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
3248         * platform/win/DragImageWin.cpp:
3249         (WebCore::createDragImageForLink):
3250
3251 2015-05-06  Sungmann Cho  <sungmann.cho@navercorp.com>
3252
3253         Rename URL::copy() to URL::isolatedCopy() to match String.
3254         https://bugs.webkit.org/show_bug.cgi?id=144684
3255
3256         Reviewed by Darin Adler.
3257
3258         No new tests, no behavior change.
3259
3260         * Modules/websockets/WebSocketHandshake.cpp:
3261         (WebCore::WebSocketHandshake::setURL):
3262         (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
3263         * fileapi/ThreadableBlobRegistry.cpp:
3264         (WebCore::BlobRegistryContext::BlobRegistryContext):
3265         * html/parser/HTMLPreloadScanner.cpp:
3266         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
3267         * html/parser/HTMLResourcePreloader.h:
3268         (WebCore::PreloadRequest::PreloadRequest):
3269         * html/parser/XSSAuditor.cpp:
3270         (WebCore::XSSAuditor::init):
3271         * platform/CrossThreadCopier.cpp:
3272         (WebCore::URL>::copy):
3273         * platform/URL.cpp:
3274         (WebCore::URL::isolatedCopy):
3275         (WebCore::URL::copy): Deleted.
3276         * platform/URL.h:
3277         (WebCore::URLCapture::URLCapture):
3278         * platform/network/BlobPart.h:
3279         (WebCore::BlobPart::detachFromCurrentThread):
3280         * platform/network/ResourceRequestBase.cpp:
3281         (WebCore::ResourceRequestBase::copyData):
3282         * platform/network/ResourceResponseBase.cpp:
3283         (WebCore::ResourceResponseBase::copyData):
3284         * workers/WorkerThread.cpp:
3285         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
3286
3287 2015-05-06  Commit Queue  <commit-queue@webkit.org>
3288
3289         Unreviewed, rolling out r183894.
3290         https://bugs.webkit.org/show_bug.cgi?id=144719
3291
3292         crashes on mavericks (Requested by dino on #webkit).
3293
3294         Reverted changeset:
3295
3296         "Handle backdrop views that have to tile"
3297         https://bugs.webkit.org/show_bug.cgi?id=142317
3298         http://trac.webkit.org/changeset/183894
3299
3300 2015-05-06  Jon Lee  <jonlee@apple.com>
3301
3302         CoreTextSPI.h uses wrong version number to denote Yosemite
3303         https://bugs.webkit.org/show_bug.cgi?id=144701
3304
3305         Reviewed by Dean Jackson.
3306
3307         * platform/spi/cocoa/CoreTextSPI.h: Should 101000 not 10100.
3308
3309 2015-05-06  Jon Lee  <jonlee@apple.com>
3310
3311         Expose more font weights for -apple-system
3312         https://bugs.webkit.org/show_bug.cgi?id=144707
3313
3314         Reviewed by Dean Jackson.
3315
3316         Update to platform/mac/fast/text/systemFont.html
3317
3318         * platform/graphics/mac/FontCacheMac.mm:
3319         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
3320         Yosemite and later.
3321         (WebCore::fontWithFamily): Request the system font with a mapped weight on Yosemite and later.
3322         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:], and the proper NSFontWeight
3323         constants.
3324
3325 2015-05-06  Dean Jackson  <dino@apple.com>
3326
3327         Handle backdrop views that have to tile
3328         https://bugs.webkit.org/show_bug.cgi?id=142317
3329         <rdar://problem/20049088>
3330
3331         Reviewed by Simon Fraser.
3332
3333         Make sure backdrop layers don't tile. If they are big
3334         enough, we'll leave it to the platform compositor to handle.
3335
3336         This also fixes a bug where if a layer changed from a backdrop
3337         type to a tiled type, it would still retain its custom appearance
3338         and we'd try to add children to the wrong layer.
3339
3340         Test: compositing/media-controls-bar-appearance-big.html
3341
3342         * platform/graphics/ca/GraphicsLayerCA.cpp:
3343         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
3344         a layer needs a backdrop before checking if it needs to tile.
3345
3346 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com> and Per Arne Vollan  <peavo@outlook.com>
3347
3348         [WinCairo] Compile error due to undefined symbols after r183868
3349         https://bugs.webkit.org/show_bug.cgi?id=144692
3350
3351         Reviewed by Alex Christensen.
3352
3353         Speculative build fix. Add dummy PlatformDisplayWin.
3354
3355         * PlatformWinCairo.cmake: Add PlatformDisplay.cpp to compilation.
3356         * platform/graphics/PlatformDisplay.cpp:
3357         (WebCore::PlatformDisplay::createPlatformDisplay):
3358         * platform/graphics/PlatformDisplay.h:
3359         * platform/graphics/win/PlatformDisplayWin.h:
3360         Add stubs to compile.
3361         * WebCore.vcxproj/WebCore.vcxproj
3362         * WebCore.vcxproj/WebCore.vcxproj.filters
3363         Add new files to Windows build.
3364
3365 2015-05-06  David Hyatt  <hyatt@apple.com>
3366
3367         Avoid copies in scrollOffsetForFixedPosition() and inline it.
3368         https://bugs.webkit.org/show_bug.cgi?id=144709
3369
3370         Reviewed by Simon Fraser.
3371
3372         * page/FrameView.cpp:
3373         (WebCore::FrameView::frameScaleFactor):
3374         Added so that scrollOffsetForFixedPosition() can be inlined without having to
3375         reference Frame's implementation.
3376
3377         (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
3378         Moved this to the header.
3379
3380         * page/FrameView.h:
3381         Inline scrollOffsetForFixedPosition() and get rid of all the copying
3382         it was doing.
3383
3384 2015-05-06  David Hyatt  <hyatt@apple.com>
3385
3386         RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
3387         https://bugs.webkit.org/show_bug.cgi?id=144708
3388
3389         Reviewed by Simon Fraser.
3390
3391         * rendering/RenderLayer.cpp:
3392         (WebCore::RenderLayer::currentTransform):
3393
3394         Only compute a pixel snapped rect if we actually end up needing it. The common case
3395         is that this rect is not needed, so pushing it inside the two if statements
3396         speeds up the common case.
3397
3398 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
3399
3400         Fix the build.
3401
3402         * platform/spi/cocoa/QuartzCoreSPI.h:
3403
3404 2015-05-06  David Hyatt  <hyatt@apple.com>
3405
3406         Optimize topLeftLocationOffset() addition in updateLayerPosition
3407         https://bugs.webkit.org/show_bug.cgi?id=144704
3408
3409         Reviewed by Dean Jackson.
3410
3411         * page/FrameView.cpp:
3412         (WebCore::FrameView::FrameView):
3413         * page/FrameView.h:
3414         Move the hasFlippedBlocks bit to FrameView instead of RenderView. Works better for inlining
3415         the check in any renderer header, and it also makes more sense conceptually, since the RenderView
3416         itself could be a flipped block.
3417
3418         * rendering/RenderBox.cpp:
3419         (WebCore::RenderBox::layoutOverflowRectForPropagation):
3420         Change over to the FrameView bit.
3421
3422         * rendering/RenderBox.h:
3423         (WebCore::RenderBox::applyTopLeftLocationOffset):
3424         Add a new inlined function that can apply the top left location offset to a point without
3425         multiple LayoutSize creations and copies. It invokes a helper for flipping that is not
3426         inlined only in the case where actual flipped blocks exist in the render tree.
3427
3428         * rendering/RenderBoxModelObject.cpp:
3429         (WebCore::RenderBoxModelObject::updateFromStyle):
3430         Set the bit on the FrameView now instead of the RenderView.
3431
3432         * rendering/RenderLayer.cpp: