1 2015-05-11 Chris Fleizach <cfleizach@apple.com>
3 AX: Crash at WebCore::AccessibilityMenuList::addChildren()
4 https://bugs.webkit.org/show_bug.cgi?id=144860
6 Reviewed by Mario Sanchez Prada.
8 There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.
10 Test: accessibility/menu-list-crash2.html
12 * accessibility/AccessibilityMenuList.cpp:
13 (WebCore::AccessibilityMenuList::addChildren):
15 2015-05-11 Przemyslaw Szymanski <p.szymanski3@samsung.com>
17 [WebGL] Unnecessary condition check in the while loop
18 https://bugs.webkit.org/show_bug.cgi?id=125001
20 Reviewed by Csaba Osztrogonác.
22 While loop in this case needs to be optimized a little.
23 For now a conditional statement in while will execute two
24 times at begin. do-while loop avoids to check first statement.
26 No new tests. No behaviour changed.
28 * html/canvas/WebGLFramebuffer.cpp:
29 (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
31 2015-05-11 Joonghun Park <jh718.park@samsung.com>
33 [GTK] Reorder Performance class's member initialization sequence
34 https://bugs.webkit.org/show_bug.cgi?id=144858
36 Reviewed by Csaba Osztrogonác.
38 No new tests, no new behaviors.
40 * page/Performance.cpp:
41 (WebCore::Performance::Performance):
43 2015-05-11 Zan Dobersek <zdobersek@igalia.com>
45 Reduce TransformationMatrix copies in WebKitCSSMatrix operations
46 https://bugs.webkit.org/show_bug.cgi?id=144795
48 Reviewed by Darin Adler.
50 Instead of copying the TransformationMatrix member, performing
51 the operation on it and then copying it again when creating
52 the new WebKitCSSMatrix object, copy it just once by first
53 creating the new WebKitCSSMatrix object and then performing
54 the operation on that object's TransformationMatrix directly.
56 * css/WebKitCSSMatrix.cpp:
57 (WebCore::WebKitCSSMatrix::multiply):
58 (WebCore::WebKitCSSMatrix::translate):
59 (WebCore::WebKitCSSMatrix::scale):
60 (WebCore::WebKitCSSMatrix::rotate):
61 (WebCore::WebKitCSSMatrix::rotateAxisAngle):
62 (WebCore::WebKitCSSMatrix::skewX):
63 (WebCore::WebKitCSSMatrix::skewY):
65 2015-05-11 Zan Dobersek <zdobersek@igalia.com>
67 Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
68 https://bugs.webkit.org/show_bug.cgi?id=144793
70 Reviewed by Darin Adler.
72 Update virtual method overrides under Source/WebCore/loader
73 and Source/WebCore/dom which are missing the override specifier.
75 * loader/DocumentThreadableLoader.h:
76 (WebCore::DocumentThreadableLoader::refThreadableLoader):
77 (WebCore::DocumentThreadableLoader::derefThreadableLoader):
78 * loader/cache/CachedRawResource.h:
79 * xml/parser/XMLDocumentParser.h:
81 2015-05-11 Zan Dobersek <zdobersek@igalia.com>
83 Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
84 https://bugs.webkit.org/show_bug.cgi?id=144792
86 Reviewed by Darin Adler.
88 Update virtual method overrides under Source/WebCore/accessibility
89 and Source/WebCore/dom which are missing the override specifier.
91 * accessibility/AccessibilityMockObject.h:
92 (WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
93 * accessibility/AccessibilityRenderObject.h:
94 * dom/DecodedDataDocumentParser.h:
97 2015-05-10 Zan Dobersek <zdobersek@igalia.com>
99 Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
100 https://bugs.webkit.org/show_bug.cgi?id=144794
102 Reviewed by Philippe Normand.
104 * Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
105 should return a const reference to the member variables, instead of
106 copying the objects on every call.
108 2015-05-10 Gyuyoung Kim <gyuyoung.kim@webkit.org>
110 Use Ref instead of PassRefPtr in WebCore/page
111 https://bugs.webkit.org/show_bug.cgi?id=144841
113 Reviewed by Darin Adler.
115 To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
118 No new tests, no behavior changes.
120 * page/DebugPageOverlays.cpp:
121 * page/EventSource.cpp:
122 (WebCore::EventSource::create):
123 * page/EventSource.h:
125 (WebCore::History::create):
127 (WebCore::Location::create):
128 * page/MainFrame.cpp:
129 (WebCore::MainFrame::create):
132 (WebCore::Navigator::create):
133 * page/PageOverlay.cpp:
134 (WebCore::PageOverlay::create):
135 * page/PageOverlay.h:
136 * page/Performance.h:
137 * page/PerformanceEntryList.h:
138 (WebCore::PerformanceEntryList::create):
139 * page/PerformanceMark.h:
140 (WebCore::PerformanceMark::create):
141 * page/PerformanceMeasure.h:
142 (WebCore::PerformanceMeasure::create):
143 * page/PerformanceNavigation.h:
144 (WebCore::PerformanceNavigation::create):
145 * page/PerformanceResourceTiming.h:
146 (WebCore::PerformanceResourceTiming::create):
147 * page/PerformanceTiming.h:
148 (WebCore::PerformanceTiming::create):
149 * page/PerformanceUserTiming.h:
150 (WebCore::UserTiming::create):
153 (WebCore::Settings::create):
155 * page/TextIndicator.cpp:
156 (WebCore::TextIndicator::create):
157 * page/TextIndicator.h:
158 * page/UserContentController.cpp:
159 (WebCore::UserContentController::create):
160 * page/UserContentController.h:
161 * page/UserMessageHandlerDescriptor.h:
162 (WebCore::UserMessageHandlerDescriptor::create):
163 * page/UserMessageHandlersNamespace.h:
164 * page/VisitedLinkStore.h:
165 * page/WebKitNamespace.h:
166 (WebCore::WebKitNamespace::create):
167 * page/WebKitPoint.h:
168 (WebCore::WebKitPoint::create):
169 * page/WorkerNavigator.h:
170 (WebCore::WorkerNavigator::create):
171 * page/animation/ImplicitAnimation.h:
172 (WebCore::ImplicitAnimation::create):
173 * page/animation/KeyframeAnimation.h:
174 * page/mac/ServicesOverlayController.h:
175 * page/mac/ServicesOverlayController.mm:
176 (WebCore::ServicesOverlayController::Highlight::createForSelection):
177 (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
178 * page/scrolling/ScrollingCoordinator.cpp:
179 (WebCore::ScrollingCoordinator::create):
180 * page/scrolling/ScrollingCoordinator.h:
181 * page/scrolling/ScrollingStateFixedNode.cpp:
182 (WebCore::ScrollingStateFixedNode::create):
183 (WebCore::ScrollingStateFixedNode::clone):
184 * page/scrolling/ScrollingStateFixedNode.h:
185 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
186 (WebCore::ScrollingStateFrameScrollingNode::create):
187 (WebCore::ScrollingStateFrameScrollingNode::clone):
188 * page/scrolling/ScrollingStateFrameScrollingNode.h:
189 * page/scrolling/ScrollingStateNode.h:
190 * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
191 (WebCore::ScrollingStateOverflowScrollingNode::create):
192 (WebCore::ScrollingStateOverflowScrollingNode::clone):
193 * page/scrolling/ScrollingStateOverflowScrollingNode.h:
194 * page/scrolling/ScrollingStateStickyNode.cpp:
195 (WebCore::ScrollingStateStickyNode::create):
196 (WebCore::ScrollingStateStickyNode::clone):
197 * page/scrolling/ScrollingStateStickyNode.h:
198 * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
199 (WebCore::ScrollingCoordinator::create):
200 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
201 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
202 (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
203 * page/scrolling/ios/ScrollingTreeIOS.cpp:
204 (WebCore::ScrollingTreeIOS::create):
205 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
206 (WebCore::ScrollingCoordinator::create):
207 * page/scrolling/mac/ScrollingTreeFixedNode.h:
208 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
209 (WebCore::ScrollingTreeFixedNode::create):
210 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
211 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
212 (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
213 * page/scrolling/mac/ScrollingTreeMac.cpp:
214 (ScrollingTreeMac::create):
215 * page/scrolling/mac/ScrollingTreeMac.h:
216 * page/scrolling/mac/ScrollingTreeStickyNode.h:
217 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
218 (WebCore::ScrollingTreeStickyNode::create):
220 2015-05-10 Simon Fraser <simon.fraser@apple.com>
222 background-position sometimes doesn't work properly with background-attachment: fixed
223 https://bugs.webkit.org/show_bug.cgi?id=103757
224 rdar://problem/18749925
226 Reviewed by Darin Adler.
228 Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
231 The primary issue was that positioningAreaSize was including the top content inset
232 height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
233 code path, which kicks in when the root background is fixed.
235 Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
236 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
237 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
238 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html
240 * rendering/RenderBoxModelObject.cpp:
241 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
243 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
245 Get rid of the public item accessors in BackForwardClient
246 https://bugs.webkit.org/show_bug.cgi?id=144827
248 Reviewed by Darin Adler.
250 Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
251 We can still use these functionalities through BackForwardController.
253 No new tests, no behavior change.
255 * history/BackForwardClient.h:
256 (WebCore::BackForwardClient::backItem): Deleted.
257 (WebCore::BackForwardClient::currentItem): Deleted.
258 (WebCore::BackForwardClient::forwardItem): Deleted.
260 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
262 Rename Length::isPercent() and Length::isPercentNotCalculated().
263 https://bugs.webkit.org/show_bug.cgi?id=144791
265 Reviewed by Darin Adler.
267 1. Rename these methods as below for consistency and clarity.
269 Length::isPercentNotCalculated() => Length::isPercent()
270 Length::isPercent() => Length::isPercentOrCalculated()
272 2. Simplify the condition check of length type in SVGLengthContext::valueForLength().
274 "length.isPercent() && !length.isCalculated()" => "length.isPercent()"
276 No new tests, no behavior change.
278 * css/CSSComputedStyleDeclaration.cpp:
279 (WebCore::valueForImageSliceSide):
280 (WebCore::valueForReflection):
281 (WebCore::percentageOrZoomAdjustedValue):
282 (WebCore::lineHeightFromStyle):
283 (WebCore::ComputedStyleExtractor::propertyValue):
284 * html/HTMLPlugInImageElement.cpp:
285 (WebCore::is100Percent):
286 * page/animation/AnimationBase.cpp:
287 (WebCore::AnimationBase::computeTransformedExtentViaTransformList):
289 (WebCore::Length::percent):
290 (WebCore::Length::isPercent):
291 (WebCore::Length::isPercentOrCalculated):
292 (WebCore::Length::isSpecified):
293 (WebCore::Length::isPercentNotCalculated): Deleted.
294 * platform/graphics/transforms/TranslateTransformOperation.h:
295 * rendering/AutoTableLayout.cpp:
296 (WebCore::AutoTableLayout::recalcColumn):
297 (WebCore::AutoTableLayout::fullRecalc):
298 (WebCore::shouldScaleColumns):
299 (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
300 (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
301 (WebCore::AutoTableLayout::layout):
302 * rendering/FixedTableLayout.cpp:
303 (WebCore::FixedTableLayout::calcWidthArray):
304 (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
305 (WebCore::FixedTableLayout::layout):
306 * rendering/RenderBlock.cpp:
307 (WebCore::RenderBlock::isSelfCollapsingBlock):
308 (WebCore::RenderBlock::textIndentOffset):
309 * rendering/RenderBox.cpp:
310 (WebCore::RenderBox::needsPreferredWidthsRecalculation):
311 (WebCore::RenderBox::computeLogicalHeight):
312 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
313 (WebCore::RenderBox::computePercentageLogicalHeight):
314 (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
315 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
316 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
317 (WebCore::RenderBox::availableLogicalHeightUsing):
318 (WebCore::logicalWidthIsResolvable):
319 (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
320 (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
321 (WebCore::RenderBox::layoutOverflowRectForPropagation):
322 * rendering/RenderBoxModelObject.cpp:
323 (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
324 (WebCore::RenderBoxModelObject::relativePositionOffset):
325 (WebCore::RenderBoxModelObject::computedCSSPadding):
326 (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
327 (WebCore::RenderBoxModelObject::calculateFillTileSize):
328 * rendering/RenderDeprecatedFlexibleBox.cpp:
329 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
330 (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
331 * rendering/RenderElement.cpp:
332 (WebCore::mustRepaintFillLayers):
333 * rendering/RenderFileUploadControl.cpp:
334 (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
335 * rendering/RenderFrameSet.cpp:
336 (WebCore::RenderFrameSet::layOutAxis):
337 * rendering/RenderImage.cpp:
338 (WebCore::RenderImage::repaintOrMarkForLayout):
339 * rendering/RenderInline.cpp:
340 (WebCore::computeMargin):
341 * rendering/RenderListBox.cpp:
342 (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
343 * rendering/RenderMenuList.cpp:
344 (RenderMenuList::computeIntrinsicLogicalWidths):
345 * rendering/RenderObject.cpp:
346 (WebCore::objectIsRelayoutBoundary):
347 * rendering/RenderReplaced.cpp:
348 (WebCore::RenderReplaced::computePreferredLogicalWidths):
349 * rendering/RenderSlider.cpp:
350 (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
351 * rendering/RenderTable.cpp:
352 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
353 * rendering/RenderTableSection.cpp:
354 (WebCore::RenderTableSection::layoutRows):
355 * rendering/RenderTextControl.cpp:
356 (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
357 * rendering/RenderView.cpp:
358 (WebCore::RenderView::layout):
359 * rendering/RootInlineBox.cpp:
360 (WebCore::RootInlineBox::verticalPositionForBox):
361 * rendering/style/GridLength.h:
362 (WebCore::GridLength::isPercentage):
363 * rendering/style/GridTrackSize.h:
364 (WebCore::GridTrackSize::isPercentage):
365 * rendering/style/RenderStyle.cpp:
366 (WebCore::RenderStyle::computedLineHeight):
367 * rendering/svg/RenderSVGRoot.cpp:
368 (WebCore::RenderSVGRoot::hasRelativeDimensions):
369 * svg/SVGLengthContext.cpp:
370 (WebCore::SVGLengthContext::valueForLength):
371 * svg/graphics/SVGImage.cpp:
372 (WebCore::SVGImage::hasRelativeWidth):
373 (WebCore::SVGImage::hasRelativeHeight):
375 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
377 Remove unnecessary semicolons.
378 https://bugs.webkit.org/show_bug.cgi?id=144844
380 Reviewed by Darin Adler.
382 No new tests, no behavior change.
384 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
385 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
386 * platform/ios/PasteboardIOS.mm:
387 (WebCore::Pasteboard::readString):
388 * platform/mediastream/RealtimeMediaSourceCapabilities.h:
389 (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
390 * platform/network/mac/ResourceErrorMac.mm:
391 (WebCore::ResourceError::nsError):
392 * rendering/RenderThemeIOS.mm:
393 (WebCore::getSharedFunctionRef):
395 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com>
397 Remove unnecessary forward declarations in StyleProperties.h
398 https://bugs.webkit.org/show_bug.cgi?id=144843
400 Reviewed by Darin Adler.
402 No new tests, no behavior change.
404 * css/StyleProperties.h:
406 2015-05-10 Darin Adler <darin@apple.com>
408 [Cocoa] Fix paths and resort WebCore project file
409 https://bugs.webkit.org/show_bug.cgi?id=144838
411 Reviewed by Dan Bernstein.
413 * WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
414 sort-Xcode-project-file script and fixed the paths in the platform/ios directory.
416 2015-05-10 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
418 [Streams API] Refactor ReadableStreamReader close promise callback cleaning
419 https://bugs.webkit.org/show_bug.cgi?id=144799
421 Reviewed by Darin Adler.
423 Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
424 Moved that method to private as it is no longer needed by subclasses.
428 * Modules/streams/ReadableStreamReader.cpp:
429 (WebCore::ReadableStreamReader::releaseStreamAndClean):
430 (WebCore::ReadableStreamReader::changeStateToClosed):
431 (WebCore::ReadableStreamReader::changeStateToErrored):
432 * Modules/streams/ReadableStreamReader.h:
434 2015-05-10 Darin Adler <darin@apple.com>
436 [Cocoa] Don't soft link DataDetectorsCore
437 https://bugs.webkit.org/show_bug.cgi?id=144837
439 Reviewed by Dan Bernstein.
441 Linking this in the normal way should slightly speed up the web process
442 startup time. We don't need to soft link it: It's present in the
443 OS X base system and there is no reference cycle with WebKit.
445 * Configurations/WebCore.xcconfig: Added PrivateFrameworks to
446 FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
447 OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.
449 * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.
451 * editing/mac/DataDetection.mm:
452 (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
453 if DataDetectorsCore is available.
455 * page/mac/ServicesOverlayController.h: Simplified a forward declaration to
456 only declare what we actually use.
457 * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
458 DataDetectorsSPI.h header.
460 * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
461 DataDetectorsCore framework, which has no reference cycle with WebKit, and
462 which we can link to normally. Moved the content here from DataDetectorsSPI.h,
463 added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
464 the incorrect return type on DDScannerScanQuery, which was detected when
465 using the system headers in conjunction with this file.
467 * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
468 was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
469 path that uses the system headers and moved a few stray DataDetectors SPI
470 definitions from elsewhere into this header.
472 2015-05-10 Chris Fleizach <cfleizach@apple.com>
474 AX: Don't expose elements as data tables just because they use display: table
475 https://bugs.webkit.org/show_bug.cgi?id=144804
477 Reviewed by Mario Sanchez Prada.
479 Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.
481 Test: accessibility/css-table-ignored.html
483 * accessibility/AccessibilityTable.cpp:
484 (WebCore::AccessibilityTable::isDataTable):
486 2015-05-09 Chris Dumez <cdumez@apple.com>
488 Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
489 https://bugs.webkit.org/show_bug.cgi?id=144825
491 Reviewed by Sam Weinig.
493 Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
494 specification and to avoid IDL code duplication:
495 - https://dom.spec.whatwg.org/#interface-parentnode
496 - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
498 No Web-Exposed behavior change.
501 * DerivedSources.make:
502 * WebCore.xcodeproj/project.pbxproj:
503 * dom/CharacterData.idl:
505 * dom/DocumentFragment.idl:
507 * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
508 * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
510 2015-05-09 Chris Dumez <cdumez@apple.com>
512 Invalidate the FontCache on WebProcess suspension / critical memory pressure
513 https://bugs.webkit.org/show_bug.cgi?id=144821
515 Reviewed by Antti Koivisto.
517 Invalidate the FontCache on WebProcess suspension / critical memory
518 pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
519 the pages I tested). We already purge inactive font data on
520 non-critical memory warning but invalidating the whole FontCache takes
521 care of clearing the FontCascade cache and the fontPlatformData cache
524 * platform/MemoryPressureHandler.cpp:
525 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
527 2015-05-09 Yoav Weiss <yoav@yoav.ws>
529 Remove the PICTURE_SIZES build flag
530 https://bugs.webkit.org/show_bug.cgi?id=144679
532 Reviewed by Benjamin Poulain.
534 Removed the PICTURE_SIZES build time flag.
536 No new tests, since there's no functionality change.
538 * Configurations/FeatureDefines.xcconfig:
539 * css/CSSGrammar.y.in:
541 (WebCore::CSSParser::detectAtToken):
543 * css/SourceSizeList.cpp:
544 (WebCore::parseSizesAttribute): Deleted.
545 * html/HTMLImageElement.cpp:
546 (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
547 * html/HTMLImageElement.h:
548 (WebCore::HTMLImageElement::currentSrc):
549 * html/HTMLImageElement.idl:
550 * html/parser/HTMLPreloadScanner.cpp:
551 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
552 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
553 * html/parser/HTMLSrcsetParser.cpp:
554 (WebCore::parseDescriptors):
555 (WebCore::pickBestImageCandidate):
557 2015-05-08 Myles C. Maxfield <mmaxfield@apple.com>
559 Remove convenience constructors for TextRun
560 https://bugs.webkit.org/show_bug.cgi?id=144752
562 These convenience constructors are unnecessary. Moving the code that makes the StringView
563 back to the call site will also help us make things more elegant in future refactoring.
565 Reviewed by Darin Adler.
567 No new tests because there is no behavior change.
569 * css/CSSPrimitiveValue.cpp:
570 (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
571 * platform/graphics/StringTruncator.cpp:
572 (WebCore::stringWidth):
573 * platform/graphics/TextRun.h:
574 (WebCore::TextRun::TextRun):
575 * platform/mac/DragImageMac.mm:
576 (WebCore::widthWithFont):
577 (WebCore::drawAtPoint):
578 * rendering/SimpleLineLayout.cpp:
579 (WebCore::SimpleLineLayout::canUseFor):
580 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
581 (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
582 (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
583 * rendering/TextPainter.cpp:
584 (WebCore::TextPainter::paintText):
586 2015-05-08 Sam Weinig <sam@webkit.org>
588 Element Traversal is not just Elements anymore
589 https://bugs.webkit.org/show_bug.cgi?id=144822
591 Reviewed by Simon Fraser.
593 Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by
594 exposing the element traversal methods on non-Elements.
596 - Makes firstElementChild, lastElementChild and childElementCount available on
597 Document and DocumentFragment in addition to Element.
598 - Makes nextElementSibling and previousElementSibling available on CharacterData
599 in addition to Element.
601 Tests: fast/dom/element-traversal-on-character-data.html
602 fast/dom/element-traversal-on-document-fragment.html
603 fast/dom/element-traversal-on-document.html
605 * dom/CharacterData.idl:
606 Expose nextElementSibling and previousElementSibling.
608 * dom/ContainerNode.cpp:
609 (WebCore::ContainerNode::firstElementChild):
610 (WebCore::ContainerNode::lastElementChild):
611 (WebCore::ContainerNode::childElementCount):
612 * dom/ContainerNode.h:
613 Move implementations of firstElementChild, lastElementChild and childElementCount here
614 from Element to make them shareable.
617 * dom/DocumentFragment.idl:
618 Expose firstElementChild, lastElementChild and childElementCount.
621 (WebCore::Element::firstElementChild): Deleted.
622 (WebCore::Element::lastElementChild): Deleted.
623 (WebCore::Element::previousElementSibling): Deleted.
624 (WebCore::Element::nextElementSibling): Deleted.
625 (WebCore::Element::childElementCount): Deleted.
627 Move element traversal functions down to Node and ContainerNode.
630 Update comments to indicate where these functions are defined now.
633 (WebCore::Node::previousElementSibling):
634 (WebCore::Node::nextElementSibling):
636 Move implementations of nextElementSibling and previousElementSibling here
637 from Element to make them shareable.
639 2015-05-08 Michael Catanzaro <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
641 [GTK] Checks for DEVELOPMENT_BUILD are all wrong
642 https://bugs.webkit.org/show_bug.cgi?id=144746
644 Reviewed by Carlos Garcia Campos.
646 Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
648 * platform/gtk/GtkUtilities.cpp:
649 * platform/gtk/GtkUtilities.h:
650 * platform/text/gtk/HyphenationLibHyphen.cpp:
651 (WebCore::availableLocales):
653 2015-05-08 Alexey Proskuryakov <ap@apple.com>
655 Crashes in SocketStreamHandleBase::close
656 https://bugs.webkit.org/show_bug.cgi?id=144767
657 rdar://problem/20486538
659 Reviewed by Brady Eidson.
661 This is a speculative fix, I could not reproduce the crash.
663 * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame):
664 Normally, processOutgoingFrameQueue() closes the handle in the end when called in
665 OutgoingFrameQueueClosing state. But there is no definitive protection against
666 processing two CLOSE frames, in which case we'd try to close the handle twice.
668 * platform/network/cf/SocketStreamHandleCFNet.cpp:
669 (WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client
670 results in the socket being closed, which makes no sense here.
672 2015-05-08 Commit Queue <commit-queue@webkit.org>
674 Unreviewed, rolling out r183996.
675 https://bugs.webkit.org/show_bug.cgi?id=144806
677 ASan detected use-after free (Requested by ap on #webkit).
681 "Remove convenience constructors for TextRun"
682 https://bugs.webkit.org/show_bug.cgi?id=144752
683 http://trac.webkit.org/changeset/183996
685 2015-05-08 Eric Carlson <eric.carlson@apple.com>
687 [Mac] Playback target clients do not unregister on page reload
688 https://bugs.webkit.org/show_bug.cgi?id=144761
690 Reviewed by Brady Eidson.
693 (WebCore::Document::prepareForDestruction): Unregister all target picker clients.
695 * html/HTMLMediaElement.cpp:
696 (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
697 (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
698 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
699 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.
701 2015-05-08 Chris Dumez <cdumez@apple.com>
703 Throttle RequestAnimationFrame in subframes that are outside the viewport
704 https://bugs.webkit.org/show_bug.cgi?id=144718
705 <rdar://problem/20688782>
707 Reviewed by Simon Fraser.
709 Throttle RequestAnimationFrame in subframes that are outside the
710 viewport or have "display: none" for performance and power.
712 Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
713 fast/animation/request-animation-frame-throttle-subframe.html
716 (WebCore::Document::scriptedAnimationController):
717 * dom/ScriptedAnimationController.cpp:
718 (WebCore::ScriptedAnimationController::setThrottled):
719 (WebCore::ScriptedAnimationController::isThrottled):
720 * dom/ScriptedAnimationController.h:
721 * loader/FrameLoader.cpp:
722 (WebCore::FrameLoader::open):
723 Call FrameView::setFrameRect() only *after* the view has been
724 set on the Frame. Otherwise, setFrameRect() ends up calling
725 viewportContentsChanged() and we hit the
726 ASSERT(frame().view() == this) assertion in windowClipRect()
727 because the Frame still has its old FrameView. This is covered
728 by loader/go-back-to-different-window-size.html layout test.
730 * page/FrameView.cpp:
731 (WebCore::FrameView::viewportContentsChanged):
732 (WebCore::FrameView::applyRecursivelyWithVisibleRect):
733 (WebCore::FrameView::resumeVisibleImageAnimations):
734 (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
735 (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
736 (WebCore::FrameView::updateThrottledDOMTimersState):
737 (WebCore::FrameView::scrollPositionChanged): Deleted.
738 (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
740 * testing/Internals.cpp:
741 (WebCore::Internals::isRequestAnimationFrameThrottled):
742 (WebCore::Internals::isTimerThrottled): Deleted.
743 * testing/Internals.h:
744 * testing/Internals.idl:
746 2015-05-08 Daniel Bates <dabates@apple.com>
748 Fix the iOS Simulator external SDK build following <http://trac.webkit.org/changeset/181918>
750 Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard
751 IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE)
752 since it is only applicable on platforms that use IOSurface.
754 * platform/spi/cocoa/QuartzCoreSPI.h:
756 2015-05-08 Myles C. Maxfield <mmaxfield@apple.com>
758 Remove convenience constructors for TextRun
759 https://bugs.webkit.org/show_bug.cgi?id=144752
761 These convenience constructors are unnecessary. Moving the code that makes the StringView
762 back to the call site will also help us make things more elegant in future refactoring.
764 Reviewed by Darin Adler.
766 No new tests because there is no behavior change.
768 * css/CSSPrimitiveValue.cpp:
769 (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
770 * platform/graphics/StringTruncator.cpp:
771 (WebCore::stringWidth):
772 * platform/graphics/TextRun.h:
773 (WebCore::TextRun::TextRun):
774 * platform/mac/DragImageMac.mm:
775 (WebCore::widthWithFont):
776 (WebCore::drawAtPoint):
777 * rendering/SimpleLineLayout.cpp:
778 (WebCore::SimpleLineLayout::canUseFor):
779 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
780 (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
781 (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
782 * rendering/TextPainter.cpp:
783 (WebCore::TextPainter::paintText):
785 2015-05-08 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
787 [Streams API] ReadableStream constructor start function should be able to error the stream
788 https://bugs.webkit.org/show_bug.cgi?id=141162
790 Reviewed by Darin Adler.
792 This patch implements the functionality of the ReadableStreamController error function.
793 It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise.
794 Adding support to reject promise with any JSValue.
796 Support for storing the error is added to both reader and stream.
798 Test: streams/readable-stream-controller-error.html and rebased tests
800 * Modules/streams/ReadableStream.cpp:
801 (WebCore::ReadableStream::changeStateToErrored):
802 * Modules/streams/ReadableStream.h:
803 * Modules/streams/ReadableStreamReader.cpp:
804 (WebCore::ReadableStreamReader::initialize):
805 (WebCore::ReadableStreamReader::closed):
806 (WebCore::ReadableStreamReader::changeStateToClosed):
807 (WebCore::ReadableStreamReader::changeStateToErrored):
808 * Modules/streams/ReadableStreamReader.h:
809 * bindings/js/JSDOMPromise.h:
810 (WebCore::DeferredWrapper::reject):
811 * bindings/js/JSReadableStreamControllerCustom.cpp:
812 (WebCore::JSReadableStreamController::error):
813 * bindings/js/JSReadableStreamReaderCustom.cpp:
814 (WebCore::JSReadableStreamReader::closed):
815 * bindings/js/ReadableJSStream.cpp:
816 (WebCore::ReadableJSStream::createReader):
817 (WebCore::ReadableJSStream::storeError):
818 (WebCore::ReadableJSStream::Reader::storeError):
819 (WebCore::ReadableJSStream::jsController): Deleted.
820 * bindings/js/ReadableJSStream.h:
822 2015-05-08 Commit Queue <commit-queue@webkit.org>
824 Unreviewed, rolling out r183985.
825 https://bugs.webkit.org/show_bug.cgi?id=144796
827 broke loader/go-back-to-different-window-size.html (Requested
828 by kling on #webkit).
832 "Throttle RequestAnimationFrame in subframes that are outside
834 https://bugs.webkit.org/show_bug.cgi?id=144718
835 http://trac.webkit.org/changeset/183985
837 2015-05-08 Youenn Fablet <youenn.fablet@crf.canon.fr>
839 SharedBuffer::m_size should be initialized to 0 when defining it
840 https://bugs.webkit.org/show_bug.cgi?id=144740
842 Reviewed by Darin Adler.
844 Setting m_size to 0 when declaring it and updating constructor definitions.
846 No change in behaviour.
848 * platform/SharedBuffer.cpp:
849 (WebCore::SharedBuffer::SharedBuffer):
850 * platform/SharedBuffer.h:
851 * platform/cf/SharedBufferCF.cpp:
852 (WebCore::SharedBuffer::SharedBuffer):
853 * platform/soup/SharedBufferSoup.cpp:
854 (WebCore::SharedBuffer::SharedBuffer):
856 2015-05-08 Commit Queue <commit-queue@webkit.org>
858 Unreviewed, rolling out r183945.
859 https://bugs.webkit.org/show_bug.cgi?id=144789
861 "It broke all the GTK+ tests" (Requested by KaL on #webkit).
865 "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
866 https://bugs.webkit.org/show_bug.cgi?id=144746
867 http://trac.webkit.org/changeset/183945
869 2015-05-07 Chris Dumez <cdumez@apple.com>
871 Throttle RequestAnimationFrame in subframes that are outside the viewport
872 https://bugs.webkit.org/show_bug.cgi?id=144718
873 <rdar://problem/20688782>
875 Reviewed by Simon Fraser.
877 Throttle RequestAnimationFrame in subframes that are outside the
878 viewport or have "display: none" for performance and power.
880 Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
881 fast/animation/request-animation-frame-throttle-subframe.html
884 (WebCore::Document::scriptedAnimationController):
885 * dom/ScriptedAnimationController.cpp:
886 (WebCore::ScriptedAnimationController::setThrottled):
887 (WebCore::ScriptedAnimationController::isThrottled):
888 * dom/ScriptedAnimationController.h:
889 * page/FrameView.cpp:
890 (WebCore::FrameView::viewportContentsChanged):
891 (WebCore::FrameView::applyRecursivelyWithVisibleRect):
892 (WebCore::FrameView::resumeVisibleImageAnimations):
893 (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
894 (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
895 (WebCore::FrameView::updateThrottledDOMTimersState):
896 (WebCore::FrameView::scrollPositionChanged): Deleted.
897 (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
899 * testing/Internals.cpp:
900 (WebCore::Internals::isRequestAnimationFrameThrottled):
901 (WebCore::Internals::isTimerThrottled): Deleted.
902 * testing/Internals.h:
903 * testing/Internals.idl:
905 2015-05-07 Yoav Weiss <yoav@yoav.ws>
907 Calculate source-size length as a float
908 https://bugs.webkit.org/show_bug.cgi?id=144766
910 Reviewed by Dean Jackson.
912 Make sure that the source-size length is calculated as a float,
913 to align with the spec.
915 Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
916 fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
918 * css/SourceSizeList.cpp:
919 (WebCore::parseSizesAttribute):
920 (WebCore::defaultLength):
921 (WebCore::computeLength):
922 * css/SourceSizeList.h:
923 * html/HTMLImageElement.cpp:
924 (WebCore::HTMLImageElement::parseAttribute):
925 * html/parser/HTMLPreloadScanner.cpp:
926 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
927 * html/parser/HTMLSrcsetParser.cpp:
928 (WebCore::pickBestImageCandidate):
929 (WebCore::bestFitSourceForImageAttributes):
930 * html/parser/HTMLSrcsetParser.h:
932 2015-05-07 Commit Queue <commit-queue@webkit.org>
934 Unreviewed, rolling out r183895.
935 https://bugs.webkit.org/show_bug.cgi?id=144786
937 Many tests became flaky (Requested by ap on #webkit).
941 "Expose more font weights for -apple-system"
942 https://bugs.webkit.org/show_bug.cgi?id=144707
943 http://trac.webkit.org/changeset/183895
945 2015-05-07 Hyungwook Lee <hyungwook.lee@navercorp.com>
947 Add first-letter assert exception in RenderButton::setupInnerStyle().
948 https://bugs.webkit.org/show_bug.cgi?id=140517OB
950 Reviewed by Darin Adler.
952 StyleResolver references inner block's render style temporary in
953 RenderBlock::styleDidChange() when we have first-letter css pseudo
956 * rendering/RenderButton.cpp:
957 (WebCore::RenderButton::setupInnerStyle):
959 2015-05-07 Chris Dumez <cdumez@apple.com>
961 Unreviewed, fix build after r183970.
963 WEBCORE_EXPORT should not be used on inlined functions.
965 * platform/graphics/ca/GraphicsLayerCA.h:
967 2015-05-07 Anders Carlsson <andersca@apple.com>
971 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
972 (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
973 * editing/cocoa/HTMLConverter.mm:
974 (HTMLConverter::_addMarkersToList):
975 * platform/mac/PasteboardMac.mm:
976 (WebCore::writeFileWrapperAsRTFDAttachment):
977 * platform/mac/PlatformPasteboardMac.mm:
978 (WebCore::PlatformPasteboard::setTypes):
979 Pass empty arrays and dictionaries instead of nil.
981 * rendering/RenderThemeMac.mm:
982 (WebCore::RenderThemeMac::paintSliderThumb):
983 Pass the document view to the AppKit paint method.
985 2015-05-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
987 Purge PassRefPtr in WebCore/html - 3
988 https://bugs.webkit.org/show_bug.cgi?id=144686
990 Reviewed by Andreas Kling.
992 Replace PassRefPtr with Ref in create() factory functions, because
993 it doesn't have to change to be null.
995 No new tests, no behavior changes.
997 * html/FTPDirectoryDocument.h:
998 * html/HTMLDetailsElement.cpp:
999 (WebCore::DetailsContentElement::create):
1000 * html/HTMLKeygenElement.cpp:
1001 * html/HTMLSummaryElement.cpp:
1002 (WebCore::SummaryContentElement::create):
1003 * html/TimeRanges.cpp:
1004 (WebCore::TimeRanges::create):
1005 * html/shadow/SliderThumbElement.cpp:
1006 (WebCore::SliderContainerElement::create):
1007 * html/shadow/SliderThumbElement.h:
1008 (WebCore::SliderThumbElement::create):
1009 * html/shadow/SpinButtonElement.cpp:
1010 (WebCore::SpinButtonElement::create):
1011 * html/shadow/SpinButtonElement.h:
1012 * html/shadow/TextControlInnerElements.cpp:
1013 (WebCore::TextControlInnerContainer::create):
1014 (WebCore::TextControlInnerElement::create):
1015 (WebCore::TextControlInnerTextElement::create):
1016 (WebCore::SearchFieldResultsButtonElement::create):
1017 (WebCore::SearchFieldCancelButtonElement::create):
1018 * html/shadow/TextControlInnerElements.h:
1019 * html/shadow/YouTubeEmbedShadowElement.cpp:
1020 (WebCore::YouTubeEmbedShadowElement::create):
1021 * html/track/InbandDataTextTrack.cpp:
1022 (WebCore::InbandDataTextTrack::create):
1023 * html/track/InbandDataTextTrack.h:
1024 * html/track/InbandGenericTextTrack.cpp:
1025 (WebCore::InbandGenericTextTrack::create):
1026 * html/track/InbandGenericTextTrack.h:
1027 * html/track/InbandWebVTTTextTrack.cpp:
1028 (WebCore::InbandWebVTTTextTrack::create):
1029 * html/track/InbandWebVTTTextTrack.h:
1030 * html/track/LoadableTextTrack.h:
1031 * html/track/TextTrack.h:
1032 (WebCore::TextTrack::create):
1033 * html/track/TextTrackCueGeneric.cpp:
1034 * html/track/TextTrackCueGeneric.h:
1035 * html/track/TextTrackList.h:
1036 * html/track/VTTRegionList.h:
1037 (WebCore::VTTRegionList::create):
1039 2015-05-07 Dean Jackson <dino@apple.com>
1041 [iOS] MediaControls: disappear while scrubbing
1042 https://bugs.webkit.org/show_bug.cgi?id=144777
1043 <rdar://problem/20065572>
1045 Reviewed by Eric Carlson.
1047 If we are scrubbing we shouldn't hide the controls.
1049 * Modules/mediacontrols/mediaControlsApple.js:
1050 (Controller.prototype.hideControls): Return early if we are scrubbing.
1051 * Modules/mediacontrols/mediaControlsiOS.js:
1052 (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
1053 rename from non-underscored value throughout the file.
1054 (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
1055 the timer to hide the controls.
1057 2015-05-07 Simon Fraser <simon.fraser@apple.com>
1059 REGRESSION (r183300): Fixed elements flash when scrolling
1060 https://bugs.webkit.org/show_bug.cgi?id=144778
1061 rdar://problem/20769741
1063 Reviewed by Dean Jackson.
1065 After r183300 we can detached layer backing store when outside the coverage region.
1066 However, position:fixed layers are moved around by the ScrollingCoordinator behind
1067 GraphicsLayer's back, so we can do layer flushes with stale information about layer
1070 To avoid dropping backing store for layers in this situation, prevent backing
1071 store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
1072 layers. Preventing detachment on a layer also prevents detachment on all descendant
1075 * platform/graphics/GraphicsLayer.h:
1076 (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
1077 (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
1078 * platform/graphics/ca/GraphicsLayerCA.cpp:
1079 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1080 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
1081 if backing store detachment is prevented.
1082 (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to
1083 communicate to descendants that detachment is prevented.
1084 * platform/graphics/ca/GraphicsLayerCA.h:
1085 (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
1086 * rendering/RenderLayerBacking.cpp:
1087 (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
1088 * rendering/RenderLayerBacking.h:
1089 (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
1090 nodeID for the ViewportConstrained role, turn off backing store detachment.
1092 2015-05-07 Sam Weinig <sam@webkit.org>
1094 Consider implementing Document.scrollingElement
1095 <rdar://problem/20845213>
1096 https://bugs.webkit.org/show_bug.cgi?id=143609
1098 Reviewed by Simon Fraser.
1100 Add the non-compliant implementation of Document.scrollingElement that the spec,
1101 found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement,
1102 says we should have while we have non-compliant implementations of Element.scrollTop
1103 and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
1105 Tests: fast/dom/Document/scrollingElement-quirks-mode.html
1106 fast/dom/Document/scrollingElement-standards-mode.html
1109 (WebCore::Document::scrollingElement):
1113 2015-05-07 Dean Jackson <dino@apple.com>
1115 [iOS] While scrubbing and holding down, video continues to play
1116 https://bugs.webkit.org/show_bug.cgi?id=144776
1117 <rdar://problem/20863757>
1119 Reviewed by Simon Fraser.
1121 When we are scrubbing a video, we should pause playback. As we
1122 let go of the scrubber playback can resume (but only if it was
1123 playing originally).
1125 * Modules/mediacontrols/mediaControlsiOS.js:
1126 (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
1127 (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
1128 (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
1129 (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
1130 potentially about to scrub.
1131 (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
1133 2015-05-07 Said Abou-Hallawa <sabouhallawa@apple.com>
1135 Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
1136 https://bugs.webkit.org/show_bug.cgi?id=144335
1138 Reviewed by Daniel Bates.
1140 Address comments raised by Darin Adler in review.
1142 * platform/graphics/ImageBuffer.cpp:
1143 (WebCore::ImageBuffer::sizeNeedsClamping):
1144 (WebCore::ImageBuffer::clampedSize):
1145 (WebCore::ImageBuffer::isSizeClamped): Deleted.
1146 * platform/graphics/ImageBuffer.h:
1147 The condition for the negative width/height in isSizeClamped() was wrong. Use
1148 FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping().
1149 The new function should return the opposite of the old function return value.
1151 * platform/graphics/filters/FilterEffect.cpp:
1152 (WebCore::FilterEffect::apply):
1153 (WebCore::FilterEffect::asUnmultipliedImage):
1154 (WebCore::FilterEffect::asPremultipliedImage):
1155 (WebCore::FilterEffect::copyUnmultipliedImage):
1156 (WebCore::FilterEffect::copyPremultipliedImage):
1157 (WebCore::FilterEffect::createUnmultipliedImageResult):
1158 (WebCore::FilterEffect::createPremultipliedImageResult):
1159 * rendering/FilterEffectRenderer.cpp:
1160 (WebCore::FilterEffectRenderer::updateBackingStoreRect):
1161 (WebCore::FilterEffectRendererHelper::beginFilterEffect):
1162 * rendering/svg/RenderSVGResourceFilter.cpp:
1163 (WebCore::RenderSVGResourceFilter::applyResource):
1164 Call the new function and negate the condition for the return value.
1166 2015-05-07 Anders Carlsson <andersca@apple.com>
1170 * editing/mac/EditorMac.mm:
1171 (WebCore::dataInRTFDFormat):
1172 (WebCore::dataInRTFFormat):
1174 2015-05-07 Said Abou-Hallawa <sabouhallawa@apple.com>
1176 Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
1177 https://bugs.webkit.org/show_bug.cgi?id=144335
1179 Reviewed by Darin Adler.
1181 When the SVG element is larger than 4096x4096 pixels and it has a filter,
1182 a clipper or a masker, the ImageBuffer which is created for drawing the
1183 sourceGraphicBuffer has to be clamped to this size. The reason for this
1184 clamping is the FilterEffect simply ignores processing any ImageBuffer
1185 larger than this size.
1187 The bug was happening because we did not propagate the clamping logic to
1188 the FilterEffect. The FilterEffect result ImageBuffer was not clamped as
1189 what we do for drawing the sourceGraphicBuffer. If only the destination
1190 point is specified, the GraphicsContext::drawImageBuffer() assumes the
1191 source and the destination images have the same size which is not true
1194 The fix is to add the clamping logic to the FilterEffect. Two places we
1195 need to change. (1) FilterEffect::createImageBufferResult() has to apply
1196 the same clamping we do in SVGRenderingContext::createImageBuffer(). (2)
1197 FilterEffect::drawingRegionOfInputImage() has to consider the clamping
1198 when mapping from absolute coordinates to the ImageBuffer coordinates.
1200 Tests: svg/filters/big-sized-off-viewport-filter.svg
1202 * platform/graphics/ImageBuffer.cpp:
1203 (WebCore::ImageBuffer::isSizeClamped):
1204 (WebCore::ImageBuffer::clampedSize):
1205 (WebCore::ImageBuffer::clampedRect):
1206 * platform/graphics/ImageBuffer.h:
1207 (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods
1208 from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer.
1210 * platform/graphics/filters/FEColorMatrix.cpp:
1211 (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the
1212 result image instead of using absolutePaintRect(). The later returns the
1213 rectangle of the element without clamping.
1215 * platform/graphics/filters/FETile.cpp:
1216 (WebCore::FETile::platformApplySoftware):
1217 * rendering/svg/RenderSVGResourceClipper.cpp:
1218 (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1219 * rendering/svg/RenderSVGResourceFilter.cpp:
1220 (WebCore::RenderSVGResourceFilter::applyResource):
1221 (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted.
1222 * rendering/svg/RenderSVGResourceFilter.h:
1223 * rendering/svg/RenderSVGResourceGradient.cpp:
1224 (WebCore::createMaskAndSwapContextForTextGradient):
1225 (WebCore::clipToTextMask):
1226 * rendering/svg/RenderSVGResourceMasker.cpp:
1227 (WebCore::RenderSVGResourceMasker::applySVGMask):
1228 * rendering/svg/RenderSVGResourcePattern.cpp:
1229 (WebCore::RenderSVGResourcePattern::buildPattern):
1230 (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications
1231 which are needed because of moving the clamping helper methods to ImageBuffer
1232 and because of changing the prototype of SVGRenderingContext methods.
1234 * platform/graphics/filters/FilterEffect.cpp:
1235 (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping
1236 when mapping from absolute coordinates to the ImageBuffer coordinates.
1238 (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping
1239 we do in SVGRenderingContext::createImageBuffer() when creating the
1240 FilterEffect result ImageBuffer.
1242 (WebCore::FilterEffect::apply):
1243 (WebCore::FilterEffect::asUnmultipliedImage):
1244 (WebCore::FilterEffect::asPremultipliedImage):
1245 (WebCore::FilterEffect::copyUnmultipliedImage):
1246 (WebCore::FilterEffect::copyPremultipliedImage):
1247 (WebCore::FilterEffect::createUnmultipliedImageResult):
1248 (WebCore::FilterEffect::createPremultipliedImageResult):
1249 (WebCore::FilterEffect::maxFilterArea): Deleted.
1250 (WebCore::FilterEffect::isFilterSizeValid): Deleted.
1251 * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping
1252 helper methods and delete the local ones.
1254 * platform/graphics/transforms/AffineTransform.cpp:
1255 (WebCore::AffineTransform::scaleNonUniform):
1256 (WebCore::AffineTransform::scale):
1257 (WebCore::AffineTransform::translate):
1258 * platform/graphics/transforms/AffineTransform.h: Add new scale and translate
1259 overloads to AffineTransform.
1261 * rendering/FilterEffectRenderer.cpp:
1262 (WebCore::FilterEffectRenderer::updateBackingStoreRect):
1263 (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up.
1265 * rendering/svg/SVGRenderingContext.cpp:
1266 (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
1267 (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1268 Return the AffineTransform instead of passing it through the reference of
1271 (WebCore::SVGRenderingContext::createImageBuffer):
1272 (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted.
1273 Code clean up and method rename.
1275 (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted.
1276 (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted.
1277 * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to
1278 the ImageBuffer class.
1280 2015-05-07 Beth Dakin <bdakin@apple.com>
1282 New force-related DOM events should fire in WK1 views
1283 https://bugs.webkit.org/show_bug.cgi?id=144663
1285 rdar://problem/20281886
1287 Reviewed by Sam Weinig.
1289 All of the WK1 mouse events need to take the correspondingPressureEvent.
1290 * page/EventHandler.h:
1292 Make correspondingPressureEvent a part of CurrentEventScope. This is needed to
1293 have accurate pressure information for all of the mouse events in subframes.
1294 * page/mac/EventHandlerMac.mm:
1295 (WebCore::correspondingPressureEventSlot):
1296 (WebCore::EventHandler::correspondingPressureEvent):
1297 (WebCore::CurrentEventScope::CurrentEventScope):
1298 (WebCore::CurrentEventScope::~CurrentEventScope):
1300 These events don’t have an associated pressure, so send nil for the
1301 correspondingPressureEvent.
1302 (WebCore::EventHandler::wheelEvent):
1303 (WebCore::EventHandler::keyEvent):
1305 Pipe through correspondingPressureEvent.
1306 (WebCore::EventHandler::mouseDown):
1307 (WebCore::EventHandler::mouseDragged):
1308 (WebCore::EventHandler::mouseUp):
1309 (WebCore::EventHandler::mouseMoved):
1311 New function to handle pressure change events.
1312 (WebCore::EventHandler::pressureChange):
1314 Pipe through correspondingPressureEvent.
1315 (WebCore::EventHandler::passMouseMovedEventToScrollbars):
1316 (WebCore::EventHandler::currentPlatformMouseEvent):
1318 Take the correspondingPressureEvent in order to build a PlatformMouseEvent with
1319 the correct pressure information.
1320 * platform/mac/PlatformEventFactoryMac.h:
1321 * platform/mac/PlatformEventFactoryMac.mm:
1322 (WebCore::globalPointForEvent):
1323 (WebCore::pointForEvent):
1324 (WebCore::mouseButtonForEvent):
1325 (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
1326 (WebCore::PlatformEventFactory::createPlatformMouseEvent):
1328 2015-05-06 Roger Fong <roger_fong@apple.com>
1330 Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
1331 https://bugs.webkit.org/show_bug.cgi?id=144700.
1332 <rdar://problem/19997548>
1334 Reviewed by Jer Noble.
1336 Update time and timeline during the timeline input event instead of the wrapper's mousemove.
1337 (Controller.prototype.handleWrapperMouseMove):
1338 (Controller.prototype.handleTimelineMouseMove):
1339 (Controller.prototype.drawTimelineBackground):
1341 (Controller.prototype.updateControlsWhileScrubbing):
1342 Updates time and scrubber to reflect timeline user input.
1344 2015-05-07 Yoav Weiss <yoav@yoav.ws>
1346 Handle meta viewport in HTMLPreloadScanner
1347 https://bugs.webkit.org/show_bug.cgi?id=144640
1349 Reviewed by Dean Jackson.
1351 Add support for the <meta> tag to the HTMLPreloadScanner
1352 and when the meta tag's name is viewport, get the document
1353 to process the tag's attribute value, and set its ViewportArgument.
1355 Tests: fast/dom/HTMLMetaElement/meta-preloader.html
1357 * html/parser/HTMLPreloadScanner.cpp:
1358 (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
1359 (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
1360 (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
1361 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1362 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
1363 (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
1364 * html/parser/HTMLPreloadScanner.h:
1365 * testing/Internals.cpp:
1366 (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
1367 * testing/Internals.h:
1368 * testing/Internals.idl:
1370 2015-05-07 Zalan Bujtas <zalan@apple.com>
1372 REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.
1373 https://bugs.webkit.org/show_bug.cgi?id=144723
1374 rdar://problem/18307094
1376 Reviewed by Simon Fraser.
1378 This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary.
1380 While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account.
1381 However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly,
1382 we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position.
1384 Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html
1386 * rendering/RenderLayerBacking.cpp:
1387 (WebCore::RenderLayerBacking::updateGeometry):
1389 2015-05-07 Yoav Weiss <yoav@yoav.ws>
1391 Fix sizes crash and add invalid value tests.
1392 https://bugs.webkit.org/show_bug.cgi?id=144739
1394 Reviewed by Darin Adler.
1396 Make sure that only CSS length are allowed when the sizes parser is calling computeLength.
1397 Also make sure that for invalid lengths, the 100vw default is used instead.
1399 Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
1401 * css/SourceSizeList.cpp:
1402 (WebCore::computeLength):
1403 (WebCore::defaultLength):
1404 (WebCore::parseSizesAttribute):
1406 2015-05-07 Michael Catanzaro <mcatanzaro@igalia.com>
1408 [GTK] Checks for DEVELOPMENT_BUILD are all wrong
1409 https://bugs.webkit.org/show_bug.cgi?id=144746
1411 Reviewed by Martin Robinson.
1413 Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
1415 * platform/gtk/GtkUtilities.cpp:
1416 * platform/gtk/GtkUtilities.h:
1417 * platform/text/gtk/HyphenationLibHyphen.cpp:
1418 (WebCore::availableLocales):
1420 2015-05-07 Simon Fraser <simon.fraser@apple.com>
1422 Remove the WK1-only code path for independently composited iframes
1423 https://bugs.webkit.org/show_bug.cgi?id=144722
1425 Reviewed by Dean Jackson.
1427 In WebKit1 on Mac, we allowed iframes to be composited independently of their
1428 parent document, relying on the fact that the frame's platform view can host
1429 a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
1430 and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
1431 because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
1433 Removing the WK1-only code path solves these problems. It also eliminates the need
1434 to do compositing-specific frame overlap testing.
1436 * page/FrameView.cpp:
1437 (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
1438 Any iframe that gets composited will participate in the normal compositing overlap
1439 testing in its parent frame.
1440 (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
1441 (WebCore::FrameView::hasCompositingAncestor): Deleted.
1443 * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
1444 with an isMainFrameCompositor() for readability. Some 0->nullptr.
1445 (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1446 (WebCore::RenderLayerCompositor::chromeClient):
1447 (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
1448 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1449 (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1450 (WebCore::RenderLayerCompositor::updateBacking):
1451 (WebCore::RenderLayerCompositor::layerTreeAsText):
1452 (WebCore::RenderLayerCompositor::frameContentsCompositor):
1453 (WebCore::RenderLayerCompositor::setIsInWindow):
1454 (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
1455 (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
1456 already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
1457 nothing and is removed.
1458 (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
1459 (WebCore::RenderLayerCompositor::requiresScrollLayer):
1460 (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
1461 (WebCore::RenderLayerCompositor::isMainFrameCompositor):
1462 (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
1463 (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
1464 (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
1465 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1466 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1467 (WebCore::RenderLayerCompositor::updateLayerForHeader):
1468 (WebCore::RenderLayerCompositor::updateLayerForFooter):
1469 (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
1470 all other frames attach via parent frame.
1471 (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
1472 scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
1473 layout, but is no longer needed so remove it.
1474 (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1475 (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
1476 (WebCore::RenderLayerCompositor::scrollingCoordinator):
1477 (WebCore::RenderLayerCompositor::graphicsLayerFactory):
1478 (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
1479 (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
1480 (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
1481 it really asks whether the document uses tiled backing, but does not check for main frame.
1482 * rendering/RenderLayerCompositor.h:
1483 * rendering/RenderWidget.cpp:
1484 (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
1487 2015-05-06 Dean Jackson <dino@apple.com>
1489 Handle backdrop views that have to tile
1490 https://bugs.webkit.org/show_bug.cgi?id=142317
1491 <rdar://problem/20049088>
1493 Reviewed by Simon Fraser.
1495 Take 2 - this was rolled out because Mavericks was crashing.
1497 Make sure backdrop layers don't tile. If they are big
1498 enough, we'll leave it to the platform compositor to handle.
1500 This also fixes a bug where if a layer changed from a backdrop
1501 type to a tiled type, it would still retain its custom appearance
1502 and we'd try to add children to the wrong layer.
1504 Test: compositing/media-controls-bar-appearance-big.html
1506 * platform/graphics/ca/GraphicsLayerCA.cpp:
1507 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
1508 a layer needs a backdrop before checking if it needs to tile.
1510 2015-05-05 Myles C. Maxfield <mmaxfield@apple.com>
1512 Revert "Introducing the Platform Abstraction Layer (PAL)"
1513 https://bugs.webkit.org/show_bug.cgi?id=144751
1517 PAL should be a new target inside WebCore, rather than a top-level folder.
1519 * WebCore.xcodeproj/project.pbxproj:
1520 * Configurations/FeatureDefines.xcconfig:
1522 2015-05-07 Dan Bernstein <mitz@apple.com>
1524 Tried to fix the build.
1526 * Configurations/WebCoreTestSupport.xcconfig:
1528 2015-05-07 Joanmarie Diggs <jdiggs@igalia.com>
1530 AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
1531 https://bugs.webkit.org/show_bug.cgi?id=144702
1533 Reviewed by Chris Fleizach.
1535 Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
1536 Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
1537 for the Mac. Add PreRole to the list of "text type" ATK roles.
1539 No new tests. Existing tests were updated to reflect the corrected mapping.
1541 * accessibility/AccessibilityObject.h:
1542 * accessibility/AccessibilityRenderObject.cpp:
1543 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1544 * accessibility/atk/AccessibilityObjectAtk.cpp:
1545 (WebCore::AccessibilityObject::allowsTextRanges):
1546 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1549 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1550 (createAccessibilityRoleMap):
1552 2015-05-07 Dan Bernstein <mitz@apple.com>
1554 <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
1555 https://bugs.webkit.org/show_bug.cgi?id=144727
1557 Reviewed by Darin Adler.
1559 * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig.
1560 * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of
1561 INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator.
1562 * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of
1563 INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x
1566 2015-05-07 Eric Carlson <eric.carlson@apple.com>
1568 [Mac] Playback target isn't set on new element
1569 https://bugs.webkit.org/show_bug.cgi?id=144724
1571 Reviewed by Jer Noble.
1573 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1574 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1575 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
1577 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
1578 the setting in case we don't have an AVPlayer yet.
1580 2015-05-07 Yoav Weiss <yoav@yoav.ws>
1582 Fix <script srcset> being loaded by the preloader.
1583 https://bugs.webkit.org/show_bug.cgi?id=144675
1585 Reviewed by Darin Adler.
1587 Fix HTMLPreloadScanner to make sure that srcset is only loaded
1588 when it is present on an <img>.
1590 Tests: http/tests/loading/preload-script-src.html
1591 http/tests/loading/preload-script-srcset-ignored.html
1593 * html/parser/HTMLPreloadScanner.cpp:
1594 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1596 2015-05-07 Žan Doberšek <zdobersek@igalia.com>
1598 Add missing type traits specialization for PlatformDisplayWayland
1599 https://bugs.webkit.org/show_bug.cgi?id=144671
1601 Reviewed by Carlos Garcia Campos.
1603 * platform/graphics/wayland/PlatformDisplayWayland.h:
1604 Add missing type traits specialization for the PlatformDisplayWayland
1605 class via the SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY macro.
1607 2015-05-06 Manuel Rego Casasnovas <rego@igalia.com>
1609 [CSS Grid Layout] Mark grid shorthands as layout dependent
1610 https://bugs.webkit.org/show_bug.cgi?id=144687
1612 Reviewed by Darin Adler.
1614 grid-template and grid shorthands were not marked us layout dependent,
1615 so you can end up calling them before the grid has been laid out and
1616 you'll get a crash at valueForGridTrackList() because of trackPositions
1617 won't be initialized yet.
1619 Tests: fast/css-grid-layout/grid-shorthand-computed-style-crash.html
1620 fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html
1622 * css/CSSComputedStyleDeclaration.cpp:
1623 (WebCore::isLayoutDependent): Add the grid shorthands only if the object
1624 is a RenderGrid as otherwise it's not needed (using the same condition
1625 for grid-template-columns and grid-template-rows properties too).
1627 2015-05-06 Daniel Bates <dabates@apple.com>
1629 [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
1630 https://bugs.webkit.org/show_bug.cgi?id=144657
1631 <rdar://problem/18894598>
1633 Reviewed by Andy Estes.
1635 Export WebCore functionality to pause and resume the database thread so that we can
1636 make use of this functionality from WebKit2.
1638 * Modules/webdatabase/AbstractDatabaseServer.h:
1639 * Modules/webdatabase/DatabaseManager.cpp:
1640 (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
1641 * Modules/webdatabase/DatabaseManager.h:
1642 * Modules/webdatabase/DatabaseServer.cpp:
1643 (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
1644 DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
1645 For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
1646 we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
1647 * Modules/webdatabase/DatabaseServer.h:
1649 2015-05-06 Brent Fulgham <bfulgham@apple.com>
1651 Scroll-snap points do not handle margins and padding propertly
1652 https://bugs.webkit.org/show_bug.cgi?id=144647
1653 <rdar://problem/20829473>
1655 Reviewed by Simon Fraser.
1657 The calculation of scroll snap points was incorrect because it did not account for margins or padding.
1658 This was fixed by using the "paddingBoxRect" to represent the overall size of the view area, and
1659 subtracting the relevant padding when computing the size of the scroll snap offsets.
1661 Extend testing internals with accessor methods to retrieve string representations of the scroll snap
1662 offsets and scroll snap coordinates computed during layout. These values are used in the new
1663 'css3/scroll-snap/scroll-snap-offsets-and-coordinates.html' test.
1666 * css3/scroll-snap/scroll-snap-offsets-and-coordinates.html: Added.
1667 * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: Added.
1668 * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: Added.
1669 * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: Added.
1671 * css/LengthFunctions.h: Expose the 'valueForLength' method so we can use it in WebCoreTestSupport.
1672 * dom/Node.h: Expose the 'renderBox' method so we can use it in WebCoreTestSupport.
1673 * page/scrolling/AxisScrollSnapOffsets.cpp:
1674 (WebCore::appendChildSnapOffsets): Use 'contentBoxRect' for overall size, so that we don't use padding
1675 as part of our offset calculations.
1676 (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
1677 * rendering/RenderBox.h: Expose 'canBeScrolledAndHasScrollableArea' for use in WebCoreTestSupport.
1678 * rendering/style/RenderStyle.h: Expose 'scrollSnapCoordinates' for use in WebCoreTestSupport.
1679 * testing/Internals.cpp:
1680 (WebCore::appendOffsets): Helper function.
1681 (WebCore::Internals::scrollSnapOffsets): Added.
1682 * testing/Internals.h:
1683 * testing/Internals.idl:
1685 2015-05-06 Myles C. Maxfield <mmaxfield@apple.com>
1687 Clean up TextRun constructors
1688 https://bugs.webkit.org/show_bug.cgi?id=144712
1690 Reviewed by Zalan Bujtas.
1692 This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
1693 updates the implementations of RenderBlock::constructTextRun() to be more consistent with
1694 TextRun (via using StringViews).
1696 No new tests because there is no behavior change.
1698 * mathml/MathMLMencloseElement.cpp:
1699 (WebCore::MathMLMencloseElement::longDivLeftPadding):
1700 * platform/graphics/TextRun.h:
1701 (WebCore::TextRun::TextRun):
1702 * rendering/RenderBlock.cpp:
1703 (WebCore::RenderBlock::constructTextRun):
1704 (WebCore::constructTextRunInternal): Deleted.
1705 * rendering/RenderBlock.h:
1706 * rendering/RenderEmbeddedObject.cpp:
1707 (WebCore::RenderEmbeddedObject::paintReplaced):
1708 (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
1709 (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1710 * rendering/svg/SVGTextMetricsBuilder.cpp:
1711 (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
1712 * platform/win/DragImageWin.cpp:
1713 (WebCore::createDragImageForLink):
1715 2015-05-06 Sungmann Cho <sungmann.cho@navercorp.com>
1717 Rename URL::copy() to URL::isolatedCopy() to match String.
1718 https://bugs.webkit.org/show_bug.cgi?id=144684
1720 Reviewed by Darin Adler.
1722 No new tests, no behavior change.
1724 * Modules/websockets/WebSocketHandshake.cpp:
1725 (WebCore::WebSocketHandshake::setURL):
1726 (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
1727 * fileapi/ThreadableBlobRegistry.cpp:
1728 (WebCore::BlobRegistryContext::BlobRegistryContext):
1729 * html/parser/HTMLPreloadScanner.cpp:
1730 (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
1731 * html/parser/HTMLResourcePreloader.h:
1732 (WebCore::PreloadRequest::PreloadRequest):
1733 * html/parser/XSSAuditor.cpp:
1734 (WebCore::XSSAuditor::init):
1735 * platform/CrossThreadCopier.cpp:
1736 (WebCore::URL>::copy):
1738 (WebCore::URL::isolatedCopy):
1739 (WebCore::URL::copy): Deleted.
1741 (WebCore::URLCapture::URLCapture):
1742 * platform/network/BlobPart.h:
1743 (WebCore::BlobPart::detachFromCurrentThread):
1744 * platform/network/ResourceRequestBase.cpp:
1745 (WebCore::ResourceRequestBase::copyData):
1746 * platform/network/ResourceResponseBase.cpp:
1747 (WebCore::ResourceResponseBase::copyData):
1748 * workers/WorkerThread.cpp:
1749 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1751 2015-05-06 Commit Queue <commit-queue@webkit.org>
1753 Unreviewed, rolling out r183894.
1754 https://bugs.webkit.org/show_bug.cgi?id=144719
1756 crashes on mavericks (Requested by dino on #webkit).
1760 "Handle backdrop views that have to tile"
1761 https://bugs.webkit.org/show_bug.cgi?id=142317
1762 http://trac.webkit.org/changeset/183894
1764 2015-05-06 Jon Lee <jonlee@apple.com>
1766 CoreTextSPI.h uses wrong version number to denote Yosemite
1767 https://bugs.webkit.org/show_bug.cgi?id=144701
1769 Reviewed by Dean Jackson.
1771 * platform/spi/cocoa/CoreTextSPI.h: Should 101000 not 10100.
1773 2015-05-06 Jon Lee <jonlee@apple.com>
1775 Expose more font weights for -apple-system
1776 https://bugs.webkit.org/show_bug.cgi?id=144707
1778 Reviewed by Dean Jackson.
1780 Update to platform/mac/fast/text/systemFont.html
1782 * platform/graphics/mac/FontCacheMac.mm:
1783 (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
1785 (WebCore::fontWithFamily): Request the system font with a mapped weight on Yosemite and later.
1786 * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:], and the proper NSFontWeight
1789 2015-05-06 Dean Jackson <dino@apple.com>
1791 Handle backdrop views that have to tile
1792 https://bugs.webkit.org/show_bug.cgi?id=142317
1793 <rdar://problem/20049088>
1795 Reviewed by Simon Fraser.
1797 Make sure backdrop layers don't tile. If they are big
1798 enough, we'll leave it to the platform compositor to handle.
1800 This also fixes a bug where if a layer changed from a backdrop
1801 type to a tiled type, it would still retain its custom appearance
1802 and we'd try to add children to the wrong layer.
1804 Test: compositing/media-controls-bar-appearance-big.html
1806 * platform/graphics/ca/GraphicsLayerCA.cpp:
1807 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
1808 a layer needs a backdrop before checking if it needs to tile.
1810 2015-05-06 Carlos Garcia Campos <cgarcia@igalia.com> and Per Arne Vollan <peavo@outlook.com>
1812 [WinCairo] Compile error due to undefined symbols after r183868
1813 https://bugs.webkit.org/show_bug.cgi?id=144692
1815 Reviewed by Alex Christensen.
1817 Speculative build fix. Add dummy PlatformDisplayWin.
1819 * PlatformWinCairo.cmake: Add PlatformDisplay.cpp to compilation.
1820 * platform/graphics/PlatformDisplay.cpp:
1821 (WebCore::PlatformDisplay::createPlatformDisplay):
1822 * platform/graphics/PlatformDisplay.h:
1823 * platform/graphics/win/PlatformDisplayWin.h:
1824 Add stubs to compile.
1825 * WebCore.vcxproj/WebCore.vcxproj
1826 * WebCore.vcxproj/WebCore.vcxproj.filters
1827 Add new files to Windows build.
1829 2015-05-06 David Hyatt <hyatt@apple.com>
1831 Avoid copies in scrollOffsetForFixedPosition() and inline it.
1832 https://bugs.webkit.org/show_bug.cgi?id=144709
1834 Reviewed by Simon Fraser.
1836 * page/FrameView.cpp:
1837 (WebCore::FrameView::frameScaleFactor):
1838 Added so that scrollOffsetForFixedPosition() can be inlined without having to
1839 reference Frame's implementation.
1841 (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
1842 Moved this to the header.
1845 Inline scrollOffsetForFixedPosition() and get rid of all the copying
1848 2015-05-06 David Hyatt <hyatt@apple.com>
1850 RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
1851 https://bugs.webkit.org/show_bug.cgi?id=144708
1853 Reviewed by Simon Fraser.
1855 * rendering/RenderLayer.cpp:
1856 (WebCore::RenderLayer::currentTransform):
1858 Only compute a pixel snapped rect if we actually end up needing it. The common case
1859 is that this rect is not needed, so pushing it inside the two if statements
1860 speeds up the common case.
1862 2015-05-06 Timothy Horton <timothy_horton@apple.com>
1866 * platform/spi/cocoa/QuartzCoreSPI.h:
1868 2015-05-06 David Hyatt <hyatt@apple.com>
1870 Optimize topLeftLocationOffset() addition in updateLayerPosition
1871 https://bugs.webkit.org/show_bug.cgi?id=144704
1873 Reviewed by Dean Jackson.
1875 * page/FrameView.cpp:
1876 (WebCore::FrameView::FrameView):
1878 Move the hasFlippedBlocks bit to FrameView instead of RenderView. Works better for inlining
1879 the check in any renderer header, and it also makes more sense conceptually, since the RenderView
1880 itself could be a flipped block.
1882 * rendering/RenderBox.cpp:
1883 (WebCore::RenderBox::layoutOverflowRectForPropagation):
1884 Change over to the FrameView bit.
1886 * rendering/RenderBox.h:
1887 (WebCore::RenderBox::applyTopLeftLocationOffset):
1888 Add a new inlined function that can apply the top left location offset to a point without
1889 multiple LayoutSize creations and copies. It invokes a helper for flipping that is not
1890 inlined only in the case where actual flipped blocks exist in the render tree.
1892 * rendering/RenderBoxModelObject.cpp:
1893 (WebCore::RenderBoxModelObject::updateFromStyle):
1894 Set the bit on the FrameView now instead of the RenderView.
1896 * rendering/RenderLayer.cpp:
1897 (WebCore::RenderLayer::updateLayerPosition):
1898 Call the new applyTopLeftLocationOffset function so that the point can have offsets added
1899 in without any extra copies.
1901 (WebCore::RenderLayer::calculateClipRects):
1902 * rendering/RenderLineBoxList.cpp:
1903 (WebCore::RenderLineBoxList::rangeIntersectsRect):
1904 Switch over to the bit on the FrameView.
1906 * rendering/RenderView.cpp:
1907 (WebCore::RenderView::RenderView):
1908 * rendering/RenderView.h:
1909 Get rid of the bit on the RenderView.
1911 2015-05-05 Myles C. Maxfield <mmaxfield@apple.com>
1913 Introducing the Platform Abstraction Layer (PAL)
1914 https://bugs.webkit.org/show_bug.cgi?id=143358
1916 Reviewed by Simon Fraser.
1918 * WebCore.xcodeproj/project.pbxproj: Let the project know about the .a
1919 * Configurations/FeatureDefines.xcconfig: Updated
1921 2015-05-06 Eric Carlson <eric.carlson@apple.com>
1923 [iOS] remove some unnecessary iOS-only media code
1924 https://bugs.webkit.org/show_bug.cgi?id=144697
1925 <rdar://problem/20229914>
1927 Reviewed by Jer Noble.
1929 * html/HTMLAttributeNames.in: Remove data-youtube-id.
1931 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1932 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove dataYouTubeID.
1934 2015-05-06 David Hyatt <hyatt@apple.com>
1936 Optimize relativePositionOffset() to avoid doing unnecessary work
1937 https://bugs.webkit.org/show_bug.cgi?id=144698
1939 Reviewed by Simon Fraser.
1941 * rendering/RenderBoxModelObject.cpp:
1942 (WebCore::RenderBoxModelObject::relativePositionOffset):
1944 Patch relativePositionOffset to avoid doing unnecessary work in the common case where
1945 all values of top/left/right/bottom are either auto or fixed. We no longer fetch
1946 containingBlock() into a local always, but instead just invoke the function only
1949 Also avoid computing the percentage-relative maximum for the top/right/bottom/left lengths
1950 when they are fixed values, since that maximum won't be examined at all.
1952 2015-05-06 Martin Robinson <mrobinson@igalia.com>
1954 [FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
1955 https://bugs.webkit.org/show_bug.cgi?id=144612
1957 Reviewed by Darin Adler.
1959 No new tests. This causes fast/text/international/synthesized-italic-vertical.html to pass.
1961 * platform/graphics/Font.cpp:
1962 (WebCore::Font::nonSyntheticItalicFont): Compile this method for Cairo as well.
1963 * platform/graphics/FontCascadeFonts.cpp:
1964 (WebCore::FontCascadeFonts::glyphDataForSystemFallback): When searching for the system fallback,
1965 ensure that we do not use synthetic oblique when rendering vertical CJK glyphs.
1966 (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Extend the CJK fix to Cairo ports.
1967 * platform/graphics/FontPlatformData.h:
1968 (WebCore::FontPlatformData::setSyntheticOblique): Added this helper method, because
1969 Freetype/Cairo ports needs to be able to recreate the scaled font matrix when the
1970 synthetic oblique settings changes.
1971 * platform/graphics/freetype/FontPlatformData.h: Rename initializeWithFontFace to buildScaledFont.
1972 Remove the now unused m_horizontalOrientationMatrix member.
1973 (WebCore::FontPlatformData::setSyntheticOblique): Added the helper here as well.
1974 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1975 (WebCore::FontPlatformData::FontPlatformData): Calculate whether or not to use synthetic oblique here,
1976 before buildScaledFont is called. Call buildScaledFont instead of initializeWithFontFace.
1977 (WebCore::FontPlatformData::operator=):
1978 (WebCore::FontPlatformData::buildScaledFont): Renamed from initializeWithFontFace, does
1979 the same thing, except calculate whether or not to use synthetic oblique. Instead just
1981 (WebCore::FontPlatformData::setOrientation): Instead of adjusting the font matrix, recreate
1983 (WebCore::FontPlatformData::setSyntheticOblique): Added.
1984 (WebCore::rotateCairoMatrixForVerticalOrientation): Deleted.
1985 (WebCore::FontPlatformData::initializeWithFontFace): Deleted.
1987 2015-05-06 Alex Christensen <achristensen@webkit.org>
1989 [Content Extensions] Test splitting NFAs by max NFA size.
1990 https://bugs.webkit.org/show_bug.cgi?id=144659
1992 Reviewed by Darin Adler.
1994 * WebCore.xcodeproj/project.pbxproj:
1995 * contentextensions/CombinedURLFilters.cpp:
1996 (WebCore::ContentExtensions::generateNFAForSubtree):
1997 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1998 * contentextensions/CombinedURLFilters.h:
1999 * contentextensions/ContentExtensionCompiler.cpp:
2000 (WebCore::ContentExtensions::compileRuleList):
2001 * contentextensions/DFABytecodeCompiler.h:
2002 * contentextensions/DFABytecodeInterpreter.h:
2003 Make maxNFASize a parameter so we can test it with small values.
2005 2015-05-06 Antti Koivisto <antti@apple.com>
2007 REGRESSION (r183467): Unable to start downloads in private browsing mode
2008 https://bugs.webkit.org/show_bug.cgi?id=144533
2010 Reviewed by Darin Adler.
2012 If willSendRequest delegate mutated the request we would lose the requester field value from the original.
2014 No test runner support for mutating requests.
2016 * platform/network/cf/ResourceRequestCFNet.cpp:
2017 (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2019 This needs to keep the requester too.
2021 * platform/network/cocoa/ResourceRequestCocoa.mm:
2022 (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
2024 Share implementations.
2026 2015-05-06 Ryosuke Niwa <rniwa@webkit.org>
2028 Toggling underline on font panel removes strike through
2029 https://bugs.webkit.org/show_bug.cgi?id=144670
2030 <rdar://problem/3790443>
2032 Reviewed by Darin Adler.
2034 * editing/EditingStyle.cpp:
2035 (WebCore::EditingStyle::EditingStyle): Added a variant that takes CSSStyleDeclaration.
2036 * editing/EditingStyle.h:
2037 (WebCore::EditingStyle::create): Ditto.
2038 * editing/Editor.cpp:
2039 (WebCore::Editor::applyStyleToSelection): Takes Ref<EditingStyle>&& instead of RefPtr<EditingStyle>&&.
2041 * editing/EditorCommand.cpp:
2042 (WebCore::applyCommandToFrame): Ditto.
2043 (WebCore::executeStrikethrough):
2044 (WebCore::executeUnderline):
2046 2015-05-06 Jessie Berlin <jberlin@webkit.org>
2050 * page/mac/TextIndicatorWindow.mm:
2052 2015-05-06 Jessie Berlin <jberlin@webkit.org>
2054 32-bit build fix after r183859 and r183860.
2056 * page/mac/TextIndicatorWindow.mm:
2057 Autosynthesis isn't available for our 32-bit builds.
2059 2015-05-06 Carlos Garcia Campos <cgarcia@igalia.com>
2061 [EGL] Move EGLDisplay handling to PlatformDisplay and remove PlatformDisplay definition from GLDefs.h
2062 https://bugs.webkit.org/show_bug.cgi?id=144685
2064 Reviewed by Martin Robinson.
2066 The EGL display is also initialized in multiple places, and could
2067 be unified in PlatformDisplay. Remove the PlatformDisplay
2068 definition from platform/graphics/opengl/GLDefs.h to avoid conflicts.
2070 * platform/graphics/PlatformDisplay.cpp:
2071 (WebCore::PlatformDisplay::PlatformDisplay): Initialize m_eglDisplay.
2072 (WebCore::PlatformDisplay::~PlatformDisplay): Call terminateEGLDisplay().
2073 (WebCore::PlatformDisplay::eglDisplay): Lazy intialize the EGL
2074 display and return it.
2075 (WebCore::PlatformDisplay::initializeEGLDisplay):
2076 (WebCore::PlatformDisplay::terminateEGLDisplay):
2077 * platform/graphics/PlatformDisplay.h:
2078 * platform/graphics/egl/GLContextEGL.cpp:
2079 (WebCore::sharedEGLDisplay): Use PlatformDisplay::eglDisplay().
2080 * platform/graphics/opengl/GLDefs.h: Remove unneeded definitions.
2081 * platform/graphics/opengl/GLPlatformSurface.cpp:
2082 (WebCore::GLPlatformSurface::GLPlatformSurface): Remove
2083 m_sharedDisplay member, PlatformDisplay::sharedDisplay() can be used instead.
2084 (WebCore::GLPlatformSurface::sharedDisplay): Deleted.
2085 * platform/graphics/opengl/GLPlatformSurface.h:
2086 * platform/graphics/surfaces/egl/EGLConfigSelector.h: Use
2087 EGLDisplay instead of PlatformDisplay.
2088 * platform/graphics/surfaces/egl/EGLContext.cpp:
2089 (WebCore::EGLOffScreenContext::initialize): Use PlatformDisplay::eglDisplay().
2090 * platform/graphics/surfaces/egl/EGLHelper.cpp: Remove the
2091 EGLDisplayConnection clas and use PlatformDisplay instead.
2092 (WebCore::EGLHelper::eglDisplay):
2093 (WebCore::EGLHelper::currentDisplay):
2094 (WebCore::EGLDisplayConnection::EGLDisplayConnection): Deleted.
2095 (WebCore::EGLDisplayConnection::~EGLDisplayConnection): Deleted.
2096 (WebCore::EGLDisplayConnection::display): Deleted.
2097 (WebCore::EGLDisplayConnection::terminate): Deleted.
2098 * platform/graphics/surfaces/egl/EGLHelper.h:
2099 * platform/graphics/surfaces/egl/EGLSurface.cpp:
2100 (WebCore::EGLTransportSurface::EGLTransportSurface): Use EGLHelper::eglDisplay().
2101 (WebCore::EGLTransportSurface::destroy): Ditto.
2102 (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Ditto.
2103 (WebCore::EGLOffScreenSurface::destroy): Ditto.
2104 * platform/graphics/surfaces/egl/EGLXSurface.cpp:
2105 (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
2106 Use PlatformDisplay::eglDisplay().
2107 (WebCore::EGLWindowTransportSurface::swapBuffers): Ditto.
2108 (WebCore::EGLPixmapSurface::EGLPixmapSurface): Ditto.
2109 * platform/graphics/surfaces/glx/GLXContext.cpp:
2110 (WebCore::GLXOffScreenContext::initialize): Use X11Helper::nativeDisplay().
2111 * platform/graphics/surfaces/glx/GLXSurface.cpp:
2112 (WebCore::GLXTransportSurface::GLXTransportSurface): Do not use m_sharedDisplay.
2113 (WebCore::GLXOffScreenSurface::initialize): Ditto.
2114 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
2115 (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Call
2116 PlatformDisplay::initializeEGLDisplay() to insialize the EGL display.
2117 * platform/graphics/wayland/PlatformDisplayWayland.h:
2118 * platform/graphics/x11/PlatformDisplayX11.cpp:
2119 (WebCore::PlatformDisplayX11::initializeEGLDisplay): Override
2120 PlatformDisplay::initializeEGLDisplay() to initialize the
2121 m_eglDisplay member.
2122 * platform/graphics/x11/PlatformDisplayX11.h:
2124 2015-05-06 Joseph Pecoraro <pecoraro@apple.com>
2126 Web Inspector: DOMStorage exception and issue with sessionStorage
2127 https://bugs.webkit.org/show_bug.cgi?id=144646
2129 Reviewed by Timothy Hatcher.
2131 * inspector/InspectorDOMStorageAgent.cpp:
2132 (WebCore::InspectorDOMStorageAgent::findStorageArea):
2133 Return session storage if the identifier says not local storage.
2135 2015-05-06 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2137 Move ReadableStreamJSSource.h/.cpp to ReadableJSStream.h/.cpp
2138 https://bugs.webkit.org/show_bug.cgi?id=144567
2140 Reviewed by Darin Adler.
2142 In addition to renaming ReadableStreamJSSource.h/.cpp, ReadableStreamJSSource is now made a private class of
2143 ReadableJSStream, called ReadableJSStream::Source.
2144 Made some minor refactoring (passing some ExecState by ref and not by pointer).
2145 No functional change, existing tests cover the changes.
2147 * bindings/js/JSReadableStreamCustom.cpp:
2148 * bindings/js/ReadableJSStream.cpp:
2149 (WebCore::ReadableJSStream::Source::create):
2150 (WebCore::ReadableJSStream::Source::Source):
2151 (WebCore::ReadableJSStream::Source::~Source):
2152 (WebCore::ReadableJSStream::Source::globalObject):
2153 (WebCore::ReadableJSStream::Source::start):
2154 (WebCore::ReadableJSStream::create):
2155 (WebCore::ReadableJSStream::ReadableJSStream):
2156 * bindings/js/ReadableJSStream.h:
2158 2015-05-05 Tim Horton <timothy_horton@apple.com>
2160 REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
2161 https://bugs.webkit.org/show_bug.cgi?id=144651
2162 <rdar://problem/20755722>
2164 * page/mac/TextIndicatorWindow.mm:
2165 Fix an incorrectly-applied review comment.
2167 2015-05-05 Timothy Horton <timothy_horton@apple.com>
2169 REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
2170 https://bugs.webkit.org/show_bug.cgi?id=144651
2171 <rdar://problem/20755722>
2173 Reviewed by Dan Bernstein.
2175 * page/mac/TextIndicatorWindow.h:
2176 * page/mac/TextIndicatorWindow.mm:
2177 (WebCore::TextIndicatorWindow::clearTextIndicator):
2178 (WebCore::TextIndicatorWindow::setTextIndicator):
2179 (WebCore::TextIndicatorWindow::closeWindow):
2180 (WebCore::TextIndicatorWindow::startFadeOut):
2181 We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
2182 Keep it on the WebTextIndicatorView instead.
2184 2015-05-05 Žan Doberšek <zdobersek@igalia.com>
2186 Add missing vtable override specifiers under Source/WebCore/html
2187 https://bugs.webkit.org/show_bug.cgi?id=144578
2189 Reviewed by Daniel Bates.
2191 Update virtual method overrides under Source/WebCore/html
2192 which are missing the override specifier.
2194 * html/canvas/WebGL2RenderingContext.h:
2195 * html/canvas/WebGLRenderingContext.h:
2196 * html/track/InbandTextTrack.h:
2197 * html/track/TrackListBase.h:
2199 2015-05-05 Žan Doberšek <zdobersek@igalia.com>
2201 Add missing vtable override specifiers under Source/WebCore/rendering
2202 https://bugs.webkit.org/show_bug.cgi?id=144570
2204 Reviewed by Darin Adler.
2206 Update virtual method overrides under Source/WebCore/rendering
2207 which are missing the override specifiers.
2209 * rendering/InlineTextBox.h:
2210 (WebCore::InlineTextBox::calculateBoundaries): Deleted.
2211 * rendering/RenderFlowThread.h:
2212 * rendering/RenderMedia.h:
2213 (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics): Deleted.
2214 * rendering/RenderMultiColumnSet.h:
2215 * rendering/RenderRegion.h:
2216 * rendering/RenderRegionSet.h:
2217 * rendering/RenderThemeGtk.h:
2218 * rendering/mathml/RenderMathMLOperator.h:
2219 * rendering/svg/RenderSVGBlock.h:
2221 2015-05-05 Žan Doberšek <zdobersek@igalia.com>
2223 Add missing vtable override specifiers under Source/WebCore/Modules
2224 https://bugs.webkit.org/show_bug.cgi?id=144569
2226 Reviewed by Darin Adler.
2228 Update virtual method overrides under Source/WebCore/Modules
2229 which are missing the override specifier.
2231 * Modules/mediasource/SourceBuffer.h:
2232 * Modules/mediastream/MediaStreamTrack.h:
2233 * Modules/mediastream/RTCVoidRequestImpl.h:
2234 * Modules/webaudio/AudioContext.h:
2235 (WebCore::AudioContext::mediaType): Deleted.
2236 (WebCore::AudioContext::presentationType): Deleted.
2237 (WebCore::AudioContext::canReceiveRemoteControlCommands): Deleted.
2238 (WebCore::AudioContext::didReceiveRemoteControlCommand): Deleted.
2239 (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Deleted.
2240 * Modules/webaudio/MediaStreamAudioDestinationNode.h:
2241 * Modules/webaudio/MediaStreamAudioSourceNode.h:
2242 * Modules/webaudio/WaveShaperDSPKernel.h:
2243 * Modules/websockets/WebSocketChannel.h:
2244 (WebCore::WebSocketChannel::refThreadableWebSocketChannel): Deleted.
2245 (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): Deleted.
2246 * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2247 (WebCore::WorkerThreadableWebSocketChannel::refThreadableWebSocketChannel): Deleted.
2248 (WebCore::WorkerThreadableWebSocketChannel::derefThreadableWebSocketChannel): Deleted.
2250 2015-05-05 Žan Doberšek <zdobersek@igalia.com>
2252 EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initialized
2253 https://bugs.webkit.org/show_bug.cgi?id=144583
2255 Reviewed by Daniel Bates.
2257 * page/EventHandler.cpp:
2258 (WebCore::EventHandler::EventHandler): The
2259 m_eventHandlerWillResetCapturingMouseEventsElement is a boolean,
2260 so initialize it to false, instead of to nullptr.
2262 2015-05-05 Manuel Rego Casasnovas <rego@igalia.com>
2264 [CSS Grid Layout] grid-template-areas should accept none value
2265 https://bugs.webkit.org/show_bug.cgi?id=144624
2267 Reviewed by Darin Adler.
2269 Default value for grid-template-areas property is "none":
2270 http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
2272 Currently if you set the property to "none" from JavaScript, the value
2273 doesn't get reseted and it keeps the old value.
2275 Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
2278 * css/CSSParser.cpp:
2279 (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
2280 "none" successfully.
2282 2015-05-05 Zalan Bujtas <zalan@apple.com>
2284 Remove unused RenderLayerBacking::hasContentsLayer().
2285 https://bugs.webkit.org/show_bug.cgi?id=144658
2287 Reviewed by Simon Fraser.
2289 No change in functionality.
2291 * rendering/RenderLayerBacking.h:
2293 2015-05-05 Alex Christensen <achristensen@webkit.org>
2295 [Content Extensions] Limit NFA size.
2296 https://bugs.webkit.org/show_bug.cgi?id=144649
2298 Reviewed by Benjamin Poulain.
2300 * contentextensions/CombinedURLFilters.cpp:
2301 (WebCore::ContentExtensions::generateNFAForSubtree):
2302 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2303 Add a maximum NFA size to ensure that we do not use too much memory when compiling.
2304 * contentextensions/ContentExtensionCompiler.cpp:
2305 (WebCore::ContentExtensions::compileRuleList):
2306 Remove debugging code that doesn't compile any more.
2308 2015-05-05 Roger Fong <roger_fong@apple.com>
2310 Unreviewed. Some assertion failures in compositing code after r183820.
2311 https://bugs.webkit.org/show_bug.cgi?id=144630.
2313 * rendering/RenderLayerCompositor.cpp:
2314 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2316 2015-05-05 Timothy Horton <timothy_horton@apple.com>
2318 Add a layout mode for computing fixed layout size from a minimum size
2319 https://bugs.webkit.org/show_bug.cgi?id=144610
2320 <rdar://problem/19790341>
2322 Reviewed by Simon Fraser.
2324 * platform/spi/cocoa/QuartzCoreSPI.h:
2327 2015-05-05 Brent Fulgham <bfulgham@apple.com>
2329 iOS] Scroll snap points trigger reentrant layout
2330 https://bugs.webkit.org/show_bug.cgi?id=144644
2331 <rdar://problem/20366547>
2333 Reviewed by Simon Fraser.
2335 Covered by scroll-snap-mandatory.html test.
2337 We had an iOS code path in 'appendChildSnapOffsets' that used offsetLeft and offsetTop. This code
2338 was sometimes called during layout, which triggered a reentrant layout call, resulting in a debug
2341 * page/scrolling/AxisScrollSnapOffsets.cpp:
2342 (WebCore::appendChildSnapOffsets): Remove iOS codepath.
2344 2015-05-05 Roger Fong <roger_fong@apple.com>
2346 Blurry media control icons on non retina displays.
2347 https://bugs.webkit.org/show_bug.cgi?id=144638.
2348 <rdar://problem/20526166>
2350 Reviewed by Dean Jackson.
2352 * Modules/mediacontrols/mediaControlsApple.css:
2353 Adjust fullscreen buttons so that they look good on both 1x and 2x displays.
2354 (audio::-webkit-media-controls-fullscreen-button):
2355 (audio::-webkit-media-controls-fullscreen-button.exit):
2356 (audio::-webkit-media-controls-fullscreen-button:active):
2357 (audio::-webkit-media-controls-panel button.exit:active):
2358 Handle wireless playback picker button background in mediaControlsApple.js
2359 (audio::-webkit-media-controls-wireless-playback-picker-button):
2360 (audio::-webkit-media-controls-wireless-playback-picker-button.playing): Deleted.
2362 * Modules/mediacontrols/mediaControlsApple.js:
2363 Update wireless playback picker button based on display type.
2364 (Controller.prototype.UIString):
2365 (Controller.prototype.handleReadyStateChange):
2366 (Controller.prototype.updateWirelessTargetPickerButton):
2367 (Controller.prototype.updateWirelessPlaybackStatus):
2369 2015-05-05 Joseph Pecoraro <pecoraro@apple.com>
2371 Web Inspector: Crash under WebCore::domWindowFromExecState reloading page with inspector open
2372 https://bugs.webkit.org/show_bug.cgi?id=144636
2374 Reviewed by Mark Lam.
2376 This ensures we create an InjectedScript for the execution context
2377 (frame) preventing the global object / exec state from getting garbage
2378 collected before we remove it from our map.
2380 * inspector/PageRuntimeAgent.cpp:
2381 (WebCore::PageRuntimeAgent::notifyContextCreated):
2383 2015-05-05 Dean Jackson <dino@apple.com>
2385 [iOS] AirPlay placeholder in inline videos uses Helvetica or Times, should be system font
2386 https://bugs.webkit.org/show_bug.cgi?id=144643
2388 Reviewed by Brent Fulgham.
2390 The Airplay placard should use "-apple-system" as a font-family.
2392 * Modules/mediacontrols/mediaControlsiOS.css:
2393 (audio::-webkit-media-controls-wireless-playback-status):
2395 2015-05-05 Zalan Bujtas <zalan@apple.com>
2397 Navigating to www.apple.com hits assertion in WebCore::TextIteratorCopyableText::set()
2398 https://bugs.webkit.org/show_bug.cgi?id=144629
2399 rdar://problem/20689877
2401 Reviewed by Andreas Kling.
2403 This patch ensures that we don't emit empty text for the text iterator.
2404 In TextIterator::handleTextNode before emitting a string, certain characters (\n \t) need to
2405 be replaced with space. When such character is found, we emit the string we've processed so far and
2406 handle the replacement during the next callback.
2407 When the first character in the string needs replacing, there's nothing to emit. However if we don't
2408 handle at least one character, TextIterator::advance believes that processing is done and never calls
2409 TextIterator::handleTextNode back with the rest of the string.
2411 Test: fast/text/simple-line-layout-innerText-with-newline.html
2413 * editing/TextIterator.cpp:
2414 (WebCore::isNewLineOrTabCharacter):
2415 (WebCore::TextIterator::handleTextNode):
2417 2015-05-05 Alex Christensen <achristensen@webkit.org>
2419 [Content Extensions] Use less memory to store the json input.
2420 https://bugs.webkit.org/show_bug.cgi?id=144604
2422 Reviewed by Benjamin Poulain.
2424 * contentextensions/ContentExtensionCompiler.cpp:
2425 (WebCore::ContentExtensions::compileRuleList):
2426 * contentextensions/ContentExtensionCompiler.h:
2427 (WebCore::ContentExtensions::loadEncodedRules):
2428 Don't copy strings as much or keep them alive after done using them.
2430 2015-05-05 Eric Carlson <eric.carlson@apple.com>
2432 Prevent recursive calls to show target picker menu.
2433 https://bugs.webkit.org/show_bug.cgi?id=144637
2434 <rdar://problem/20824726>
2436 Reviewed by Jer Noble.
2438 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Add m_showingMenu.
2439 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2440 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Do nothing if the menu
2443 2015-05-05 Dean Jackson <dino@apple.com>
2445 Use system blue for Airplay Glyph
2446 https://bugs.webkit.org/show_bug.cgi?id=144614
2448 There was a typo in the last commit.
2450 * Modules/mediacontrols/mediaControlsiOS.css:
2451 (audio::-webkit-media-controls-optimized-fullscreen-button): Transition duration should be 250ms.
2453 2015-05-04 Dean Jackson <dino@apple.com>
2455 [iOS] Use system blue for Airplay Glyph
2456 https://bugs.webkit.org/show_bug.cgi?id=144614
2458 Reviewed by Eric Carlson.
2460 Revert to using masks for the glyphs in the media controls,
2462 - use the system blue color when Airplay is active <rdar://problem/20245297>
2463 - fade out from the active state <rdar://problem/20245487>
2464 - allow the play button to give touch feedback <rdar://problem/17849930>
2466 While those are three separate bugs, they all get addressed by
2469 * Modules/mediacontrols/mediaControlsiOS.css:
2470 (audio::-webkit-media-controls-optimized-fullscreen-button):
2471 (audio::-webkit-media-controls-optimized-fullscreen-button:active):
2472 (video::-webkit-media-controls-play-button):
2473 (video::-webkit-media-controls-play-button.paused):
2474 (video::-webkit-media-controls-fullscreen-button):
2475 (video::-webkit-media-controls-wireless-playback-picker-button):
2476 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
2477 (video::-webkit-media-controls-optimized-fullscreen-button):
2478 (video::-webkit-media-controls-play-button:active): Deleted.
2479 (video::-webkit-media-controls-play-button.paused:active): Deleted.
2480 (video::-webkit-media-controls-fullscreen-button:active): Deleted.
2481 (video::-webkit-media-controls-wireless-playback-picker-button:active): Deleted.
2483 2015-05-05 Eric Carlson <eric.carlson@apple.com>
2485 Only autoplay videos should not automatically play to playback target
2486 https://bugs.webkit.org/show_bug.cgi?id=144633
2488 Reviewed by Jer Noble.
2490 * html/HTMLMediaElement.cpp:
2491 (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequireUserGestureToAutoplayToExternalDevice.
2492 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Remove
2493 RequireUserGestureToAutoplayToExternalDevice.
2494 (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate if playback
2495 was started from a user gesture, even if the video loops and/or doesn't have audio.
2497 * html/HTMLMediaSession.h: Define RequireUserGestureToAutoplayToExternalDevice.
2498 (WebCore::HTMLMediaSession::hasBehaviorRestriction): New.
2500 2015-05-05 Brent Fulgham <bfulgham@apple.com>
2502 Unreviewed logging fix.
2504 * page/WheelEventTestTrigger.cpp:
2505 (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Fix typo in logging channel.
2507 2015-05-04 Roger Fong <roger_fong@apple.com>
2509 Media control volume slider is opaque.
2510 https://bugs.webkit.org/show_bug.cgi?id=144470.
2511 <rdar://problem/20770350>
2513 Rubberstamped by Simon Fraser.
2515 * Modules/mediacontrols/mediaControlsApple.css:
2516 (audio::-webkit-media-controls-panel):
2517 Don't create a stacking context just for the controls.
2518 Doing so causes the mix-blend-mode on the volume box to fail.
2520 2015-05-05 Alex Christensen <achristensen@webkit.org>
2522 [Content Extensions] Combine NFAs properly and free memory as we compile.
2523 https://bugs.webkit.org/show_bug.cgi?id=144485
2525 Reviewed by Benjamin Poulain.
2527 This patch correctly combines all regular expressions with a common prefix up to
2528 the last quantified term into the same NFA. It also deletes the prefix tree as it
2529 creates NFAs, thus reducing the maximum memory used when compiling.
2531 * contentextensions/CombinedURLFilters.cpp:
2532 (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
2533 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
2534 (WebCore::ContentExtensions::generateNFAForSubtree):
2535 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2536 (WebCore::ContentExtensions::CombinedURLFilters::clear): Deleted.
2537 * contentextensions/CombinedURLFilters.h:
2538 * contentextensions/ContentExtensionCompiler.cpp:
2539 (WebCore::ContentExtensions::compileRuleList):
2540 * contentextensions/ContentExtensionsDebugging.h:
2542 2015-05-04 Alex Christensen <achristensen@webkit.org>
2544 [Content Extensions] Use less memory when writing byte code to file
2545 https://bugs.webkit.org/show_bug.cgi?id=144602
2547 Reviewed by Darin Adler.
2549 * contentextensions/ContentExtensionCompiler.cpp:
2550 (WebCore::ContentExtensions::compileRuleList):
2551 * contentextensions/ContentExtensionCompiler.h:
2552 Compile one DFA at a time so we don't need to keep all the bytecode in memory at the same time.
2553 * contentextensions/DFABytecodeInterpreter.cpp:
2554 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2555 Jumps are now relative to the current DFA because we don't know about other DFAs that
2556 have been compiling when linking the DFA bytecode. This will also make the DFA bytecode
2557 easier to minimize because more of the values are small in the DFAs after the first DFA.
2558 * platform/FileSystem.h:
2560 2015-05-05 Csaba Osztrogonác <ossy@webkit.org>
2562 Unreviewed, speculative WinCairo buildfix after r183807.
2564 * WebCore.vcxproj/WebCore.vcxproj:
2565 * WebCore.vcxproj/WebCore.vcxproj.filters:
2567 2015-05-05 Csaba Osztrogonác <ossy@webkit.org>
2569 Remove TextureMapperImageBuffer
2570 https://bugs.webkit.org/show_bug.cgi?id=143561
2572 Reviewed by Žan Doberšek.
2575 * PlatformEfl.cmake:
2576 * PlatformGTK.cmake:
2577 * PlatformWinCairo.cmake:
2578 * platform/graphics/GraphicsContext3DPrivate.cpp:
2579 (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2580 * platform/graphics/cairo/ImageBufferCairo.cpp:
2581 (WebCore::ImageBufferData::paintToTextureMapper):
2582 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2583 (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2584 * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Removed.
2585 * platform/graphics/texmap/BitmapTextureImageBuffer.h: Removed.
2586 * platform/graphics/texmap/BitmapTexturePool.cpp:
2587 (WebCore::BitmapTexturePool::createTexture):
2588 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2589 (WebCore::GraphicsLayerTextureMapper::setFilters):
2590 * platform/graphics/texmap/TextureMapper.cpp:
2591 (WebCore::TextureMapper::create):
2592 (WebCore::TextureMapper::TextureMapper):
2593 * platform/graphics/texmap/TextureMapper.h:
2594 (WebCore::TextureMapper::accelerationMode): Deleted.
2595 * platform/graphics/texmap/TextureMapperGL.cpp:
2596 (WebCore::TextureMapperGL::TextureMapperGL):
2597 * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
2598 * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
2599 * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2600 (WebCore::CompositingCoordinator::CompositingCoordinator):
2601 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2602 (WebCore::GraphicsLayer::supportsContentsTiling):
2603 (WebCore::CoordinatedGraphicsLayer::setShouldSupportContentsTiling): Deleted.
2604 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2606 2015-05-05 Javier Fernandez <jfernandez@igalia.com>
2608 [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
2609 https://bugs.webkit.org/show_bug.cgi?id=144443
2611 Reviewed by Darin Adler.
2613 Upgrade the align-content property to the last CSS3 Box
2614 Alignment specification. As it uses a different enumeration for
2615 Positional and Distribution alignment, it implies some changes in
2616 the FlexibleBox implementation.
2618 Test: css3/parse-align-content.html
2620 * css/CSSComputedStyleDeclaration.cpp:
2621 (WebCore::resolveContentAlignmentAuto):
2622 (WebCore::ComputedStyleExtractor::propertyValue):
2623 * css/CSSParser.cpp:
2624 (WebCore::isValidKeywordPropertyAndValue):
2625 (WebCore::isKeywordPropertyID):
2626 (WebCore::CSSParser::parseValue):
2627 * css/CSSPropertyNames.in:
2628 * rendering/RenderFlexibleBox.cpp:
2629 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2630 (WebCore::RenderFlexibleBox::layoutColumnReverse):
2631 (WebCore::initialAlignContentOffset):
2632 (WebCore::alignContentSpaceBetweenChildren):
2633 (WebCore::RenderFlexibleBox::alignFlexLines):
2634 * rendering/style/RenderStyle.cpp:
2635 (WebCore::RenderStyle::resolveContentAlignment):
2636 (WebCore::RenderStyle::resolveContentJustification):
2637 * rendering/style/RenderStyle.h:
2638 * rendering/style/StyleRareNonInheritedData.cpp:
2639 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2640 (WebCore::StyleRareNonInheritedData::operator==):
2641 * rendering/style/StyleRareNonInheritedData.h:
2643 2015-05-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2645 streams/readable-stream.html is very flaky
2646 https://bugs.webkit.org/show_bug.cgi?id=144455
2648 Reviewed by Darin Adler.
2650 Changed the link between readadable stream and controller.
2651 Controller ref()/deref() now increments/decrements its stream ref counter.
2652 This ensures that even if JS scripts do not keep track of the readable stream,
2653 the readable stream will not be disposed as long as the JS script has access to its controller.
2655 Test: streams/readable-stream-gc.html
2657 * Modules/streams/ReadableStreamController.h:
2658 (WebCore::ReadableStreamController::ReadableStreamController):
2659 (WebCore::ReadableStreamController::ref):
2660 (WebCore::ReadableStreamController::deref):
2661 (WebCore::ReadableStreamController::create): Deleted.
2662 (WebCore::ReadableStreamController::stream): Deleted.
2663 * bindings/js/JSReadableStreamControllerCustom.cpp:
2664 (WebCore::JSReadableStreamController::close):
2665 (WebCore::JSReadableStreamController::enqueue):
2666 (WebCore::JSReadableStreamController::error):
2667 * bindings/js/ReadableStreamJSSource.cpp:
2668 (WebCore::ReadableStreamJSSource::~ReadableStreamJSSource):
2669 (WebCore::ReadableStreamJSSource::start):
2670 (WebCore::ReadableJSStream::jsController):
2671 * bindings/js/ReadableStreamJSSource.h:
2673 2015-05-05 Myles C. Maxfield <mmaxfield@apple.com>
2675 Small cleanup in RenderText::computePreferredLogicalWidths()
2676 https://bugs.webkit.org/show_bug.cgi?id=144615
2678 Reviewed by Simon Fraser.
2680 A little bit of cleanup before I tackle dependent widths in this function.
2682 No new tests because there is no behavior change.
2684 * rendering/RenderText.cpp:
2685 (WebCore::RenderText::computePreferredLogicalWidths):
2687 2015-05-05 Joanmarie Diggs <jdiggs@igalia.com>
2689 [ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work
2690 https://bugs.webkit.org/show_bug.cgi?id=143083
2692 Reviewed by Chris Fleizach.
2694 The main platform difference was that ATK was mapping the td element to
2695 the accessible table cell, and the render block resulting from the style
2696 wound up being the cell parent. In contrast, AX API was mapping the cell
2697 element to an AXGroup which was a child of the AXCell. Rather than try to
2698 bend yet another case to the will of our individual platforms' table needs,
2699 it made more sense to clean up the code that is competing and move toward
2700 more platform-unified handling. This is the first step in that direction,
2701 with ATK moving closer toward the WebCore/AX API mapping.
2703 No new tests. Instead, modified and fixed the test which was being skipped
2704 for GTK, and also updated the expectations of some Mac tests whose FIXMEs
2705 should now be fixed.
2707 * accessibility/AccessibilityNodeObject.cpp:
2708 (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2709 * accessibility/AccessibilityRenderObject.cpp:
2710 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2711 * accessibility/AccessibilityTable.cpp:
2712 (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2713 * accessibility/AccessibilityTableCell.cpp:
2714 (WebCore::AccessibilityTableCell::determineAccessibilityRole):
2715 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2716 (createAccessibilityRoleMap):
2718 2015-05-04 Jer Noble <jer.noble@apple.com>
2720 [iOS] Videos on apple.com flash when touching to show or hide the controls
2721 https://bugs.webkit.org/show_bug.cgi?id=144598
2723 Reviewed by Eric Carlson.
2725 The apple.com site will add a "selection" rectangle atop a playing video when it recieves a touchstart
2726 event. The default media controls use touchstart to signal the controls to become visible. Stop the touch
2727 from propagating down to the page in this case.
2729 * Modules/mediacontrols/mediaControlsiOS.js:
2730 (ControllerIOS.prototype.handleWrapperTouchStart):
2732 2015-05-04 Andreas Kling <akling@apple.com>
2734 Record the reference time when Performance is constructed.
2735 <https://webkit.org/b/144616>
2737 Reviewed by Geoffrey Garen.
2739 This is a merge of Blink's r156613 by simonjam@chromium.org.
2741 Cache a copy of the DocumentLoader's reference timestamp when constructing
2742 the Performance object. That way we don't have to jump through a bunch of scary
2743 hoops to access it when now() is called later on.
2745 * page/Performance.cpp:
2746 (WebCore::Performance::Performance):
2747 (WebCore::Performance::now): Deleted.
2748 * page/Performance.h:
2750 2015-05-04 Simon Fraser <simon.fraser@apple.com>
2752 Fix assertions in WK1 tests after r183777.
2754 Two issues with the original change:
2756 If not in compositing mode, we shouldn't schedule layer flushes, since
2757 Document::documentWillSuspendForPageCache() only only calls cancelCompositingLayerUpdate()
2758 if in compositing mode.
2760 Second, RenderLayerCompositor::rootBackgroundTransparencyChanged() never stored the
2761 new color, resulting in too many triggered compositing updates.
2763 * rendering/RenderLayerCompositor.cpp:
2764 (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
2766 2015-05-04 Zalan Bujtas <zalan@apple.com>
2768 RenderWidget::setWidgetGeometry() can end up destroying *this*.
2769 https://bugs.webkit.org/show_bug.cgi?id=144601
2771 Reviewed by Andreas Kling.
2773 This is a speculative fix to ensure we don't crash on an invalid *this* renderer
2774 while flattening the current iframe.
2775 Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
2776 While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
2777 frame flattening initiates this action in the middle of layout.
2778 This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
2779 when frame flattening is in use.
2781 * rendering/RenderFrameBase.cpp:
2782 (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
2783 * rendering/RenderObject.cpp:
2784 (WebCore::RenderObject::destroy):
2785 * rendering/FrameView.cpp:
2786 (WebCore::FrameView::layout):
2787 * rendering/RenderView.h:
2788 * rendering/RenderWidget.cpp:
2789 (WebCore::RenderWidget::~RenderWidget):
2790 * rendering/RenderWidget.h:
2791 (WebCore::RenderWidget::ref):
2792 (WebCore::RenderWidget::deref):
2794 2015-05-04 Doug Russell <d_russell@apple.com>
2796 AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
2797 https://bugs.webkit.org/show_bug.cgi?id=144489
2799 Reviewed by Chris Fleizach.
2801 Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
2802 on the returned control.
2803 Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
2804 Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
2805 Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
2806 Add support for setSelectedVisibleTextRange() in accessibility tests.
2808 Test: platform/mac/accessibility/selection-sync.html
2810 * accessibility/AXObjectCache.cpp:
2811 (WebCore::AXObjectCache::showIntent):
2812 (WebCore::AXObjectCache::setTextSelectionIntent):
2813 (WebCore::AXObjectCache::setIsSynchronizingSelection):
2814 (WebCore::AXObjectCache::postTextStateChangeNotification):
2815 * accessibility/AXObjectCache.h:
2816 * accessibility/AXTextStateChangeIntent.h:
2817 (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2818 * accessibility/AccessibilityRenderObject.cpp:
2819 (WebCore::setTextSelectionIntent):
2820 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2821 (WebCore::AccessibilityRenderObject::setFocused):
2822 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2823 (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
2824 * accessibility/mac/AXObjectCacheMac.mm:
2825 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2827 2015-05-04 Eric Carlson <eric.carlson@apple.com>
2829 [Mac] Audio-only files should not have a device picker
2830 https://bugs.webkit.org/show_bug.cgi?id=144606
2831 <rdar://problem/20806387>
2833 Reviewed by Dean Jackson.
2835 * Modules/mediacontrols/mediaControlsApple.js:
2836 (Controller.prototype.hasVideo): New.
2837 (Controller.prototype.updateFullscreenButtons): Use hasVideo.
2838 (Controller.prototype.updateHasVideo): Ditto.
2839 (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
2840 unless a file has video.
2842 2015-05-04 Chris Dumez <cdumez@apple.com>
2844 Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
2845 https://bugs.webkit.org/show_bug.cgi?id=144597
2846 <rdar://problem/20361579>
2848 Reviewed by Andreas Kling.
2850 Test: fast/dom/Window/window-open-activeWindow-null-frame.html
2852 In our implementation of window.open(), we make sure that the window
2853 which window.open() is called has a frame. However, we did not have the
2854 same check for the activeDOMWindow (i.e. the lexicalGlobalObject) causing
2855 us to crash in WebCore::createWindow() when dereferencing it.
2857 This patch updates WebCore::createWindow() takes a reference to the
2858 openerFrame instead of a pointer to make it clear the implementation
2859 expects it to be non-null. A null check is then added for the frame
2860 at the call site: DOMWindow::createWindow().
2862 * inspector/InspectorFrontendClientLocal.cpp:
2863 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2864 * loader/FrameLoader.cpp:
2865 (WebCore::isDocumentSandboxed):
2866 (WebCore::FrameLoader::submitForm):
2867 (WebCore::createWindow):
2868 Take a reference to openerFrame instead of a pointer as the
2869 implementation expects it to be non-null.
2871 * loader/FrameLoader.h:
2872 * page/DOMWindow.cpp:
2873 (WebCore::DOMWindow::createWindow):
2874 Add null check for activeFrame before passing it to
2875 WebCore::createWindow().
2877 2015-05-04 Dean Jackson <dino@apple.com>
2879 Create a named CSS property for system colors
2880 https://bugs.webkit.org/show_bug.cgi?id=144423
2882 Follow-up comments from Darin Adler.
2884 * rendering/RenderThemeIOS.h: Cache a Color rather than an RGBA32.
2885 * rendering/RenderThemeIOS.mm:
2886 (WebCore::RenderThemeIOS::systemColor): Use "add" to avoid multiple hits on the HashMap, and
2887 cache invalid responses so that we don't have to keep looking for non-existent colors.
2888 * rendering/RenderThemeMac.h: Same as iOS.
2889 * rendering/RenderThemeMac.mm:
2890 (WebCore::RenderThemeMac::systemColor):
2892 2015-05-04 Simon Fraser <simon.fraser@apple.com>
2894 display:none iframes cause repeated compositing flushing
2895 https://bugs.webkit.org/show_bug.cgi?id=144529
2897 Reviewed by Darin Adler.
2899 FrameView::updateLayoutAndStyleIfNeededRecursive() only forces layout on rendered
2900 frames, by virtue of using its Widget children which are FrameViews.
2902 However, FrameView::flushCompositingStateIncludingSubframes() iterated over
2903 all frames, and return false if any subframe needed layout. Thus, if it saw
2904 non-rendered frames (which are never laid out), it would return false,
2905 which causes the CFRunLoopObserver that drives flushing to run again.
2907 Fix by having FrameView::flushCompositingStateIncludingSubframes() only check
2908 rendered frames, using FrameTree::traverseNextRendered() (which needs to be public).
2910 Also change FrameView::needsStyleRecalcOrLayout() and FrameView::updateLayoutAndStyleIfNeededRecursive()
2911 to fetch the list of FrameViews using FrameTree's nextRenderedSibling(), rather than using
2912 the Widget tree, since we'd like to eventually remove Widgets, and using the Frame
2913 tree matches flushCompositingStateIncludingSubframes() and other code.
2915 Test: compositing/iframes/display-none-subframe.html
2918 * page/FrameView.cpp:
2919 (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2920 (WebCore::FrameView::needsStyleRecalcOrLayout):
2921 (WebCore::FrameView::renderedChildFrameViews): Helper that returns a vector
2922 of Ref<FrameView>s for rendered frames only.
2923 (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2926 2015-05-04 Chris Dumez <cdumez@apple.com>
2928 Unreviewed. Fix build with SECURITY_ASSERTIONS enabled.
2929 <rdar://problem/20653104>
2931 * dom/ScriptExecutionContext.cpp:
2932 (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2933 (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
2934 (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2935 (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2936 * dom/ScriptExecutionContext.h:
2938 2015-05-04 Simon Fraser <simon.fraser@apple.com>
2940 Fix updating of tiled backing opaquenss when the page background color changes
2941 https://bugs.webkit.org/show_bug.cgi?id=144600
2942 rdar://problem/20723035
2944 Reviewed by Tim Horton.
2946 RenderLayerCompositor makes the page tiles opaque or not based on the result of
2947 viewHasTransparentBackground(), which consults the view transparency, and
2948 FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based
2949 on the root and/or body background colors.
2951 We thus need to re-evaluate whether page tiles are opaque when any of these inputs
2952 change, but were failing to do so for the FrameView's baseBackgroundColor, and
2953 the page root background color.
2955 Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange()
2956 (for the root) trigger a compositing update when necessary.
2958 Added setViewBaseBackgroundColor() on Internals for testing.
2960 Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html
2962 * page/FrameView.cpp:
2963 (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper.
2964 (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the
2965 frame's document, and trigger a compositing update check if the alpha changed.
2966 (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if
2967 this FrameView is associated with the Document being displayed in the FrameView's
2968 Frame. This returns false when we're setting up a new FrameView (its Frame still
2969 points to the old document, so renderView() returns the RenderView for the Frame's
2972 * rendering/RenderBox.cpp:
2973 (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs
2975 * rendering/RenderLayerCompositor.cpp:
2976 (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result
2977 of documentBackgroundColor() changed in alpha since the last time, trigger a compositing
2979 * rendering/RenderLayerCompositor.h:
2980 * testing/Internals.cpp:
2981 (WebCore::Internals::setViewBaseBackgroundColor):
2982 * testing/Internals.h:
2983 * testing/Internals.idl:
2985 2015-05-04 Jer Noble <jer.noble@apple.com>
2987 [iOS] Crash in -[WebCALayerHostWrapper resolveBounds]
2988 https://bugs.webkit.org/show_bug.cgi?id=144595
2990 Reviewed by Eric Carlson.
2992 It is possible for a WebCALayorHostWrapper to outlive the WebVideoFullscreenModel to which it refers,
2993 since the model pointer is bare, rather than a RefPtr. The reference to the model must be invalidated
2994 before the model is destroyed.
2996 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2997 (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
2999 2015-05-04 Ryosuke Niwa <rniwa@webkit.org>
3001 Toggling underline or strike through affects each other
3002 https://bugs.webkit.org/show_bug.cgi?id=27818
3004 Reviewed by Darin Adler.
3006 This patch introduces a new mechanism to apply and remove text decorations. This is necessary because text
3007 decorations are always additive and we can't differentiate whether we're adding or removing a text decoration.
3008 Conceptually, we need four values for text decorations: adding underline, removing underline, adding
3009 line-through, and removing line-through but we have only three: underline, line-through, none.
3011 After this patch, there are three mechanism by which text decorations states are kept tracked. While applying
3012 or removing text decorations, we use newly added m_underlineChange and m_strikeThroughChange in EditingStyle.
3013 For the typing style, we use -webkit-text-decorations-in-effect to store the state since we need to preserve
3014 every type of text decorations such as overline in addition to underline and line-through. Once applied, all
3015 text decorations should be expressed in terms of the standard text-decoration property.
3017 Test: editing/execCommand/toggle-mixed-text-decorations.html
3019 * editing/ApplyStyleCommand.cpp:
3020 (WebCore::ApplyStyleCommand::applyBlockStyle):
3021 (WebCore::ApplyStyleCommand::removeCSSStyle): conflictsWithInlineStyleOfElement now creates a new inline style
3022 instead of a list of properties to remove.
3023 (WebCore::ApplyStyleCommand::addBlockStyle):
3024 (WebCore::ApplyStyleCommand::applyInlineStyleChange): Merge inline styles instead of adding as string.
3025 Otherwise it would generate style content attribute with multiple text-decoration properties.
3027 * editing/EditingStyle.cpp:
3028 (WebCore::HTMLElementEquivalent::matches):
3029 (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Takes an EditingStyle instead of StyleProperties.
3030 (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
3031 (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent):
3032 (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Respect newly added m_strikeThroughChange and
3033 m_underlineChange in EditingStyle.
3034 (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Ditto.
3035 (WebCore::HTMLTextDecorationEquivalent::changeInStyle): Added. Retrieves the change enum for the associated
3036 type of text-decoration (underline or strike through).
3037 (WebCore::HTMLAttributeEquivalent::matches):
3038 (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
3039 (WebCore::EditingStyle::EditingStyle): Initialize m_underlineChange and m_strikeThroughChange. Also use the
3040 delegating constructor elsewhere. Also added the missing call to extractFontSizeDelta() in the variant that
3041 takes CSSPropertyID and String, and added a variant that takes CSSPropertyID and CSSValueID.
3042 (WebCore::EditingStyle::isEmpty): Return false when m_underlineChange and m_strikeThroughChange are not "none".
3043 (WebCore::applyTextDecorationChangeToValueList): Added.
3044 (WebCore::EditingStyle::overrideTypingStyleAt): Added. Used by Editor::computeAndSetTypingStyle to set a new
3045 typing style. Resolve m_underlineChange and m_strikeThroughChange into -webkit-text-decorations-in-effect.
3046 (WebCore::EditingStyle::clear): Clear m_underlineChange and m_strikeThroughChange.
3047 (WebCore::EditingStyle::copy): Copy m_underlineChange and m_strikeThroughChange.
3048 (WebCore::textDecorationValueList): Added.
3049 (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Now takes a pointer to MutableStyleProperties
3050 instead of a vector. This was necessary we can't simply remove text-decoration property in ApplyStyleCommand's
3051 removeCSSStyle as that would result in unrelated text decorations also getting removed. Also added the code
3052 for m_underlineChange and m_strikeThroughChange. Only removing text decoration changes can cause a conflict
3053 since text decorations are always additive.
3054 (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Check isEmpty() instead of the nullity of
3055 m_mutableStyle to respect m_underlineChange and m_strikeThroughChange.
3056 (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
3057 (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
3058 (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Respect the values of m_underlineChange and
3059 m_strikeThroughChange. Here, the style is considered present if it has text decorations that are being added.
3060 (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3061 (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Takes EditingStyle instead of StyleProperties to
3062 respect m_underlineChange and m_strikeThroughChange.
3063 (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
3064 (WebCore::mergeTextDecorationValues):
3065 (WebCore::EditingStyle::mergeStyle): Make a copy of CSSValueList before modifying it since CSSValueList's are
3066 shared with other immutable StyleProperties.
3067 (WebCore::StyleChange::StyleChange): Set m_applyUnderline, m_applyLineThrough, and m_cssStyle if either
3068 m_underlineChange or m_strikeThroughChange are TextDecorationChange::Add in EditingStyle if the current position
3069 doesn't already have the matching style.
3070 (WebCore::StyleChange::operator==): Moved from the header file. Also added the logic to compare m_cssStyle now
3071 that it's a StyleProperties instead of String.
3073 * editing/EditingStyle.h: Added TextDecorationChange.
3074 (WebCore::EditingStyle::create): Added a variant that takes CSSPropertyID and CSSValueID.
3075 (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
3076 (WebCore::EditingStyle::setUnderlineChange): Added.
3077 (WebCore::EditingStyle::underlineChange): Added.
3078 (WebCore::EditingStyle::setStrikeThroughChange): Added.
3079 (WebCore::EditingStyle::strikeThroughChange): Added.
3080 (WebCore::StyleChange::cssStyle): Now returns StyleProperties* instead of String so that ApplyStyleCommand's
3081 applyInlineStyleChange could merge inline styles instead of just appending it to the end.
3082 (WebCore::StyleChange::operator==): Moved into the cpp file.
3084 * editing/Editor.cpp:
3085 (WebCore::Editor::applyStyle): Added. This variant takes EditingStyle instead of StyleProperties.
3086 (WebCore::Editor::applyStyleToSelection): Ditto.
3087 (WebCore::Editor::computeAndSetTypingStyle): Added a variant for EditingStyle. Also use overrideTypingStyleAt
3088 to set -webkit-text-decorations-in-effect based on m_underlineChange and m_strikeThroughChange
3091 * editing/EditorCommand.cpp:
3092 (WebCore::applyCommandToFrame):
3093 (WebCore::isStylePresent): Extracted from executeToggleStyle.
3094 (WebCore::executeApplyStyle):
3095 (WebCore::executeToggleStyle):
3096 (WebCore::executeToggleStyleInList): Deleted.
3097 (WebCore::textDecorationChangeForToggling): Added. Used in executeStrikethrough and executeUnderline.
3098 (WebCore::executeStrikethrough):
3099 (WebCore::executeUnderline):
3101 2015-05-04 Eric Carlson <eric.carlson@apple.com>
3103 [Mac] Fix build breakage caused by API deprecation
3104 https://bugs.webkit.org/show_bug.cgi?id=144593
3106 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3107 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Suppress warnings.
3109 2015-05-04 Chris Dumez <cdumez@apple.com>
3111 REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
3112 https://bugs.webkit.org/show_bug.cgi?id=144584
3113 <rdar://problem/20796829>
3115 Reviewed by Darin Adler.
3117 The CSS parser was rejecting calculated values at parsing time if it
3118 considered the value was negative and the CSS property did not allow
3119 negative values. However, doing so at this point will not always work
3120 because we don't necessarily know the font-size yet (for e.g. for
3121 calc(0.5em - 2px). Also, rejecting negative calculated values is not
3122 the right behavior as the the specification. The specification says
3124 http://dev.w3.org/csswg/css-values-3/#calc-range
3126 This patch updates validateCalculationUnit() to stop marking the value
3127 as invalid if it is negative. Instead, let the CSSCalcValue's permitted
3128 range clamp the value as needed.
3130 This bug was causing the bottom graphic on aldentrio.com to not be
3133 Test: fast/css/negative-calc-values.html
3134 fast/css/padding-calc-value.html
3136 * css/CSSParser.cpp:
3137 (WebCore::CSSParser::validateCalculationUnit):
3139 2015-05-04 Eric Carlson <eric.carlson@apple.com>
3141 [Mac] Show wireless playback placard even when an element has custom controls
3142 https://bugs.webkit.org/show_bug.cgi?id=144548
3144 Reviewed by Brent Fulgham.
3146 * Modules/mediacontrols/mediaControlsApple.js:
3147 (Controller.prototype.shouldHaveAnyUI): Return true when playing to wireless target.
3148 (Controller.prototype.reconnectControls): Add controls when playing to wireless target.
3149 (Controller.prototype.setPlaying): Return early when there is no 'controls' attribute.
3150 (Controller.prototype.showControls): Ditto.
3151 (Controller.prototype.updateWirelessPlaybackStatus): Call updateBase when playing to wireless
3152 target to ensure that controls have been set up.
3153 (Controller.prototype.handleWirelessPlaybackChange): Call reconnectControls when playing
3154 to wireless target when there is no 'controls' attribute.
3155 (Controller.prototype.showInlinePlaybackPlaceholderOnly): New.
3157 * html/HTMLMediaElement.cpp:
3158 (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call configureMediaControls.
3159 (WebCore::HTMLMediaElement::configureMediaControls): Require controls when playing
3161 (WebCore::HTMLMediaElement::configureTextTrackDisplay): Remove some unhelpful, noisy, logging.
3163 2015-05-04 Dan Bernstein <mitz@apple.com>
3167 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3168 (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Moved off of a deprecated
3169 method to a non-deprecated equivalent.
3171 2015-05-04 Javier Fernandez <jfernandez@igalia.com>
3173 [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
3174 https://bugs.webkit.org/show_bug.cgi?id=144442
3176 Reviewed by David Hyatt.
3178 Upgrade the justify-content property to the last CSS3 Box
3179 Alignment specification. It defines a different enumeration for
3180 Positional and Distribution alignment, which requires changes in
3181 the FlexibleBox implementation.
3183 A new parsing function has been implemented to replace the basic
3184 keyword IDs validation. Because of the complexity of the new
3185 values, a new CSSPrimitiveValue derived class has been defined
3186 which simplifies considerably the parsing logic.
3188 We will follow the same approach than for Self Alignment, defining
3189 a single class to hold all the related alignment data. This makes
3190 possible to use a StyleBuilderConverter function instead of custom
3191 builder functions for these properties.
3193 Test: css3/parse-justify-content.html
3196 * WebCore.xcodeproj/project.pbxproj:
3197 * css/CSSComputedStyleDeclaration.cpp:
3198 (WebCore::resolveContentAlignmentAuto):
3199 (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
3200 (WebCore::ComputedStyleExtractor::propertyValue):
3201 (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
3202 * css/CSSContentDistributionValue.cpp: Added.
3203 (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
3204 (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
3205 (WebCore::CSSContentDistributionValue::customCSSText):
3206 (WebCore::CSSContentDistributionValue::equals):
3207 * css/CSSContentDistributionValue.h: Added.
3208 (WebCore::CSSContentDistributionValue::create):
3209 (WebCore::CSSContentDistributionValue::distribution):
3210 (WebCore::CSSContentDistributionValue::position):
3211 (WebCore::CSSContentDistributionValue::overflow):
3212 * css/CSSParser.cpp:
3213 (WebCore::isValidKeywordPropertyAndValue):
3214 (WebCore::isKeywordPropertyID):
3215 (WebCore::CSSParser::parseValue):
3216 (WebCore::isContentDistributionKeyword):
3217 (WebCore::isContentPositionKeyword):
3218 (WebCore::isAlignmentOverflowKeyword):
3219 (WebCore::CSSParser::parseContentDistributionOverflowPosition):
3220 (WebCore::CSSParser::parseItemPositionOverflowPosition):
3221 (WebCore::CSSParser::parseLegacyPosition): Deleted.
3223 * css/CSSPrimitiveValueMappings.h:
3224 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3225 (WebCore::CSSPrimitiveValue::operator ContentPosition):
3226 (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
3227 (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
3228 * css/CSSPropertyNames.in:
3230 (WebCore::CSSValue::equals):
3231 (WebCore::CSSValue::cssText):
3232 (WebCore::CSSValue::destroy):
3234 (WebCore::CSSValue::isContentDistributionValue):
3235 (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
3236 * css/CSSValueKeywords.in:
3237 * css/StyleBuilderConverter.h:
3238 (WebCore::StyleBuilderConverter::convertContentAlignmentData):
3239 (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
3240 * rendering/RenderFlexibleBox.cpp:
3241 (WebCore::initialJustifyContentOffset):
3242 (WebCore::justifyContentSpaceBetweenChildren):
3243 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3244 (WebCore::RenderFlexibleBox::layoutColumnReverse):
3245 * rendering/RenderFullScreen.cpp:
3246 (WebCore::createFullScreenStyle):
3247 * rendering/mathml/RenderMathMLScripts.cpp:
3248 (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
3249 (WebCore::RenderMathMLScripts::fixAnonymousStyles):
3250 * rendering/style/RenderStyle.h:
3251 * rendering/style/RenderStyleConstants.h:
3252 * rendering/style/StyleContentAlignmentData.h: Added.
3253 (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
3254 (WebCore::StyleContentAlignmentData::setPosition):
3255 (WebCore::StyleContentAlignmentData::setDistribution):
3256 (WebCore::StyleContentAlignmentData::setOverflow):
3257 (WebCore::StyleContentAlignmentData::position):
3258 (WebCore::StyleContentAlignmentData::distribution):
3259 (WebCore::StyleContentAlignmentData::overflow):
3260 (WebCore::StyleContentAlignmentData::operator==):
3261 (WebCore::StyleContentAlignmentData::operator!=):
3262 * rendering/style/StyleRareNonInheritedData.cpp:
3263 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3264 (WebCore::StyleRareNonInheritedData::operator==):
3265 * rendering/style/StyleRareNonInheritedData.h:
3267 2015-05-04 Per Arne Vollan <peavo@outlook.com>
3269 [WinCairo] Compile error in sharedEGLDisplay() method.
3270 https://bugs.webkit.org/show_bug.cgi?id=144563
3272 Reviewed by Alex Christensen.
3274 The PlatformDisplay type is undefined.
3276 * platform/graphics/egl/GLContextEGL.cpp:
3277 (WebCore::sharedEGLDisplay):
3279 2015-05-04 Zan Dobersek <zdobersek@igalia.com>
3281 [WTF] Remove Functional.h inclusions
3282 https://bugs.webkit.org/show_bug.cgi?id=144400
3284 Reviewed by Darin Adler.
3286 Remove unnecessary inclusions of the <wtf/Functional.h> header in WebCore.
3288 * Modules/mediastream/MediaStreamTrack.cpp:
3289 * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
3290 * Modules/mediastream/UserMediaRequest.cpp:
3291 * page/scrolling/ScrollingTree.h:
3292 * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
3293 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3294 * platform/MemoryPressureHandler.cpp:
3295 * platform/UserActivity.h: Include the <objc/objc.h> header that was previously
3296 indirectly included through Functional.h.
3297 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3298 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3299 * platform/mac/SoftLinking.h: Unconditionally include the <objc/runtime.h> header
3300 that was previously included for the Mac port through Functional.h.
3302 2015-05-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3304 [Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
3305 https://bugs.webkit.org/show_bug.cgi?id=144387
3307 Reviewed by Darin Adler.
3309 Made ReadableStreamReader a private class of ReadableJSStream.
3310 Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource.
3312 No functional change, existing tests cover the changes.
3314 * Modules/streams/ReadableStream.h:
3315 (WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
3316 * bindings/js/JSReadableStreamCustom.cpp:
3317 (WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
3318 * bindings/js/ReadableStreamJSSource.cpp:
3319 (WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
3320 (WebCore::ReadableStreamJSSource::start):
3321 (WebCore::ReadableJSStream::create):
3322 (WebCore::ReadableJSStream::createReader):
3323 (WebCore::ReadableJSStream::jsSource):
3324 (WebCore::ReadableJSStream::Reader::create):
3325 (WebCore::ReadableJSStream::Reader::Reader):
3326 * bindings/js/ReadableStreamJSSource.h:
3328 2015-05-04 Csaba Osztrogonác <ossy@webkit.org>
3330 Remove move-js-headers.sh
3331 https://bugs.webkit.org/show_bug.cgi?id=144323
3333 Reviewed by Daniel Bates.
3335 move-js-headers.sh was only used by the Wx port, which has been removed from trunk long ago.
3337 * move-js-headers.sh: Removed.
3339 2015-05-04 Csaba Osztrogonác <ossy@webkit.org>
3341 [ARM] Don't compare unsigned chars to EOF (-1)
3342 https://bugs.webkit.org/show_bug.cgi?id=144439
3344 Reviewed by Geoffrey Garen.
3346 * platform/linux/MemoryPressureHandlerLinux.cpp:
3347 (WebKit::nextToken): Don't cast return value of fgetc() to char.
3349 2015-05-04 Manuel Rego Casasnovas <rego@igalia.com>
3351 [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
3352 https://bugs.webkit.org/show_bug.cgi?id=144449
3354 Reviewed by Sergio Villar Senin.
3356 If there're implicit tracks then trackPositions is bigger than
3357 trackSizes, so we need to use the proper index to append the trailing
3358 <ident>s in valueForGridTrackList().
3360 Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
3362 * css/CSSComputedStyleDeclaration.cpp:
3363 (WebCore::valueForGridTrackList):
3365 2015-05-03 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3367 Purge PassRefPtr in WebCore/html
3368 https://bugs.webkit.org/show_bug.cgi?id=144543
3370 Reviewed by Andreas Kling.
3372 Change PassRefPtr in create() factory functions with Ref. In some functions,
3373 it returns RefPtr when it might have a chance to return nullptr.
3375 No new tests, no behavior changes.
3377 * Modules/encryptedmedia/MediaKeySession.cpp:
3378 (WebCore::MediaKeySession::sendError):
3379 * html/DOMFormData.h:
3380 (WebCore::DOMFormData::create):
3381 * html/HTMLMediaElement.cpp:
3382 (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
3383 * html/HTMLMediaElement.h:
3384 * html/MediaError.h:
3385 (WebCore::MediaError::create):
3386 * html/MediaKeyError.h:
3387 (WebCore::MediaKeyError::create):
3388 * html/canvas/CanvasGradient.h:
3389 * html/canvas/CanvasProxy.cpp:
3390 (WebCore::CanvasProxy::create):
3391 * html/canvas/CanvasProxy.h:
3392 * html/canvas/WebGLActiveInfo.h:
3393 (WebCore::WebGLActiveInfo::create):
3394 * html/canvas/WebGLContextAttributes.h:
3395 * html/canvas/WebGLContextGroup.h:
3396 * html/canvas/WebGLProgram.h:
3397 * html/canvas/WebGLQuery.h:
3398 * html/canvas/WebGLRenderbuffer.h:
3399 * html/canvas/WebGLSampler.h:
3400 * html/canvas/WebGLShader.h:
3401 * html/canvas/WebGLShaderPrecisionFormat.h:
3402 * html/canvas/WebGLSync.h:
3403 * html/canvas/WebGLTexture.h:
3404 * html/canvas/WebGLTransformFeedback.h:
3405 * html/canvas/WebGLUniformLocation.h:
3406 * html/canvas/WebGLVertexArrayObjectOES.h:
3407 * html/shadow/ImageControlsRootElement.cpp:
3408 (WebCore::ImageControlsRootElement::maybeCreate):
3409 * html/shadow/ImageControlsRootElement.h:
3410 * html/shadow/MediaControlElements.cpp:
3411 (WebCore::MediaControlPanelElement::create):
3412 (WebCore::MediaControlPanelEnclosureElement::create):
3413 (WebCore::MediaControlOverlayEnclosureElement::create):
3414 (WebCore::MediaControlTimelineContainerElement::create):
3415 (WebCore::MediaControlVolumeSliderContainerElement::create):
3416 (WebCore::MediaControlStatusDisplayElement::create):
3417 (WebCore::MediaControlPanelMuteButtonElement::create):
3418 (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
3419 (WebCore::MediaControlPlayButtonElement::create):
3420 (WebCore::MediaControlOverlayPlayButtonElement::create):
3421 (WebCore::MediaControlSeekForwardButtonElement::create):
3422 (WebCore::MediaControlSeekBackButtonElement::create):
3423 (WebCore::MediaControlRewindButtonElement::create):
3424 (WebCore::MediaControlReturnToRealtimeButtonElement::create):
3425 (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
3426 (WebCore::MediaControlClosedCaptionsContainerElement::create):
3427 (WebCore::MediaControlClosedCaptionsTrackListElement::create):
3428 (WebCore::MediaControlTimelineElement::create):
3429 (WebCore::MediaControlPanelVolumeSliderElement::create):
3430 (WebCore::MediaControlFullscreenVolumeSliderElement::create):
3431 (WebCore::MediaControlFullscreenButtonElement::create):
3432 (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
3433 (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
3434 (WebCore::MediaControlTimeRemainingDisplayElement::create):
3435 (WebCore::MediaControlCurrentTimeDisplayElement::create):
3436 * html/shadow/MediaControlElements.h:
3437 * html/shadow/MediaControlsApple.h:
3438 (WebCore::MediaControlsAppleEventListener::create):
3439 * html/shadow/MeterShadowElement.h:
3440 (WebCore::MeterInnerElement::create):
3441 (WebCore::MeterBarElement::create):
3442 (WebCore::MeterValueElement::create):
3443 * html/shadow/ProgressShadowElement.h:
3444 (WebCore::ProgressInnerElement::create):
3445 (WebCore::ProgressBarElement::create):
3446 (WebCore::ProgressValueElement::create):
3447 * html/shadow/mac/ImageControlsRootElementMac.cpp: