1 2014-04-25 Javier Fernandez <jfernandez@igalia.com>
3 [CSS Grid Layout] Implementation of the grid-template shorthand.
4 https://bugs.webkit.org/show_bug.cgi?id=128980
6 Reviewed by Darin Adler.
8 This shorthand sets the values for the grid-template-columns,
9 grid-template-rows and grid-template-areas, so the implementation
10 tries to reuse as much available parsing functions as possible.
12 The "parsingGridTrackList" was refactored to return a CSSValue and
13 let the "parseValue" function to assign the property value. The
14 "forwardSlash" operator is now valid when the track-list clause is
15 part of a shorthand. The "parseValue" function checkouts that only
16 additional clauses are allowed when processing shorthands; the
17 grid-columns-rows-get-set.html tests was modified to verify this.
19 The "parseGridTemplateAreas" was refactored too, in order to
20 process single areas's rows. This is very useful for the
21 gris-template secondary syntax, which mixes areas and rows values.
23 Finally, the "parseGirdLineNames" function was modified as well by
24 defining an new argument to concatenate head/tail custom-ident
25 elements and ensure the identList is at the heading index, since
26 it's now possible the parseList was rewound.
28 The implementation of the grid-template shorthand tries first to
29 match the <grid-template-columns> / <grid-template-rows> syntax,
30 failing back to the secondary syntax if needed. This approach
31 requires to rewind the parseList but it produces a clearer code.
33 Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
35 * css/CSSComputedStyleDeclaration.cpp:
36 (WebCore::ComputedStyleExtractor::propertyValue):
38 (WebCore::CSSParser::parseValue):
39 (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
40 (WebCore::CSSParser::parseGridTemplateShorthand):
41 (WebCore::CSSParser::parseGridLineNames):
42 (WebCore::CSSParser::parseGridTrackList):
43 (WebCore::CSSParser::parseGridTemplateAreasRow):
44 (WebCore::CSSParser::parseGridTemplateAreas):
46 * css/CSSParserValues.h:
47 (WebCore::CSSParserValueList::setCurrentIndex):
48 * css/CSSPropertyNames.in:
49 * css/StylePropertyShorthand.cpp:
50 (WebCore::webkitGridTemplateShorthand):
51 * css/StylePropertyShorthand.h:
53 2014-04-25 Andreas Kling <akling@apple.com>
55 Remove two unused SVGDocument functions.
56 <https://webkit.org/b/132178>
58 Reviewed by Antti Koivisto.
60 * svg/SVGDocument.cpp:
61 (WebCore::SVGDocument::dispatchZoomEvent): Deleted.
62 (WebCore::SVGDocument::dispatchScrollEvent): Deleted.
65 2014-04-25 Ion Rosca <rosca@adobe.com>
67 Incomplete body painting when using blend modes
68 https://bugs.webkit.org/show_bug.cgi?id=131889
70 The incomplete painting was caused by the transparency layer created for
71 the root renderer. We can safely skip creating this transparency layer at
72 the root level, as there is nothing else being painted behind this layer that
73 could be used erroneously as a backdrop.
75 Reviewed by Simon Fraser.
77 Test: css3/compositing/blend-mode-with-body.html
79 * rendering/RenderLayer.h:
80 Changing RenderLayer::paintsWithTransparency so that it will not
81 return true when the root renderer needs to isolate blending.
83 2014-04-25 Darin Adler <darin@apple.com>
85 ASSERTION FAILED: "!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction" in svg/custom/use-instanceRoot-event-listeners.xhtml
86 https://bugs.webkit.org/show_bug.cgi?id=132148
88 Reviewed by Andreas Kling.
90 Changed how JSCustomMarkFunction generation works. Instead of leaving out
91 the generated visitChildren function, just generate a call to visitAdditionalChildren.
92 This eliminates the need to repeat boilerplate.
94 The fix for the above bug was to correct mistaken logic where JSSVGElementInstance
95 had a visitChildren that did not properly mark event listeners because it explicitly
96 did not call through to the base class visitChildren. The new arrangement makes that
99 * bindings/js/JSAttrCustom.cpp:
100 (WebCore::JSAttr::visitAdditionalChildren): Use this instead of visitChildren.
101 * bindings/js/JSAudioTrackCustom.cpp:
102 (WebCore::JSAudioTrack::visitAdditionalChildren): Ditto.
103 * bindings/js/JSAudioTrackListCustom.cpp:
104 (WebCore::JSAudioTrackList::visitAdditionalChildren): Ditto.
105 * bindings/js/JSCSSRuleCustom.cpp:
106 (WebCore::JSCSSRule::visitAdditionalChildren): Ditto.
107 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
108 (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren): Ditto.
109 * bindings/js/JSCanvasRenderingContextCustom.cpp:
110 (WebCore::JSCanvasRenderingContext::visitAdditionalChildren): Ditto.
111 * bindings/js/JSCryptoKeyPairCustom.cpp:
112 (WebCore::JSCryptoKeyPair::visitAdditionalChildren): Ditto.
113 * bindings/js/JSDOMWindowCustom.cpp:
114 (WebCore::JSDOMWindow::visitAdditionalChildren): Ditto.
115 * bindings/js/JSMessageChannelCustom.cpp:
116 (WebCore::JSMessageChannel::visitAdditionalChildren): Ditto.
117 * bindings/js/JSMessagePortCustom.cpp:
118 (WebCore::JSMessagePort::visitAdditionalChildren): Ditto.
119 * bindings/js/JSNodeCustom.cpp:
120 (WebCore::JSNode::visitAdditionalChildren): Ditto.
121 * bindings/js/JSNodeFilterCustom.cpp:
122 (WebCore::JSNodeFilter::visitAdditionalChildren): Ditto.
123 * bindings/js/JSNodeIteratorCustom.cpp:
124 (WebCore::JSNodeIterator::visitAdditionalChildren): Ditto.
125 * bindings/js/JSSVGElementInstanceCustom.cpp:
126 (WebCore::JSSVGElementInstance::visitAdditionalChildren): Ditto.
127 * bindings/js/JSSharedWorkerCustom.cpp:
128 (WebCore::JSSharedWorker::visitAdditionalChildren): Ditto.
129 * bindings/js/JSStyleSheetCustom.cpp:
130 (WebCore::JSStyleSheet::visitAdditionalChildren): Ditto.
131 * bindings/js/JSTextTrackCueCustom.cpp:
132 (WebCore::JSTextTrackCue::visitAdditionalChildren): Ditto.
133 * bindings/js/JSTextTrackCustom.cpp:
134 (WebCore::JSTextTrack::visitAdditionalChildren): Ditto.
135 * bindings/js/JSTextTrackListCustom.cpp:
136 (WebCore::JSTextTrackList::visitAdditionalChildren): Ditto.
137 * bindings/js/JSTreeWalkerCustom.cpp:
138 (WebCore::JSTreeWalker::visitAdditionalChildren): Ditto.
139 * bindings/js/JSVideoTrackCustom.cpp:
140 (WebCore::JSVideoTrack::visitAdditionalChildren): Ditto.
141 * bindings/js/JSVideoTrackListCustom.cpp:
142 (WebCore::JSVideoTrackList::visitAdditionalChildren): Ditto.
143 * bindings/js/JSWebGLRenderingContextCustom.cpp:
144 (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): Ditto.
145 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
146 (WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Ditto.
147 * bindings/js/JSXMLHttpRequestCustom.cpp:
148 (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Ditto.
149 * bindings/js/JSXPathResultCustom.cpp:
150 (WebCore::JSXPathResult::visitAdditionalChildren): Ditto.
152 * bindings/js/JSDOMGlobalObject.cpp:
153 (WebCore::JSDOMGlobalObject::visitChildren): Rewrote to use modern for loops.
155 * bindings/scripts/CodeGeneratorJS.pm:
156 (GenerateHeader): Generate declaration of visitAdditionalChildren.
157 (GenerateImplementation): Generate call to visitAdditionalChildren.
159 2014-04-24 Andreas Kling <akling@apple.com>
161 [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
162 <https://webkit.org/b/132171>
163 <rdar://problem/16720733>
165 Add a missing export for the USE(CFNETWORK) + WebKit2 combo.
167 Reviewed by Antti Koivisto.
171 2014-04-24 Darin Adler <darin@apple.com>
173 FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
174 https://bugs.webkit.org/show_bug.cgi?id=132163
175 rdar://problem/16720640
177 Reviewed by Brady Eidson.
179 Couldn't find a way to test this yet. Would be nice to have a test.
181 * loader/FrameLoader.cpp:
182 (WebCore::FrameLoader::checkCompleted): Move protector until after we check
183 if the frame is already complete. That can happen in practice when this is
184 called from within the frame's destructor. All the code that runs before the
185 protector simply checks state and does not require protection.
187 2014-04-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
189 Mark Supplement instead of RefCountedSupplement in NavigatorContentUtils
190 https://bugs.webkit.org/show_bug.cgi?id=132151
192 Reviewed by Darin Adler.
194 Though Original goal was to make it sharable across navigator instances, the NavigatorContentUtils
195 has used RefCountedSupplement<Page> instead of RefCountedSupplement<Navigator>. This patch makes it
196 use Supplement<Page> because there is no scenario which needs to be shared across navigator instances.
198 Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=171403.
200 No new tests, no behavior changes.
202 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
203 (WebCore::NavigatorContentUtils::from):
204 (WebCore::NavigatorContentUtils::create):
205 (WebCore::provideNavigatorContentUtilsTo):
206 * Modules/navigatorcontentutils/NavigatorContentUtils.h:
208 2014-04-24 Commit Queue <commit-queue@webkit.org>
210 Unreviewed, rolling out r167700.
211 https://bugs.webkit.org/show_bug.cgi?id=132142
213 Incorrectly reverted the change in r167547 for
214 webkit.org/b/131898 (Requested by rniwa on #webkit).
218 "Cursor doesn't change back to pointer when leaving the Safari
220 https://bugs.webkit.org/show_bug.cgi?id=132038
221 http://trac.webkit.org/changeset/167700
223 2014-04-24 Brady Eidson <beidson@apple.com>
225 Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
226 https://bugs.webkit.org/show_bug.cgi?id=132155
228 Reviewed by Tim Horton.
230 No new tests (No change in behavior).
232 * Configurations/FeatureDefines.xcconfig:
233 * DerivedSources.make:
235 * css/CSSDefaultStyleSheets.cpp:
236 (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
237 * css/CSSPrimitiveValueMappings.h:
238 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
239 * css/CSSValueKeywords.in:
241 * html/HTMLImageElement.cpp:
242 (WebCore::HTMLImageElement::HTMLImageElement):
243 (WebCore::HTMLImageElement::parseAttribute):
244 (WebCore::HTMLImageElement::didAttachRenderers):
245 * html/HTMLImageElement.h:
246 * html/shadow/ImageControlsRootElement.cpp:
247 * html/shadow/ImageControlsRootElement.h:
248 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
249 * html/shadow/mac/ImageControlsButtonElementMac.h:
250 * html/shadow/mac/ImageControlsRootElementMac.cpp:
251 * html/shadow/mac/ImageControlsRootElementMac.h:
252 * page/ContextMenuContext.cpp:
253 (WebCore::ContextMenuContext::ContextMenuContext):
254 * page/ContextMenuContext.h:
255 * page/ContextMenuController.cpp:
256 (WebCore::ContextMenuController::maybeCreateContextMenu):
257 (WebCore::ContextMenuController::populate):
258 * page/ContextMenuController.h:
260 * platform/ThemeTypes.h:
261 * rendering/RenderImage.cpp:
262 (WebCore::RenderImage::canHaveChildren):
263 * rendering/RenderTheme.cpp:
264 (WebCore::RenderTheme::adjustStyle):
265 (WebCore::RenderTheme::paint):
266 (WebCore::RenderTheme::paintBorderOnly):
267 (WebCore::RenderTheme::paintDecorations):
268 * rendering/RenderTheme.h:
269 * rendering/RenderThemeMac.h:
270 * rendering/RenderThemeMac.mm:
271 (WebCore::RenderThemeMac::servicesRolloverButtonCell):
272 (WebCore::RenderThemeMac::paintImageControlsButton):
273 (WebCore::RenderThemeMac::imageControlsButtonSize):
275 2014-04-24 Timothy Hatcher <timothy@apple.com>
277 Web Inspector: Restore PageDebuggerAgent::enable / disable
278 https://bugs.webkit.org/show_bug.cgi?id=132156
280 Restore functions that were eroniously removed in r167530.
282 Reviewed by Joseph Pecoraro.
284 * inspector/PageDebuggerAgent.cpp:
285 (WebCore::PageDebuggerAgent::enable): Added.
286 (WebCore::PageDebuggerAgent::disable): Added.
287 * inspector/PageDebuggerAgent.h:
289 2014-04-24 Alexey Proskuryakov <ap@apple.com>
291 Dropzone effects don't work in non-file documents
292 https://bugs.webkit.org/show_bug.cgi?id=131770
294 Reviewed by Darin Adler.
296 File documents have two quirks that were making dropzone work in these before:
297 1. An ancient hack for Dashboard allows pasteboard access from JS.
298 2. On Mac, sandbox doesn't prevent File object creation, as we already have the access.
300 * dom/DataTransfer.cpp:
301 (WebCore::DataTransfer::hasFileOfType):
302 (WebCore::DataTransfer::hasStringOfType):
303 * dom/DataTransfer.h:
304 Moved these functions from EventHandler to DataTransfer. We can't create a DataTransfer
305 with Files while dragging, security doesn't permit us to. But we can get the file name.
308 (WebCore::createBlobDataForFile):
309 (WebCore::createBlobDataForFileWithName):
310 (WebCore::File::contentTypeFromFilePath):
311 (WebCore::getContentTypeFromFileName): Deleted.
313 Exposed a function to get file type from path without creating a File first.
314 This is much cheaper than creating a File, and works even when sandbox disallows
315 read access to content, such as when dragging over a target.
317 * page/EventHandler.cpp:
318 (WebCore::hasDropZoneType):
319 (WebCore::hasFileOfType): Deleted.
320 (WebCore::hasStringOfType): Deleted.
322 2014-04-24 Commit Queue <commit-queue@webkit.org>
324 Unreviewed, rolling out r167441.
325 https://bugs.webkit.org/show_bug.cgi?id=132152
327 Caused full screen regressions on vimeo, youtube, and others.
328 (Requested by jernoble on #webkit).
332 "Fullscreen media controls are unusable in pagination mode"
333 https://bugs.webkit.org/show_bug.cgi?id=131705
334 http://trac.webkit.org/changeset/167441
336 2014-04-24 Adenilson Cavalcanti <cavalcantii@gmail.com>
338 Unused class forward declarations in Page
339 https://bugs.webkit.org/show_bug.cgi?id=132141
341 Reviewed by Benjamin Poulain.
343 No new tests, no change on behavior.
347 2014-04-24 Eric Carlson <eric.carlson@apple.com>
349 [Mac] don't ask for AVAssetTrack properties before they are available
350 https://bugs.webkit.org/show_bug.cgi?id=131902
351 <rdar://problem/16505076>
353 Reviewed by Brent Fulgham.
355 No new tests, the behavior this changes can not be tested with a layout test.
357 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
358 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
359 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
361 (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
362 metadata has been loaded until the track properties we need have been loaded too.
363 (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
364 of recalculating it every time.
365 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
367 (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
369 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
371 Unify platformWidthForGlyph across OS X and iOS
372 https://bugs.webkit.org/show_bug.cgi?id=132036
374 Reviewed by Darin Adler.
376 This patch creates on shared SimpleFontData::platformWidthForGlyph() function for both OS X and iOS.
378 No new tests are necessary because there should be no behavior changes.
380 * platform/graphics/SimpleFontData.h: Signatures for two helper functions
381 * platform/graphics/ios/SimpleFontDataIOS.mm: Replace iOS implementation of platformWidthForGlyph() with
382 implementations of only the two helper functions
383 (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
384 (WebCore::SimpleFontData::advanceForColorBitmapFont): iOS doesn't have color bitmap fonts
385 (WebCore::SimpleFontData::platformWidthForGlyph): Deleted.
386 * platform/graphics/mac/SimpleFontDataMac.mm:
387 (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
388 (WebCore::SimpleFontData::advanceForColorBitmapFont): Use [NSFont advancementForGlyph] to compute the advance
389 (WebCore::hasCustomTracking): Removed #if
390 (WebCore::isEmoji): Only relevant on iOS
391 (WebCore::SimpleFontData::platformWidthForGlyph): Shared implementation. Calls helper functions.
393 2014-04-24 Zalan Bujtas <zalan@apple.com>
395 Subpixel rendering: Clipping on text areas when shifted by one device pixel.
396 https://bugs.webkit.org/show_bug.cgi?id=132008
398 Reviewed by Darin Adler.
400 Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
401 other theme controls are still on integral size/positions.
403 Test: fast/forms/hidpi-textarea-on-subpixel-position.html
405 * rendering/RenderBox.cpp:
406 (WebCore::RenderBox::paintBoxDecorations):
407 * rendering/RenderTheme.cpp:
408 (WebCore::RenderTheme::paint):
409 (WebCore::RenderTheme::paintBorderOnly):
410 (WebCore::RenderTheme::paintDecorations):
411 * rendering/RenderTheme.h:
412 (WebCore::RenderTheme::paintTextField):
413 (WebCore::RenderTheme::paintTextFieldDecorations):
414 (WebCore::RenderTheme::paintTextArea):
415 (WebCore::RenderTheme::paintTextAreaDecorations):
416 * rendering/RenderThemeIOS.h:
417 * rendering/RenderThemeIOS.mm:
418 (WebCore::RenderThemeIOS::paintTextFieldDecorations):
419 (WebCore::RenderThemeIOS::paintTextAreaDecorations):
420 * rendering/RenderThemeMac.h:
421 * rendering/RenderThemeMac.mm:
422 (WebCore::RenderThemeMac::paintTextField):
423 (WebCore::RenderThemeMac::paintTextArea):
425 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
427 FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
428 https://bugs.webkit.org/show_bug.cgi?id=132110
430 Reviewed by Tim Horton.
432 Updates callers to use '.' instead of '->'.
434 No new tests are necessary because there should be no behavior change.
436 * css/CSSFontFaceSource.cpp:
437 (WebCore::CSSFontFaceSource::getFontData):
438 * css/CSSFontSelector.cpp:
439 (WebCore::CSSFontSelector::CSSFontSelector):
440 (WebCore::CSSFontSelector::~CSSFontSelector):
441 (WebCore::CSSFontSelector::addFontFaceRule):
442 (WebCore::fontDataForGenericFamily):
443 (WebCore::CSSFontSelector::getFallbackFontData):
444 * platform/MemoryPressureHandler.cpp:
445 (WebCore::MemoryPressureHandler::releaseMemory):
446 * platform/graphics/FontCache.cpp:
447 (WebCore::fontCache): Return a reference
448 * platform/graphics/FontCache.h:
449 (WebCore::FontCachePurgePreventer::FontCachePurgePreventer):
450 (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer):
451 * platform/graphics/FontGlyphs.cpp:
452 (WebCore::FontGlyphs::FontGlyphs):
453 (WebCore::FontGlyphs::releaseFontData):
454 (WebCore::FontGlyphs::realizeFontDataAt):
455 (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
456 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
457 (WebCore::FontPlatformData::verticalData):
458 * platform/graphics/ios/SimpleFontDataIOS.mm:
459 (WebCore::SimpleFontData::platformCreateScaledFontData):
460 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
461 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
462 * platform/graphics/mac/FontCacheMac.mm:
463 (WebCore::invalidateFontCache):
464 (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
465 * platform/graphics/mac/SimpleFontDataMac.mm:
466 (WebCore::SimpleFontData::platformDestroy):
467 (WebCore::SimpleFontData::platformCreateScaledFontData):
468 * platform/graphics/win/FontCacheWin.cpp:
469 (WebCore::getCJKCodePageMasks):
470 * platform/graphics/win/SimpleFontDataWin.cpp:
471 (WebCore::SimpleFontData::containsCharacters):
472 * platform/graphics/wince/FontCacheWinCE.cpp:
473 (WebCore::getCJKCodePageMasks):
474 * platform/graphics/wince/FontPlatformData.cpp:
475 (WebCore::FontFamilyCodePageInfo::codePages):
476 (WebCore::FixedSizeFontData::create):
477 * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
478 (WebCore::GlyphPage::fill):
479 * platform/graphics/wince/SimpleFontDataWinCE.cpp:
480 (WebCore::SimpleFontData::platformCreateScaledFontData):
481 (WebCore::SimpleFontData::containsCharacters):
483 2014-04-24 Eric Carlson <eric.carlson@apple.com>
485 [iOS] Manage AudioSession category according to media type
486 https://bugs.webkit.org/show_bug.cgi?id=132096
488 Reviewed by Jer Noble.
490 * WebCore.exp.in: Export setting.
492 * html/HTMLMediaSession.cpp:
493 (WebCore::HTMLMediaSession::HTMLMediaSession):
494 (WebCore::initializeAudioSession): Deleted.
498 (WebCore::Settings::setShouldManageAudioSession): New.
499 (WebCore::Settings::shouldManageAudioSession): Ditto.
501 * platform/audio/ios/AudioDestinationIOS.cpp:
502 (WebCore::AudioDestinationIOS::AudioDestinationIOS): Use a MediaSession instead of inheriting
503 from AudioListener and calling the AudioSession directly.
504 (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Ditto.
505 (WebCore::AudioDestinationIOS::start): Notify session.
506 (WebCore::AudioDestinationIOS::stop): Ditto.
507 (WebCore::AudioDestinationIOS::beganAudioInterruption): Deleted.
508 (WebCore::AudioDestinationIOS::endedAudioInterruption): Deleted.
509 * platform/audio/ios/AudioDestinationIOS.h:
510 (WebCore::AudioDestinationIOS::mediaType):
511 (WebCore::AudioDestinationIOS::canReceiveRemoteControlCommands):
512 (WebCore::AudioDestinationIOS::didReceiveRemoteControlCommand):
513 (WebCore::AudioDestinationIOS::isPlaying): Deleted.
515 * platform/audio/ios/AudioSessionIOS.mm:
516 (WebCore::categoryName): Debug-only logging function.
517 (WebCore::AudioSession::setCategory): Don't stick with "media" once it is set.
519 * platform/audio/ios/MediaSessionManagerIOS.mm:
520 (WebCore::MediaSessionManageriOS::resetRestrictions): Set up restrictions for WebAudio.
521 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Don't set invalid start time.
523 * platform/audio/mac/MediaSessionManagerMac.cpp:
524 (MediaSessionManager::updateSessionState): Manage AudioSession.active when WebAudio clients
525 come and go. Manage AudioSession.category according to the number of WebAudio and
526 HTMLMediaElement clients.
528 2014-04-24 David Hyatt <hyatt@apple.com>
530 [New Multicolumn] Client rects don't work with column spans.
531 https://bugs.webkit.org/show_bug.cgi?id=132131
533 Reviewed by Dean Jackson.
535 Don't factor in the offset of the multicolumn set from the top
536 of the multicolumn block. This was added already, and it doesn't
537 need to be a part of columnTranslationForOffset.
539 Added fast/multicol/client-rects-spanners.html
541 * rendering/RenderMultiColumnSet.cpp:
542 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
544 2014-04-24 Praveen R Jadhav <praveen.j@samsung.com>
546 [EFL] WebKit build fails when MEDIA_SOURCE is enabled
547 https://bugs.webkit.org/show_bug.cgi?id=132118
549 Reviewed by Brent Fulgham.
551 Files MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp and
552 WebKitMediaSourceGStreamer.cpp are included for EFL port build.
554 No new tests. No change in behaviour.
556 * PlatformEfl.cmake: MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp
557 and WebKitMediaSourceGStreamer.cpp are included for compilation.
559 2014-04-24 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
561 ASSERTION FAILED: !begin.isIndefinite() in WebCore::SVGSMILElement::resolveFirstInterval.
562 https://bugs.webkit.org/show_bug.cgi?id=131097
564 Reviewed by Darin Adler.
566 According to smil animation reference, max attribute cannot be 0.
568 Test: svg/animations/smil-animation-max-attribute-zero-crash.svg
570 * svg/animation/SVGSMILElement.cpp:
571 (WebCore::SVGSMILElement::maxValue):
572 changed (result < 0) to (result <= 0)
574 2014-04-24 Ryuan Choi <ryuan.choi@samsung.com>
576 Remove screenColorProfile()
577 https://bugs.webkit.org/show_bug.cgi?id=132035
579 Reviewed by Darin Adler.
581 Only chromium used screenColorProfile() since r120789.
583 * platform/PlatformScreen.h:
584 * platform/efl/PlatformScreenEfl.cpp:
585 (WebCore::screenColorProfile): Deleted.
586 * platform/gtk/PlatformScreenGtk.cpp:
587 (WebCore::screenColorProfile): Deleted.
588 * platform/image-decoders/ImageDecoder.h:
589 (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
590 * platform/ios/PlatformScreenIOS.mm:
591 (WebCore::screenColorProfile): Deleted.
592 * platform/mac/PlatformScreenMac.mm:
593 (WebCore::screenColorProfile): Deleted.
594 * platform/win/PlatformScreenWin.cpp:
595 (WebCore::screenColorProfile): Deleted.
597 2014-04-24 Zalan Bujtas <zalan@apple.com>
599 One more unreviewed build fix after r167755.
601 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
602 (WebCore::RenderImageControlsButton::updateLogicalWidth):
603 (WebCore::RenderImageControlsButton::computeLogicalHeight):
605 2014-04-24 Zalan Bujtas <zalan@apple.com>
607 Unreviewed build fix after r167755.
609 * rendering/RenderThemeMac.h:
611 2014-04-24 Zalan Bujtas <zalan@apple.com>
613 Transition RenderTheme API from RenderObject* to const RenderObject&
614 https://bugs.webkit.org/show_bug.cgi?id=132037
616 Reviewed by Andreas Kling.
618 Using const references provides better encapsulation and improve security.
620 No change in behavior.
622 * accessibility/AccessibilityObject.cpp:
623 (WebCore::AccessibilityObject::boundingBoxForQuads):
625 (WebCore::Element::setActive):
626 (WebCore::Element::setHovered):
627 * editing/FrameSelection.cpp:
628 (WebCore::FrameSelection::focusedOrActiveStateChanged):
629 * html/HTMLFormControlElement.cpp:
630 (WebCore::HTMLFormControlElement::disabledStateChanged):
631 (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
632 * html/HTMLInputElement.cpp:
633 (WebCore::HTMLInputElement::setChecked):
634 (WebCore::HTMLInputElement::setIndeterminate):
635 * html/HTMLOptionElement.cpp:
636 (WebCore::HTMLOptionElement::parseAttribute):
637 * rendering/RenderBlock.cpp:
638 (WebCore::RenderBlock::addVisualOverflowFromTheme):
639 (WebCore::RenderBlock::baselinePosition):
640 * rendering/RenderBox.cpp:
641 (WebCore::RenderBox::paintBoxDecorations):
642 * rendering/RenderButton.cpp:
643 (WebCore::RenderButton::styleDidChange):
644 * rendering/RenderFileUploadControl.cpp:
645 (WebCore::RenderFileUploadControl::paintObject):
646 * rendering/RenderFlowThread.cpp:
647 (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
648 * rendering/RenderObject.cpp:
649 (WebCore::RenderObject::drawLineForBoxSide):
650 * rendering/RenderObject.h:
651 * rendering/RenderProgress.cpp:
652 (WebCore::RenderProgress::computeLogicalHeight):
653 * rendering/RenderTextControlSingleLine.cpp:
654 (WebCore::RenderTextControlSingleLine::paint):
655 * rendering/RenderTheme.cpp:
656 (WebCore::RenderTheme::paint):
657 (WebCore::RenderTheme::paintBorderOnly):
658 (WebCore::RenderTheme::paintDecorations):
659 (WebCore::RenderTheme::baselinePosition):
660 (WebCore::RenderTheme::adjustRepaintRect):
661 (WebCore::RenderTheme::stateChanged):
662 (WebCore::RenderTheme::updateControlStatesForRenderer):
663 (WebCore::RenderTheme::extractControlStatesForRenderer):
664 (WebCore::RenderTheme::isActive):
665 (WebCore::RenderTheme::isChecked):
666 (WebCore::RenderTheme::isIndeterminate):
667 (WebCore::RenderTheme::isEnabled):
668 (WebCore::RenderTheme::isFocused):
669 (WebCore::RenderTheme::isPressed):
670 (WebCore::RenderTheme::isSpinUpButtonPartPressed):
671 (WebCore::RenderTheme::isReadOnlyControl):
672 (WebCore::RenderTheme::isHovered):
673 (WebCore::RenderTheme::isSpinUpButtonPartHovered):
674 (WebCore::RenderTheme::isDefault):
675 (WebCore::RenderTheme::paintInputFieldSpeechButton):
676 (WebCore::RenderTheme::paintMeter):
677 (WebCore::RenderTheme::paintSliderTicks):
678 (WebCore::RenderTheme::progressBarRectForBounds):
679 * rendering/RenderTheme.h:
680 (WebCore::RenderTheme::controlSupportsTints):
681 (WebCore::RenderTheme::paintCapsLockIndicator):
682 (WebCore::RenderTheme::paintFileUploadIconDecorations):
683 (WebCore::RenderTheme::imageControlsButtonSize):
684 (WebCore::RenderTheme::paintCheckbox):
685 (WebCore::RenderTheme::paintRadio):
686 (WebCore::RenderTheme::paintButton):
687 (WebCore::RenderTheme::paintInnerSpinButton):
688 (WebCore::RenderTheme::paintCheckboxDecorations):
689 (WebCore::RenderTheme::paintRadioDecorations):
690 (WebCore::RenderTheme::paintButtonDecorations):
691 (WebCore::RenderTheme::paintTextField):
692 (WebCore::RenderTheme::paintTextFieldDecorations):
693 (WebCore::RenderTheme::paintTextArea):
694 (WebCore::RenderTheme::paintTextAreaDecorations):
695 (WebCore::RenderTheme::paintMenuList):
696 (WebCore::RenderTheme::paintMenuListDecorations):
697 (WebCore::RenderTheme::paintMenuListButtonDecorations):
698 (WebCore::RenderTheme::paintPushButtonDecorations):
699 (WebCore::RenderTheme::paintSquareButtonDecorations):
700 (WebCore::RenderTheme::paintProgressBar):
701 (WebCore::RenderTheme::paintSliderTrack):
702 (WebCore::RenderTheme::paintSliderThumb):
703 (WebCore::RenderTheme::paintSliderThumbDecorations):
704 (WebCore::RenderTheme::paintSearchField):
705 (WebCore::RenderTheme::paintSearchFieldDecorations):
706 (WebCore::RenderTheme::paintSearchFieldCancelButton):
707 (WebCore::RenderTheme::paintSearchFieldDecorationPart):
708 (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
709 (WebCore::RenderTheme::paintSearchFieldResultsButton):
710 (WebCore::RenderTheme::paintMediaFullscreenButton):
711 (WebCore::RenderTheme::paintMediaPlayButton):
712 (WebCore::RenderTheme::paintMediaOverlayPlayButton):
713 (WebCore::RenderTheme::paintMediaMuteButton):
714 (WebCore::RenderTheme::paintMediaSeekBackButton):
715 (WebCore::RenderTheme::paintMediaSeekForwardButton):
716 (WebCore::RenderTheme::paintMediaSliderTrack):
717 (WebCore::RenderTheme::paintMediaSliderThumb):
718 (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
719 (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
720 (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
721 (WebCore::RenderTheme::paintMediaRewindButton):
722 (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
723 (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
724 (WebCore::RenderTheme::paintMediaControlsBackground):
725 (WebCore::RenderTheme::paintMediaCurrentTime):
726 (WebCore::RenderTheme::paintMediaTimeRemaining):
727 (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
728 (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
729 (WebCore::RenderTheme::paintSnapshottedPluginOverlay):
730 (WebCore::RenderTheme::paintImageControlsButton):
731 * rendering/RenderThemeIOS.h:
732 * rendering/RenderThemeIOS.mm:
733 (WebCore::RenderThemeIOS::addRoundedBorderClip):
734 (WebCore::RenderThemeIOS::paintCheckboxDecorations):
735 (WebCore::RenderThemeIOS::baselinePosition):
736 (WebCore::RenderThemeIOS::paintRadioDecorations):
737 (WebCore::RenderThemeIOS::paintTextFieldDecorations):
738 (WebCore::RenderThemeIOS::paintTextAreaDecorations):
739 (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
740 (WebCore::RenderThemeIOS::paintSliderTrack):
741 (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
742 (WebCore::RenderThemeIOS::paintProgressBar):
743 (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
744 (WebCore::RenderThemeIOS::paintButtonDecorations):
745 (WebCore::RenderThemeIOS::paintPushButtonDecorations):
746 (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
747 * rendering/RenderThemeMac.h:
748 (WebCore::RenderThemeMac::updateActiveState):
749 * rendering/RenderThemeMac.mm:
750 (WebCore::RenderThemeMac::documentViewFor):
751 (WebCore::RenderThemeMac::adjustRepaintRect):
752 (WebCore::RenderThemeMac::convertToPaintingRect):
753 (WebCore::RenderThemeMac::updateCheckedState):
754 (WebCore::RenderThemeMac::updateEnabledState):
755 (WebCore::RenderThemeMac::updateFocusedState):
756 (WebCore::RenderThemeMac::updatePressedState):
757 (WebCore::RenderThemeMac::controlSupportsTints):
758 (WebCore::RenderThemeMac::paintTextField):
759 (WebCore::RenderThemeMac::paintCapsLockIndicator):
760 (WebCore::RenderThemeMac::paintTextArea):
761 (WebCore::RenderThemeMac::paintMenuList):
762 (WebCore::RenderThemeMac::paintMeter):
763 (WebCore::RenderThemeMac::progressBarRectForBounds):
764 (WebCore::RenderThemeMac::paintProgressBar):
765 (WebCore::RenderThemeMac::paintMenuListButtonGradients):
766 (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
767 (WebCore::RenderThemeMac::setPopupButtonCellState):
768 (WebCore::RenderThemeMac::paintSliderTrack):
769 (WebCore::RenderThemeMac::paintSliderThumb):
770 (WebCore::RenderThemeMac::paintSearchField):
771 (WebCore::RenderThemeMac::setSearchCellState):
772 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
773 (WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
774 (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
775 (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
776 (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
777 (WebCore::RenderThemeMac::paintImageControlsButton):
778 (WebCore::RenderThemeMac::imageControlsButtonSize):
780 2014-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
782 [GTK] HTML Media capture attribute is a boolean since r163958
783 https://bugs.webkit.org/show_bug.cgi?id=132061
785 Reviewed by Gustavo Noronha Silva.
787 Add new methods webkit_dom_html_input_element_get_capture_enabled
788 and webkit_dom_html_input_element_set_capture_enabled using a
789 boolean and deprecate the old methods.
791 * bindings/gobject/WebKitDOMDeprecated.cpp:
792 (webkit_dom_html_input_element_get_capture):
793 (webkit_dom_html_input_element_set_capture):
794 * bindings/gobject/WebKitDOMDeprecated.h:
795 * bindings/gobject/WebKitDOMDeprecated.symbols:
796 * bindings/gobject/webkitdom.symbols:
797 * bindings/scripts/CodeGeneratorGObject.pm:
798 (GetEffectiveFunctionName): Helper function to rename API methods
800 (GenerateFunction): Use GetEffectiveFunctionName().
802 2014-04-23 Praveen R Jadhav <praveen.j@samsung.com>
804 [MediaStream] Implement MediaStream active attribute
805 https://bugs.webkit.org/show_bug.cgi?id=131973
807 Reviewed by Eric Carlson.
809 MediaStream .active attribute are introduced which will replace
810 .ended attribute. This patch implements the newly introduced attributes.
812 MediaStream-add-remove-tracks.html is updated to handle this scenario.
814 * Modules/mediastream/MediaStream.cpp:
815 (WebCore::MediaStream::active): Added.
816 (WebCore::MediaStream::setActive): Added.
817 (WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
818 (WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
819 (WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
820 (WebCore::MediaStream::streamDidEnd):
821 (WebCore::MediaStream::setStreamIsActive): Added.
822 * Modules/mediastream/MediaStream.h:
823 * Modules/mediastream/MediaStream.idl:
825 * platform/mediastream/MediaStreamPrivate.cpp:
826 (WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
827 (WebCore::MediaStreamPrivate::setEnded):
828 (WebCore::MediaStreamPrivate::setActive): Added.
829 * platform/mediastream/MediaStreamPrivate.h:
830 (WebCore::MediaStreamPrivate::active): Added.
832 2014-04-23 Darin Adler <darin@apple.com>
834 [Cocoa] fix CF leaks found by code inspection
835 https://bugs.webkit.org/show_bug.cgi?id=132106
837 Reviewed by Andreas Kling.
839 * page/CaptionUserPreferencesMediaAF.cpp:
840 (WebCore::trackDisplayName): Added a missing adoptCF.
842 * platform/Language.cpp:
843 (WebCore::displayNameForLanguageLocale): Added a missing adoptCF.
845 * platform/graphics/FontPlatformData.cpp:
846 (WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.
848 * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
849 (WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.
851 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
852 (WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.
854 * platform/graphics/cg/PDFDocumentImage.cpp:
855 (WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.
857 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
858 (WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.
860 * platform/graphics/mac/FontMac.mm:
861 (WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.
863 * platform/graphics/mac/SimpleFontDataMac.mm:
864 (WebCore::hasCustomTracking): Added missing adoptCF.
866 * platform/image-decoders/ImageDecoder.h:
867 (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.
869 * plugins/mac/PluginPackageMac.cpp:
870 (WebCore::readPListFile): Added two missing adoptCF.
872 2014-04-23 Ryosuke Niwa <rniwa@webkit.org>
874 REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
875 https://bugs.webkit.org/show_bug.cgi?id=131949
877 Address the review comment.
879 * dom/EventDispatcher.cpp:
880 (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
882 2014-04-23 Andreas Kling <akling@apple.com>
884 CachedResourceLoader hoards URLs indefinitely for no good reason.
885 <https://webkit.org/b/132102>
886 <rdar://problem/16708265>
888 Since we don't care about CachedResourceLoader::m_validatedURL's after
889 the Document has finished dispatching its initial load event, clear the
890 set at that point, and don't add any new URLs to it.
892 Reviewed by Anders Carlsson.
895 (WebCore::Document::dispatchWindowLoadEvent):
896 * loader/cache/CachedResourceLoader.cpp:
897 (WebCore::CachedResourceLoader::requestResource):
898 (WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
899 * loader/cache/CachedResourceLoader.h:
901 2014-04-23 Andreas Kling <akling@apple.com>
903 Canvas cache of clean URLs can grow without bounds.
904 <https://webkit.org/b/132091>
905 <rdar://problem/16695665>
907 Remove a silly "optimization" that kept a cache of clean URLs
908 that can be drawn into a canvas without tainting it, all to avoid
909 the "expensive" checks to determine whether it would taint.
911 Reviewed by Benjamin Poulain.
913 * html/canvas/CanvasRenderingContext.cpp:
914 (WebCore::CanvasRenderingContext::wouldTaintOrigin):
915 * html/canvas/CanvasRenderingContext.h:
917 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
919 [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
920 https://bugs.webkit.org/show_bug.cgi?id=132093
922 Reviewed by Tim Horton.
924 Change the minimum layout size to float point values to account for size defined on retina displays.
925 The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
926 in document coordinates.
929 * page/ViewportConfiguration.cpp:
930 (WebCore::ViewportConfiguration::ViewportConfiguration):
931 Setting the initial content size is incorrect. The layout size computation already take into account
932 empty size for the first layout.
934 Setting the content size upfront make the first computation incorrect when the viewport arguments specify
937 (WebCore::ViewportConfiguration::setMinimumLayoutSize):
938 * page/ViewportConfiguration.h:
939 (WebCore::ViewportConfiguration::minimumLayoutSize):
941 2014-04-23 Brent Fulgham <bfulgham@apple.com>
943 [Mac, iOS] Stop buffering media when on an inactive tab.
944 https://bugs.webkit.org/show_bug.cgi?id=132077
946 Reviewed by Eric Carlson.
948 * html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
949 to 'm_elementIsHidden'.
950 (WebCore::HTMLMediaElement::HTMLMediaElement):
951 (WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
952 media session that the element is (or is not) hidden.
953 (WebCore::HTMLMediaElement::setShouldBufferData): Added.
954 * html/HTMLMediaElement.h:
955 * platform/audio/MediaSession.cpp:
956 (WebCore::MediaSession::clientWillBeginPlayback): Tell media to
957 buffer if not hidden or playing.
958 (WebCore::MediaSession::clientWillPausePlayback): Ditto.
959 (WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
960 to updateClientDataBuffering.
961 (WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
962 buffer data if it's currently playing, or not hidden.
963 * platform/audio/MediaSession.h:
964 * platform/graphics/MediaPlayer.cpp:
965 (WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
966 MediaPlayerPrivate object.
967 * platform/graphics/MediaPlayer.h:
968 * platform/graphics/MediaPlayerPrivate.h:
969 (WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
970 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
971 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
972 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
973 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
974 Detach the player item from the player if we don't want to continue
975 buffering or other background tasks.
977 2014-04-23 Alexey Proskuryakov <ap@apple.com>
979 Eliminate internals.setMockScrollbarsEnabled()
980 https://bugs.webkit.org/show_bug.cgi?id=132085
982 Reviewed by Tim Horton.
984 This was essentially unused, and also didnt work.
986 * testing/InternalSettings.cpp:
987 (WebCore::InternalSettings::Backup::restoreTo):
988 (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
989 * testing/InternalSettings.h:
990 * testing/InternalSettings.idl:
992 2014-04-23 Anders Carlsson <andersca@apple.com>
994 Don't migrate the WKView.h header from WebCore to WebKit
995 https://bugs.webkit.org/show_bug.cgi?id=132086
997 Reviewed by Dan Bernstein.
999 * WebCore.xcodeproj/project.pbxproj:
1000 Add WAKViewInternal.h.
1002 * platform/WAKViewInternal.h: Added.
1004 * platform/ios/wak/WAKClipView.m:
1005 Import WAKViewInternal.h instead of WAKViewPrivate.h.
1007 * platform/ios/wak/WAKScrollView.mm:
1008 Import WAKViewInternal.h instead of WAKViewPrivate.h.
1010 * platform/ios/wak/WAKView.h:
1011 Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.
1013 * platform/ios/wak/WAKView.mm:
1014 Import WAKViewInternal.h instead of WAKViewPrivate.h.
1016 * platform/ios/wak/WAKViewPrivate.h:
1017 Import WKViewPrivate.h.
1019 2014-04-23 David Hyatt <hyatt@apple.com>
1021 [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
1022 https://bugs.webkit.org/show_bug.cgi?id=132078
1024 Reviewed by Anders Carlsson.
1026 * rendering/RenderBox.cpp:
1027 (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
1028 Add a parameter to test for orthogonal writing modes. If we're perpendicular,
1029 then we should not skip the flow thread, since we resolve relative to the column width,
1030 and that is always set.
1032 (WebCore::RenderBox::computePercentageLogicalHeight):
1033 Patched to pass in whether or not the box and the ancestor block are perpendicular.
1035 * rendering/RenderBox.h:
1036 Patched the signature of skipContainingBlockForPercentHeightCalculation
1038 2014-04-23 Myles C. Maxfield <mmaxfield@apple.com>
1040 [OS X] Make checking if a font is the system font more robust
1041 https://bugs.webkit.org/show_bug.cgi?id=132030
1043 Reviewed by Dean Jackson.
1045 Instead of inspecting a font's name to determine if it is a system font,
1046 on OS X we can ask the system directly.
1048 This patch also moves a platform-specific check into platform-specific
1049 code, so that other platforms don't check for OS X-specific behavior.
1051 Covered by existing tests.
1053 * platform/graphics/Font.cpp:
1054 (WebCore::Font::hasValidAverageCharWidth):
1055 * platform/graphics/Font.h:
1056 * platform/graphics/mac/FontMac.mm:
1057 (WebCore::Font::primaryFontDataIsSystemFont):
1059 2014-04-23 David Hyatt <hyatt@apple.com>
1061 [New Multicolumn] Assertion failure in huge-column-count.html
1062 https://bugs.webkit.org/show_bug.cgi?id=132071
1064 Reviewed by Dean Jackson.
1066 * rendering/RenderBlock.cpp:
1067 (WebCore::RenderBlock::regionAtBlockOffset):
1068 Back out this change, since it wasn't general enough.
1070 * rendering/RenderFlowThread.cpp:
1071 (WebCore::RenderFlowThread::getRegionRangeForBox):
1072 The real issue was that this loop needed to consider the actual box
1073 rather than starting from the parent. This was a non-issue for normal
1074 regions (which cannot have nested flow threads), but for columns, you
1075 have to consider the fact that the box could itself be a flow thread.
1077 2014-04-23 Andreas Kling <akling@apple.com>
1079 [iOS] Memory pressure notification should fire on main thread.
1080 <https://webkit.org/b/132074>
1082 Rejig the memory pressure notification to fire on the main queue
1083 directly instead of rerouting it manually.
1085 Reviewed by Mark Rowe.
1087 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1088 (WebCore::MemoryPressureHandler::install):
1090 2014-04-23 Commit Queue <commit-queue@webkit.org>
1092 Unreviewed, rolling out r167720.
1093 https://bugs.webkit.org/show_bug.cgi?id=132075
1095 broke eight newmulticol tests (Requested by thorton on
1100 "[New Multicolumn] Assertion failure in huge-column-
1102 https://bugs.webkit.org/show_bug.cgi?id=132071
1103 http://trac.webkit.org/changeset/167720
1105 2014-04-23 David Hyatt <hyatt@apple.com>
1107 [New Multicolumn] Assertion failure in huge-column-count.html
1108 https://bugs.webkit.org/show_bug.cgi?id=132071
1110 Reviewed by Dean Jackson.
1112 * rendering/RenderBlock.cpp:
1113 (WebCore::RenderBlock::regionAtBlockOffset):
1114 Remove the code that returned 0 here, since we're going to patch a lower-level
1115 function to catch all cases.
1117 * rendering/RenderFlowThread.cpp:
1118 (WebCore::RenderFlowThread::getRegionRangeForBox):
1119 Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
1120 are what should have ranges... the flow thread needs to just be ignored.
1122 2014-04-23 David Hyatt <hyatt@apple.com>
1124 [New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
1125 https://bugs.webkit.org/show_bug.cgi?id=132069
1127 Reviewed by Dean Jackson.
1129 This is imported from a patch Morten did for Blink, but I had to change it a fair
1130 bit. deleteLines() is used to handle simple line box layout instead of just calling
1133 I also had to disable the layout state to stop asserts on repaint when the children
1134 get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
1135 LayoutStateDisabler to stop the assert.
1137 Added fast/multicol/inline-children-crash.html
1139 * rendering/RenderMultiColumnFlowThread.cpp:
1140 (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
1142 2014-04-23 Andreas Kling <akling@apple.com>
1144 [iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
1145 <https://webkit.org/b/132065>
1146 <rdar://problem/16110687>
1148 Add a platformGarbageCollectNow() helper function to IOSurfacePool that
1149 triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
1150 and discardAllSurfaces().
1152 This lets us drop all otherwise-unused 420f surfaces on memory pressure.
1154 Reviewed by Tim Horton.
1156 * WebCore.xcodeproj/project.pbxproj:
1157 * platform/graphics/cg/IOSurfacePool.cpp:
1158 (WebCore::IOSurfacePool::collectionTimerFired):
1159 (WebCore::IOSurfacePool::discardAllSurfaces):
1160 * platform/graphics/cg/IOSurfacePool.h:
1161 * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
1162 (WebCore::IOSurfacePool::platformGarbageCollectNow):
1164 2014-04-23 Morten Stenshorne <mstensho@opera.com>
1166 REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
1167 https://bugs.webkit.org/show_bug.cgi?id=113058
1169 Reviewed by David Hyatt.
1171 Before sharing CSS properties with an element in the cache, we need to
1172 check that the new element is suitable for this, just like we check
1173 elements before inserting them into the cache.
1175 Test: fast/css/identical-logical-height-decl.html
1177 * css/StyleResolver.cpp:
1178 (WebCore::StyleResolver::applyMatchedProperties):
1180 2014-04-23 Commit Queue <commit-queue@webkit.org>
1182 Unreviewed, rolling out r167713.
1183 https://bugs.webkit.org/show_bug.cgi?id=132070
1185 broke hundreds of tests (Requested by thorton on #webkit).
1189 "[OS X] Make checking if a font is the system font more
1191 https://bugs.webkit.org/show_bug.cgi?id=132030
1192 http://trac.webkit.org/changeset/167713
1194 2014-04-22 David Hyatt <hyatt@apple.com>
1196 [New Multicolumn] Nested columns not working at all.
1197 https://bugs.webkit.org/show_bug.cgi?id=131805
1199 Reviewed by Dean Jackson.
1201 Add support for nested pagination contexts, allowing for an arbitrary level
1202 of nesting of multicolumn layouts. There were a number of things that had to
1203 be patched in order for this to work.
1205 * rendering/RenderBlock.cpp:
1206 (WebCore::RenderBlock::regionAtBlockOffset):
1207 Make sure RenderMultiColumnFlowThreads just return null for regions at any
1208 block offset. Individual region sets will be created as you cross ancestor
1209 regions eventually, so this is just getting in the way.
1211 * rendering/RenderLayer.cpp:
1212 (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
1213 Add a new helper method for obtaining an enclosingPaginationLayer when
1214 constrained by some root. This function ensures you don't accidentally
1215 cross your subtree root when looking for enclosing pagination layers.
1217 (WebCore::RenderLayer::collectFragments):
1218 Patch collectFragments to know how to recur to collect ancestor fragments
1219 in order to apply nested splitting as you cross pagination boundaries.
1221 (WebCore::RenderLayer::updatePaintingInfoForFragments):
1222 (WebCore::RenderLayer::calculateClipRects):
1223 * rendering/RenderLayer.h:
1224 (WebCore::LayerFragment::LayerFragment):
1225 (WebCore::LayerFragment::setRects):
1226 (WebCore::LayerFragment::moveBy):
1227 (WebCore::LayerFragment::intersect):
1228 Improve the LayerFragment so that it caches transformed bounding boxes as
1229 well. This is needed to fix intersectsDamageRect so that it doesn't grab
1230 the wrong bounding box when checking inline layers that are paginated.
1232 * rendering/RenderMultiColumnFlowThread.cpp:
1233 (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1234 Ignore inserted flow threads inside an ancestor flow thread, since we only
1235 care about what the sets do.
1237 * rendering/RenderObject.cpp:
1238 (WebCore::RenderObject::insertedIntoTree):
1239 Make sure that nested flow thread layers return themselves when a child
1240 is inserted directly under them.
1242 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
1244 [OS X] Make checking if a font is the system font more robust
1245 https://bugs.webkit.org/show_bug.cgi?id=132030
1247 Reviewed by Dean Jackson.
1249 Instead of inspecting a font's name to determine if it is a system font,
1250 on OS X we can ask the system directly.
1252 This patch also moves a platform-specific check into platform-specific
1253 code, so that other platforms don't check for OS X-specific behavior.
1255 Covered by existing tests.
1257 * platform/graphics/Font.cpp:
1258 (WebCore::Font::hasValidAverageCharWidth):
1259 * platform/graphics/Font.h:
1260 * platform/graphics/mac/FontMac.mm:
1261 (WebCore::Font::primaryFontDataIsSystemFont):
1263 2014-04-23 Philippe Normand <pnormand@igalia.com>
1265 [GTK] Focus management API was moved from HTMLDocument to Document in r166668
1266 https://bugs.webkit.org/show_bug.cgi?id=132060
1268 Reviewed by Carlos Garcia Campos.
1270 Deprecate the removed methods in WebKitDOMHTMLDocument to keep API compatibility.
1272 * bindings/gobject/WebKitDOMDeprecated.cpp:
1273 (webkit_dom_html_document_get_active_element):
1274 (webkit_dom_html_document_has_focus):
1275 * bindings/gobject/WebKitDOMDeprecated.h:
1276 * bindings/gobject/WebKitDOMDeprecated.symbols:
1277 * bindings/gobject/webkitdom.symbols:
1279 2014-04-22 Andreas Kling <akling@apple.com>
1281 [iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
1282 <https://webkit.org/b/132041>
1283 <rdar://problem/16687238>
1285 Always dispatch the memory pressure relief code on the main queue.
1286 This is really only needed for iOS/WK1, but we might as well share the code.
1288 Reviewed by Michael Saboff.
1290 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1291 (WebCore::MemoryPressureHandler::install):
1293 2014-04-23 Philippe Normand <pnormand@igalia.com>
1295 [GTK] ShadowRoot API was removed in r164131
1296 https://bugs.webkit.org/show_bug.cgi?id=132059
1298 Reviewed by Gustavo Noronha Silva.
1300 Add ShadowRoot removed API to WebKitDOMDeprecated to keep API/ABI compatibility.
1302 * bindings/gobject/WebKitDOMDeprecated.cpp:
1303 (webkit_dom_shadow_root_class_init):
1304 (webkit_dom_shadow_root_init):
1305 (webkit_dom_shadow_root_element_from_point):
1306 (webkit_dom_shadow_root_get_active_element):
1307 (webkit_dom_shadow_root_get_apply_author_styles):
1308 (webkit_dom_shadow_root_get_element_by_id):
1309 (webkit_dom_shadow_root_get_elements_by_class_name):
1310 (webkit_dom_shadow_root_get_elements_by_tag_name):
1311 (webkit_dom_shadow_root_get_elements_by_tag_name_ns):
1312 (webkit_dom_shadow_root_get_inner_html):
1313 (webkit_dom_shadow_root_get_reset_style_inheritance):
1314 (webkit_dom_shadow_root_get_selection):
1315 (webkit_dom_shadow_root_set_apply_author_styles):
1316 (webkit_dom_shadow_root_set_inner_html):
1317 (webkit_dom_shadow_root_set_reset_style_inheritance):
1318 * bindings/gobject/WebKitDOMDeprecated.h:
1319 * bindings/gobject/WebKitDOMDeprecated.symbols:
1321 2014-04-23 Morten Stenshorne <mstensho@opera.com>
1323 [New Multicolumn] fast/multicol/overflow-content.html displays red
1324 https://bugs.webkit.org/show_bug.cgi?id=131809
1326 Reviewed by David Hyatt.
1328 Insert a break at end of content on our own in the multicol code, to make sure
1329 that overflow is accounted for, and also to make sure that we account for all
1330 content in non-final sets (i.e. those preceding spanners).
1332 In other words, this will additionally fix balancing issues in sets preceding
1333 a spanner. Added a test for that.
1335 Tests: fast/multicol/break-in-columns-before-spanner.html
1336 fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html
1338 * rendering/RenderFlowThread.cpp:
1339 (WebCore::RenderFlowThread::regionInRange): Deleted.
1340 * rendering/RenderFlowThread.h:
1341 * rendering/RenderMultiColumnSet.cpp:
1342 (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
1343 * rendering/RenderNamedFlowThread.cpp:
1344 (WebCore::RenderNamedFlowThread::applyBreakAfterContent):
1345 * rendering/RenderNamedFlowThread.h:
1347 2014-04-23 Morten Stenshorne <mstensho@opera.com>
1349 Overflow propagation broken in BTT and RTL writing-modes
1350 https://bugs.webkit.org/show_bug.cgi?id=113781
1352 Reviewed by David Hyatt.
1354 Overflow rectangles are not quite physical, not quite logical. This
1355 means that we cannot use clientBoxRect() directly to represent a
1356 rectangle that expresses exactly no overflow. This rectangle is the
1357 padding box (relative to the border box) in vertical-lr and
1358 horizontal-tb, but the block-direction borders need to be flipped in
1359 vertical-rl and horizontal-bt.
1361 Tests: fast/css/overflow-btt-border-after.html
1362 fast/css/overflow-rtl-border-after.html
1365 * rendering/RenderBlock.cpp:
1366 (WebCore::RenderBlock::computeOverflow):
1367 * rendering/RenderBox.cpp:
1368 (WebCore::RenderBox::addLayoutOverflow):
1369 (WebCore::RenderBox::addVisualOverflow):
1370 (WebCore::RenderBox::layoutOverflowRectForPropagation):
1371 * rendering/RenderBox.h:
1372 (WebCore::RenderBox::layoutOverflowRect):
1374 2014-04-23 Andrei Bucur <abucur@adobe.com>
1376 [CSS Regions] Improve the debugging infrastructure
1377 https://bugs.webkit.org/show_bug.cgi?id=132042
1379 Reviewed by Mihnea Ovidenie.
1381 This patch improves the debugging code for CSS Regions.
1383 Tests: No function change. No new tests.
1385 * rendering/RenderObject.cpp:
1386 (WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
1387 the render tree to the console.
1388 * rendering/RootInlineBox.cpp:
1389 (WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.
1391 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
1393 Cursor doesn't change back to pointer when leaving the Safari window
1394 https://bugs.webkit.org/show_bug.cgi?id=132038
1396 Reviewed by Alexey Proskuryakov.
1398 r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have
1399 any node associated with it. Since we will hit this code when the cursor is outside of the WebView,
1400 we still need to take the CURSOR_AUTO path as did the code before r147739.
1402 No new test is added since this behavior can't be tested in DRT or WTR.
1404 * page/EventHandler.cpp:
1405 (WebCore::EventHandler::selectCursor):
1407 2014-04-22 Zalan Bujtas <zalan@apple.com>
1409 Do not paint border image when the border rect is empty.
1410 https://bugs.webkit.org/show_bug.cgi?id=131988
1412 Reviewed by Darin Adler.
1414 http://trac.webkit.org/changeset/167351 introduced an early return when border
1415 rect is empty. This patch ensures that border image is not painted either in that case.
1417 Modified padding-margin-negative-border.html to cover border-image case.
1419 * rendering/RenderBoxModelObject.cpp:
1420 (WebCore::RenderBoxModelObject::paintBorder):
1422 2014-04-22 Tim Horton <timothy_horton@apple.com>
1424 ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
1425 https://bugs.webkit.org/show_bug.cgi?id=132034
1426 <rdar://problem/16624332>
1428 Reviewed by Simon Fraser.
1430 * platform/mac/ScrollAnimatorMac.mm:
1431 (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
1432 scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
1433 from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
1434 Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
1435 so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.
1437 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
1439 REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
1440 https://bugs.webkit.org/show_bug.cgi?id=131949
1442 Reviewed by Darin Adler.
1444 The regression was caused by two bugs:
1445 1. The event didn't stop propagating itself even when it should.
1446 If the related target is same as the event origin, the event propagation should stop when the event reaches
1447 the root of the related target's tree scope. Otherwise, it should stop when it reaches the related target.
1449 2. Mouse event's related target exposed nodes inside a user-agent shadow DOM when the related target appeared
1452 Fixed the bugs by re-introducing path shrinkage algorithm removed in r157328 into EventPath::setRelatedTarget
1453 and adding an algorithm to determine the least common ancestor of the related target and the current target
1454 in moveToParentOrShadowHost. The latter algorithm doesn't match the shadow DOM specification:
1455 http://www.w3.org/TR/2013/WD-shadow-dom-20130514/
1456 but it's good enough in terms of the Web exposed behavior as we don't support author defined insertion points.
1458 Test: fast/events/shadow-event-path.html
1460 * dom/EventDispatcher.cpp:
1461 (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
1462 (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope): Added.
1463 (WebCore::EventDispatcher::dispatchEvent):
1464 (WebCore::EventPath::setRelatedTarget):
1466 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
1468 Rollout r156635 since the old behavior was intentional.
1470 * page/EventHandler.cpp:
1471 (WebCore::EventHandler::selectCursor):
1473 2014-04-22 Commit Queue <commit-queue@webkit.org>
1475 Unreviewed, rolling out r167674.
1476 https://bugs.webkit.org/show_bug.cgi?id=132025
1478 Going a different way with this (Requested by bradee-oh on
1483 "Change Image Controls replacement to use selection and paste"
1484 https://bugs.webkit.org/show_bug.cgi?id=131992
1485 http://trac.webkit.org/changeset/167674
1487 2014-04-22 Brent Fulgham <bfulgham@apple.com>
1489 [Win] Support Python 2.7 in Cygwin
1490 https://bugs.webkit.org/show_bug.cgi?id=132023
1492 Reviewed by Michael Saboff.
1494 * DerivedSources.make: Use proper path to Cygwin on
1497 2014-04-22 Andreas Kling <akling@apple.com>
1499 REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
1500 <https://webkit.org/b/131974>
1501 <rdar://problem/15907469>
1503 When the currently hovered element disappears as a result of style recalc,
1504 we send a fake mousemove event to the page, to see if anything newly added
1505 should become hovered.
1507 The faking mechanism lives in EventHandler and simply synthesizes a new
1508 mousemove event using the last seen mouse location.
1510 The problem here is that we were sending this fake mousemove event to the
1511 subframe where the hovered element lived. Since subframes aren't kept up
1512 to date on recent mouse locations, this could cause some strange behavior
1513 where a subframe would dispatch mousemove events with stale coordinates.
1515 The solution is to always dispatch fake mousemove events from the main
1516 frame's event handler. This is how real event delivery happens, and hit
1517 testing will then find the appropriate subframe, if any.
1519 Reviewed by Benjamin Poulain.
1521 Test: fast/events/ghostly-mousemoves-in-subframe.html
1524 (WebCore::Document::recalcStyle):
1526 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
1528 [OS X] Glyph spacing for system fonts may be incorrect
1529 https://bugs.webkit.org/show_bug.cgi?id=131967
1531 Unreviewed iOS build fix after r167679.
1533 * platform/graphics/mac/SimpleFontDataMac.mm:
1535 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
1537 [OS X] Glyph spacing for system fonts may be incorrect
1538 https://bugs.webkit.org/show_bug.cgi?id=131967
1540 Unreviewed build fix after r167679.
1542 * platform/graphics/mac/SimpleFontDataMac.mm:
1543 (WebCore::hasCustomTracking):
1545 2014-04-21 Myles C. Maxfield <mmaxfield@apple.com>
1547 [OS X] Glyph spacing for system fonts may be incorrect
1548 https://bugs.webkit.org/show_bug.cgi?id=131967
1550 Reviewed by Simon Fraser.
1552 Covered by existing tests.
1554 * platform/graphics/mac/SimpleFontDataMac.mm:
1555 (WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
1556 (WebCore::hasCustomTracking):
1558 2014-04-22 David Hyatt <hyatt@apple.com>
1560 [New Multicolumn] widows/orphans cause assertion failures.
1561 https://bugs.webkit.org/show_bug.cgi?id=131233
1563 Reviewed by Dean Jackson.
1565 * rendering/RenderMultiColumnSet.cpp:
1566 (WebCore::RenderMultiColumnSet::recordSpaceShortage):
1567 Fix an obvious bug where the space shortage is recorded twice (and the
1568 if statement that kept it from being negative is accidentally ignored).
1570 2014-04-22 David Hyatt <hyatt@apple.com>
1572 [New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
1573 translation that fragment collection does.
1574 https://bugs.webkit.org/show_bug.cgi?id=131738
1576 Reviewed by Anders Carlsson.
1578 * rendering/RenderMultiColumnSet.cpp:
1579 (WebCore::RenderMultiColumnSet::collectLayerFragments):
1580 Remove a FIXME that is no longer needed, since the translation offset of the
1581 column set did get patched.
1583 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1584 Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.
1586 2014-04-22 Mark Lam <mark.lam@apple.com>
1588 WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
1589 <https://webkit.org/b/132021>
1591 Reviewed by Mark Hahnenberg.
1593 Covered by existing layout test.
1595 * html/HTMLMediaElement.cpp:
1596 (WebCore::HTMLMediaElement::parseAttribute):
1598 2014-04-22 Manuel Rego Casasnovas <rego@igalia.com>
1600 REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
1601 https://bugs.webkit.org/show_bug.cgi?id=131982
1603 Reviewed by David Hyatt.
1605 The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
1606 in this test endPos is 1 when the element has not children which creates an invalid Range.
1608 * rendering/RenderView.cpp:
1609 (WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
1610 not interested in the positions at this point.
1612 2014-04-22 Brady Eidson <beidson@apple.com>
1614 Change Image Controls replacement to use selection and paste
1615 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
1617 Reviewed by Tim Horton.
1619 * WebCore.exp.in: Remove deleted symbol.
1621 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1622 (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
1624 * page/ContextMenuController.cpp:
1625 (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
1626 before showing the menu.
1627 (WebCore::ContextMenuController::replaceControlledImage): Deleted.
1628 * page/ContextMenuController.h:
1630 2014-04-22 David Hyatt <hyatt@apple.com>
1632 REGRESSION: Hitting asserts in new flow thread selection code.
1633 https://bugs.webkit.org/show_bug.cgi?id=132019
1635 Reviewed by Anders Carlsson.
1637 Null checking flowThreadController is not enough. The list of threads
1638 can be null even when the flowThreadController is not. That's why you
1639 use hasRenderNamedFlowThreads. I patched the two bad places in the code
1640 to use hasRenderNamedFlowThreads to stop the crashes.
1642 * rendering/RenderView.cpp:
1643 (WebCore::RenderView::selectionBounds):
1644 (WebCore::RenderView::repaintSelection):
1646 2014-04-22 Brent Fulgham <bfulgham@apple.com>
1648 Check (rather than assume) element is a RenderTableSection before using it
1649 https://bugs.webkit.org/show_bug.cgi?id=121858
1651 Reviewed by David Kilzer.
1653 Test: fast/table/table-insert-object-before-td-crash.html
1655 * rendering/RenderTable.cpp:
1656 (WebCore::RenderTable::addChild): Check that lastBox is a table section before
1657 using the node as if it was one.
1659 2014-04-22 Alex Christensen <achristensen@webkit.org>
1661 Begin implementation of video using Media Foundation.
1662 https://bugs.webkit.org/show_bug.cgi?id=131830
1664 Reviewed by Brent Fulgham.
1666 * WebCore.vcxproj/WebCore.vcxproj:
1667 * WebCore.vcxproj/WebCore.vcxproj.filters:
1668 Added MediaPlayerPrivateMediaFoundation files.
1669 * platform/graphics/MediaPlayer.cpp:
1670 Include MediaPlayerPrivateMediaFoundation inside new USE(MEDIA_FOUNDATION) flag.
1671 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: Added.
1672 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Added.
1674 2014-04-22 Commit Queue <commit-queue@webkit.org>
1676 Unreviewed, rolling out r167658.
1677 https://bugs.webkit.org/show_bug.cgi?id=131993
1679 Caused many crashes on media tests (Requested by ap on
1684 "[Mac] don't ask for AVAssetTrack properties before they are
1686 https://bugs.webkit.org/show_bug.cgi?id=131902
1687 http://trac.webkit.org/changeset/167658
1689 2014-04-22 David Hyatt <hyatt@apple.com>
1691 [New Multicolumn] fast/multicol/multicol-with-child-renderLayer-for-input.html puts the textfield in the wrong place
1692 https://bugs.webkit.org/show_bug.cgi?id=131808
1694 Reviewed by Brady Eidson.
1696 Make sure FrameView is patched to pass in the update pagination flag when subtree layout
1697 is done on textfields. It had code for the old multicolumn system but did not have a check
1698 for the new multicolumn system.
1700 Added fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html
1702 * page/FrameView.cpp:
1703 (WebCore::updateLayerPositionFlags):
1705 2014-04-22 Zalan Bujtas <zalan@apple.com>
1707 border-style: double rendered as solid when combined with border-radius
1708 https://bugs.webkit.org/show_bug.cgi?id=131927
1710 Reviewed by Simon Fraser.
1712 BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths.
1714 Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html
1716 * rendering/BorderEdge.cpp:
1717 (WebCore::BorderEdge::getDoubleBorderStripeWidths):
1718 * rendering/BorderEdge.h:
1720 2014-04-22 Eric Carlson <eric.carlson@apple.com>
1722 [Mac] don't ask for AVAssetTrack properties before they are available
1723 https://bugs.webkit.org/show_bug.cgi?id=131902
1724 <rdar://problem/16505076>
1726 Reviewed by Jer Noble.
1728 No new tests, the behavior this changes can not be tested with a layout test.
1730 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1731 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1732 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
1734 (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
1735 metadata has been loaded until the track properties we need have been loaded too.
1736 (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
1737 of recalculating it every time.
1738 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
1740 (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
1742 2014-04-22 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
1744 Buildfix after r167650 broke non-Cocoa builds
1745 https://bugs.webkit.org/show_bug.cgi?id=131980
1747 Reviewed by Mario Sanchez Prada.
1749 * page/EventHandler.cpp:
1750 (WebCore::EventHandler::handleWheelEvent):
1752 2014-04-22 Manuel Rego Casasnovas <rego@igalia.com>
1754 [CSS Regions] Selection highlight doesn't match DOM selection
1755 https://bugs.webkit.org/show_bug.cgi?id=131511
1757 Reviewed by David Hyatt.
1759 This patch implements a subtrees approach to fix selection interaction in CSS Regions.
1761 The idea is to divide the Render tree in subtrees. One subtree will be the RenderView (which is always present),
1762 then for each RenderNamedFlowThread (which are children of RenderView) we will have an extra subtree.
1764 For each subtree it determines the start and end positions according to the DOM tree. So, every subtree will
1765 always have a start and end position, and the selection algorithm will be able to reach the end from the start
1766 without problems (this allows us to remove the changes introduced in r155058).
1768 Then selection related methods in RenderView are adapted to ensure that they are called for each subtree. Making
1769 the selection highlight to match DOM selection as expected.
1771 Test: fast/regions/selection/selecting-text-including-region.html
1773 * CMakeLists.txt: Add new class SelectionSubtreeRoot to build file.
1774 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1775 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1776 * WebCore.xcodeproj/project.pbxproj: Ditto.
1777 * rendering/RenderNamedFlowThread.h: Inherit from SelectionSubtreeRoot.
1778 * rendering/RenderObject.cpp:
1779 (WebCore::RenderObject::selectionRoot): New method to return the RenderNamedFlowThread if any or the RenderView
1781 (WebCore::RenderObject::selectionStartEnd): If it's inside a RenderNamedFlowThread use specific method instead
1782 of the RenderView's one.
1783 * rendering/RenderObject.h: Add new method signature.
1784 * rendering/RenderView.cpp:
1785 (WebCore::RenderView::selectionBounds): Adapt method to subtrees approach.
1786 (WebCore::RenderView::subtreeSelectionBounds): Modify previous method in order to use SelectionSubtreeRoot
1788 (WebCore::RenderView::repaintSelection): Adapt method to subtrees approach.
1789 (WebCore::RenderView::repaintSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot
1791 (getNextOrPrevRenderObjectBasedOnDirection): Deleted method from r155058 as it is not needed anymore. Each
1792 subtree will have start and end positions, so the selection algorithm will always find the end.
1793 (WebCore::RenderView::setSelection): Adapt method to subtrees approach.
1794 (WebCore::RenderView::splitSelectionBetweenSubtrees): Determine start and end positions for each subtree and
1795 call setSubtreeSelection().
1796 (WebCore::RenderView::setSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot objects.
1797 * rendering/RenderView.h: Inherit from SelectionSubtreeRoot. Add signature for new helper methods receiving
1798 SelectionSubtreeRoot objects.
1799 * rendering/SelectionSubtreeRoot.cpp: Added.
1800 (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1801 (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
1802 * rendering/SelectionSubtreeRoot.h: Added. New class to identify root elements for the subtrees. With some basic
1803 attributes and methods to store the start and end positions and offsets.
1804 (WebCore::SelectionSubtreeRoot::selectionStart):
1805 (WebCore::SelectionSubtreeRoot::selectionStartPos):
1806 (WebCore::SelectionSubtreeRoot::selectionEnd):
1807 (WebCore::SelectionSubtreeRoot::selectionEndPos):
1808 (WebCore::SelectionSubtreeRoot::setSelectionStart):
1809 (WebCore::SelectionSubtreeRoot::setSelectionStartPos):
1810 (WebCore::SelectionSubtreeRoot::setSelectionEnd):
1811 (WebCore::SelectionSubtreeRoot::setSelectionEndPos):
1813 2014-04-21 Brent Fulgham <bfulgham@apple.com>
1815 [Mac] Follow-up: After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
1816 https://bugs.webkit.org/show_bug.cgi?id=131960
1817 <rdar://problem/16142100>
1819 Unreviewed build fix.
1821 * page/EventHandler.cpp:
1822 (WebCore::EventHandler::handleWheelEvent): The test to clear the
1823 last scrolled node was too broad. It should only follow this path
1824 if both the phase and momentum phase are 'None'.
1826 2014-04-21 Brent Fulgham <bfulgham@apple.com>
1828 [Mac] After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
1829 https://bugs.webkit.org/show_bug.cgi?id=131960
1830 <rdar://problem/16142100>
1832 Reviewed by Darin Adler.
1834 Test: platform/mac/fast/scrolling/scroll-div-no-latching.html
1836 * page/EventHandler.cpp:
1837 (WebCore::EventHandler::handleWheelEvent): When not latching, always clear m_latchedWheelEventElement and m_previousWheelScrolledElement.
1839 2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
1841 WebProfilerAgent::disable is calling the wrong superclass method
1842 https://bugs.webkit.org/show_bug.cgi?id=131968
1844 Reviewed by Simon Fraser.
1846 * inspector/WebProfilerAgent.cpp:
1847 (WebCore::WebProfilerAgent::disable):
1849 2014-04-21 Enrica Casucci <enrica@apple.com>
1851 Followup from http://trac.webkit.org/changeset/167624
1853 Reviewed by Darin Adler.
1855 Fixing incorrect use of ? : syntax.
1857 * editing/VisibleUnits.cpp:
1858 (WebCore::characterBeforePosition):
1860 2014-04-21 Ryuan Choi <ryuan.choi@samsung.com>
1862 Move CoordinatedGraphics related codes out of CMakeLists.txt
1863 https://bugs.webkit.org/show_bug.cgi?id=131931
1865 Reviewed by Gyuyoung Kim.
1867 Move CoordinatedGraphics related files to PlatformEfl.cmake because they are not common files.
1870 * PlatformEfl.cmake:
1872 2014-04-21 Jer Noble <jer.noble@apple.com>
1874 [MSE][Mac] AVSampleBufferDisplayLayer and AudioRenderer is overretained.
1875 https://bugs.webkit.org/show_bug.cgi?id=131963
1877 Reviewed by Jon Honeycutt.
1879 Adopt the results of -[[class alloc] init] rather than retaining them.
1881 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1882 (WebCore::SourceBufferPrivateAVFObjC::hasVideo):
1883 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1885 2014-04-21 Zalan Bujtas <zalan@apple.com>
1887 REGRESSION (r166784): Gradient at background of iCloud login page doesn’t go all the way to the bottom
1888 https://bugs.webkit.org/show_bug.cgi?id=131924
1890 Computing tile dimension for contain/cover requires higher precision than what LayoutUnit has. Switching to floats.
1892 Reviewed by Simon Fraser.
1894 Test: fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html
1896 * rendering/RenderBoxModelObject.cpp:
1897 (WebCore::RenderBoxModelObject::calculateFillTileSize):
1899 2014-04-21 Dean Jackson <dino@apple.com>
1901 Build fix for Mountain Lion.
1903 * platform/mac/SerializedPlatformRepresentationMac.mm:
1904 (WebCore::SerializedPlatformRepresentationMac::deserialize):
1906 2014-04-21 Dan Bernstein <mitz@apple.com>
1908 WebCore part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
1909 https://bugs.webkit.org/show_bug.cgi?id=131939
1911 Reviewed by David Kilzer.
1913 * WebCore.exp.in: Exported WebCore::ResourceHandle::setDefersLoading.
1915 * loader/ResourceLoadScheduler.cpp:
1916 (WebCore::ResourceLoadScheduler::setDefersLoading): Added a no-op implementation.
1917 * loader/ResourceLoadScheduler.h: Declared new virtual member function setDefersLoading.
1919 * loader/ResourceLoader.cpp:
1920 (WebCore::ResourceLoader::setDefersLoading): Added a call to the above function.
1922 2014-04-21 Brent Fulgham <bfulgham@apple.com>
1924 [Mac] Difficulty gesture scrolling vertically with trackpad after scrolling horizontally
1925 https://bugs.webkit.org/show_bug.cgi?id=131959
1926 <rdar://problem/16654523>
1928 Reviewed by Simon Fraser.
1930 * page/mac/EventHandlerMac.mm:
1931 (WebCore::deltaIsPredominantlyVertical): Added.
1932 (WebCore::scrolledToEdgeInDominantDirection): Only consider current mouse wheel event. We don't care about
1933 overall history when deciding if we are bumping against the edge of a scrollable region. Short-circuit if
1934 the element style indicates that overflow is hidden, since this means there is no scroll possible in that
1936 (WebCore::EventHandler::platformPrepareForWheelEvents): Update for new signature.
1938 2014-04-21 Eric Carlson <eric.carlson@apple.com>
1940 [Mac] implement WebKitDataCue
1941 https://bugs.webkit.org/show_bug.cgi?id=131799
1943 Reviewed by Dean Jackson.
1945 Tests: http/tests/media/track-in-band-hls-metadata.html
1946 media/track/track-datacue-value.html
1948 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
1949 * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
1951 * CMakeLists.txt: Add JSDataCueCustom.cpp.
1952 * bindings/js/JSBindingsAllInOne.cpp:
1953 * WebCore.xcodeproj/project.pbxproj: Add new files.
1955 * bindings/js/JSDataCueCustom.cpp: Added.
1956 (WebCore::JSDataCue::value):
1957 (WebCore::JSDataCue::setValue):
1958 (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
1960 * html/HTMLMediaElement.cpp:
1961 (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
1962 events when paused, don't call sort on an Vector that can't be sorted.
1964 * html/track/DataCue.cpp:
1965 (WebCore::DataCue::DataCue): Initialize m_type.
1966 (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
1967 (WebCore::DataCue::data): Ask the platform value for data if non-null.
1968 (WebCore::DataCue::setData): Clear m_platformValue and m_value.
1969 (WebCore::DataCue::isEqual): New.
1970 (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
1971 to the constructor/set by script.
1972 (WebCore::DataCue::setValue): Set m_value.
1973 * html/track/DataCue.h:
1974 * html/track/DataCue.idl:
1976 * html/track/InbandDataTextTrack.cpp:
1977 (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
1978 (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
1979 (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
1980 (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
1981 * html/track/InbandDataTextTrack.h:
1983 * html/track/InbandGenericTextTrack.cpp:
1984 (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
1986 * html/track/InbandTextTrack.h:
1988 * html/track/InbandWebVTTTextTrack.cpp:
1989 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
1991 * html/track/TextTrack.cpp:
1992 (WebCore::TextTrack::hasCue): Ditto.
1993 * html/track/TextTrack.h:
1995 * html/track/TextTrackCue.cpp:
1996 (WebCore::TextTrackCue::isEqual): New, test base class equality.
1997 * html/track/TextTrackCue.h:
1999 * html/track/TextTrackCueGeneric.cpp:
2000 (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
2001 * html/track/TextTrackCueGeneric.h:
2003 * html/track/VTTCue.cpp:
2004 (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
2005 * html/track/VTTCue.h:
2007 * platform/SerializedPlatformRepresentation.h: Added.
2008 (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
2009 (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
2011 * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
2013 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
2014 (WebCore::InbandMetadataTextTrackPrivateAVF::create):
2015 (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
2016 (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
2017 (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
2018 (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2019 (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2020 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
2022 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2023 (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
2024 (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
2025 (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
2026 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2027 (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
2028 (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
2030 Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
2031 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2032 (WebCore::AVFWrapper::currentTextTrack):
2033 (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
2034 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
2035 (WebCore::AVFWrapper::setCurrentTextTrack):
2036 (WebCore::AVFWrapper::AVFWrapper):
2037 (WebCore::AVFWrapper::processCue):
2038 (WebCore::AVFWrapper::currentTrack): Deleted.
2039 (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
2040 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
2041 (WebCore::AVFWrapper::setCurrentTrack): Deleted.
2042 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2044 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2045 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2046 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2047 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
2048 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
2049 (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
2050 (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
2051 (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
2052 (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
2053 (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
2054 (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
2055 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2056 (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
2058 Create a JSValue representation from an AVMetadataItem.
2059 * platform/mac/SerializedPlatformRepresentationMac.h: Added.
2060 (WebCore::SerializedPlatformRepresentationMac::platformType):
2061 (WebCore::SerializedPlatformRepresentationMac::nativeValue):
2062 * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
2063 (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
2064 (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
2065 (WebCore::SerializedPlatformRepresentationMac::create):
2066 (WebCore::SerializedPlatformRepresentationMac::data):
2067 (WebCore::SerializedPlatformRepresentationMac::deserialize):
2068 (WebCore::SerializedPlatformRepresentationMac::isEqual):
2069 (WebCore::toSerializedPlatformRepresentationMac):
2070 (WebCore::jsValueWithValueInContext):
2071 (WebCore::jsValueWithDataInContext):
2072 (WebCore::jsValueWithArrayInContext):
2073 (WebCore::jsValueWithDictionaryInContext):
2074 (WebCore::jsValueWithAVMetadataItemInContext):
2076 2014-04-21 Benjamin Poulain <benjamin@webkit.org>
2078 Add Element.matches, the standard name for webkitMatchesSelector
2079 https://bugs.webkit.org/show_bug.cgi?id=131922
2081 Reviewed by Andreas Kling.
2083 This patch just renames webkitMatchesSelector() to matches().
2085 * bindings/scripts/CodeGeneratorObjC.pm:
2086 (GenerateImplementation):
2087 The Objective-C binding generator only supported ImplementedAs for getters and setters.
2088 This adds support for the option so that Element.matches can be generated for Obj-C.
2091 (WebCore::Element::matches):
2092 (WebCore::Element::webkitMatchesSelector): Deleted.
2095 * inspector/InspectorCSSAgent.cpp:
2096 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2098 2014-04-21 Beth Dakin <bdakin@apple.com>
2100 topContentInset does not play well with fullscreen elements
2101 https://bugs.webkit.org/show_bug.cgi?id=131955
2103 <rdar://problem/16651925>
2105 Reviewed by Sam Weinig.
2107 Calling setNeedsLayout() is not sufficient when the topContentInset has changed
2108 dynamically. We need to perform the layout right away and update the scrollbars.
2109 This works completely when the inset changes due to entering/exiting fullscreen,
2110 but I left a FIXME behind because it is possible to change the inset dynamically
2111 just through the WK2 API and end up in a situation where everything looks right
2112 except for the scrollbars.
2113 * page/FrameView.cpp:
2114 (WebCore::FrameView::topContentInsetDidChange):
2117 (WebCore::Page::setTopContentInset):
2119 2014-04-18 Jon Honeycutt <jhoneycutt@apple.com>
2121 Empty RenderInline objects should not be line break objects.
2123 https://bugs.webkit.org/show_bug.cgi?id=131861
2124 <rdar://problem/15663617>
2126 Reviewed by David Hyatt.
2128 * rendering/line/BreakingContextInlineHeaders.h:
2129 (WebCore::BreakingContext::canBreakAtThisPosition):
2130 Don't break at this position if this is an empty RenderInline.
2132 2014-04-21 Enrica Casucci <enrica@apple.com>
2134 [iOS WebKit2] support replacements for misspelled words.
2135 https://bugs.webkit.org/show_bug.cgi?id=131827
2136 <rdar://problem/16319657>
2138 Reviewed by Darin Adler.
2140 Adds utility function to return the character before the current selection
2141 and converts the nbsp to the space character.
2144 * editing/VisibleUnits.cpp:
2145 (WebCore::characterBeforePosition):
2146 * editing/VisibleUnits.h:
2148 2014-04-21 Eric Carlson <eric.carlson@apple.com>
2150 [iOS] enable plug-in replacement
2151 https://bugs.webkit.org/show_bug.cgi?id=131947
2153 Reviewed by Jer Noble.
2155 * bindings/generic/RuntimeEnabledFeatures.cpp:
2156 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): initialize m_isPluginReplacementEnabled
2159 2014-04-21 Rik Cabanier <cabanier@adobe.com>
2161 [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
2162 https://bugs.webkit.org/show_bug.cgi?id=131824
2164 Reviewed by Dean Jackson.
2166 Removed support for non-separable blend modes from the CSS parser.
2168 Covered by existing tests
2170 * css/CSSParser.cpp:
2171 (WebCore::isValidKeywordPropertyAndValue):
2172 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2173 (PlatformCAFilters::setBlendingFiltersOnLayer):
2175 2014-04-21 David Hyatt <hyatt@apple.com>
2177 [New Multicolumn] Column set drawing under horizontal scrollbar.
2178 https://bugs.webkit.org/show_bug.cgi?id=131812.
2180 Reviewed by Sam Weinig.
2182 Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.
2184 * rendering/RenderBlockFlow.cpp:
2185 (WebCore::RenderBlockFlow::layoutBlock):
2186 (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
2187 * rendering/RenderBlockFlow.h:
2188 Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
2189 The new columns need to be able to set it to true if the amount of available column
2190 height ever changes, so that the RenderFlowThread and the sets get a layout call.
2192 * rendering/style/RenderStyle.cpp:
2193 (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
2194 Make sure that the pagination mode is set up with an auto column-fill specified. You
2195 don't ever want to balance when you set a pagination mode on the RenderView.
2197 2014-04-21 Tim Horton <timothy_horton@apple.com>
2199 [iOS WebKit2] Implement CSS viewport units
2200 https://bugs.webkit.org/show_bug.cgi?id=131863
2201 <rdar://problem/16279088>
2203 Reviewed by Darin Adler.
2206 * page/FrameView.cpp:
2207 (WebCore::FrameView::setViewportSize):
2209 (WebCore::FrameView::viewportSize):
2210 Add setViewportSize() and viewportSize().
2211 If the viewport size changes, we have to do style recalc.
2212 If we have an overridden viewport size, use it.
2214 * rendering/RenderView.cpp:
2215 (WebCore::RenderView::viewportSize):
2216 * rendering/RenderView.h:
2217 Get the size from FrameView.
2219 2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
2221 Remove unused WebKitSystemInterface functions
2222 https://bugs.webkit.org/show_bug.cgi?id=131938
2224 Reviewed by Alexey Proskuryakov.
2227 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2228 * platform/mac/WebCoreSystemInterface.h:
2229 * platform/mac/WebCoreSystemInterface.mm:
2231 2014-04-21 Andreas Kling <akling@apple.com>
2233 Move the JSString cache from DOMWrapperWorld to VM.
2234 <https://webkit.org/b/131940>
2236 Since there's no need for JSStrings to be world-specific, this patch
2237 moves the string cache to JSC::VM. This makes jsStringWithCache()
2238 a lot faster since it no longer has to jump through twenty-eleven
2239 hoops to find the DOMWrapperWorld.
2241 Reviewed by Geoff Garen.
2243 * bindings/js/DOMWrapperWorld.cpp:
2244 (WebCore::DOMWrapperWorld::clearWrappers):
2245 * bindings/js/DOMWrapperWorld.h:
2246 * bindings/js/JSDOMBinding.cpp:
2247 (WebCore::jsStringWithCache):
2249 2014-04-21 David Hyatt <hyatt@apple.com>
2251 [New Multicolumn] Column balancing is slow on float-multicol.html
2252 https://bugs.webkit.org/show_bug.cgi?id=131801
2254 Reviewed by Enrica Casucci.
2256 Added fast/multicol/tall-float.html
2258 * rendering/RenderBlock.cpp:
2259 (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2260 Make RenderFlowThreads expand to encompass floats. Also from Morten's patch for
2263 * rendering/RenderBlockFlow.cpp:
2264 (WebCore::RenderBlockFlow::computeOverflow):
2265 Fix a bug where the new multi-column code was adding in overflow for floats
2266 when it should not. This was resulting in the creation of scrollbars when none
2267 should exist. This is my own addition.
2269 (WebCore::RenderBlockFlow::addOverhangingFloats):
2270 Make RenderFlowThreads and RenderRegions ignore overhanging float additions. This
2271 comes from Morten's patch for Blink (#361551).
2273 2014-04-21 Darin Adler <darin@apple.com>
2275 REGRESSION (r160908): Safari doesn't draw rotated images properly first time
2276 https://bugs.webkit.org/show_bug.cgi?id=131930
2278 Reviewed by Anders Carlsson.
2280 With render tree creation sufficiently lazy, we had to put some explicit
2281 calls to updateStyleIfNeeded into the ImageDocument class.
2283 * dom/DOMImplementation.cpp:
2284 (WebCore::DOMImplementation::createDocument): Pass a Frame&.
2286 * html/ImageDocument.cpp:
2287 (WebCore::ImageDocument::imageSize): Added this helper function. This updates
2288 style so we can use the renderer to compute an image size taking things like
2289 orientation into account, and also passes in the zoom factor.
2290 (WebCore::ImageDocument::updateDuringParsing): Moved the body of the
2291 ImageDocumentParser::appendBytes function into this function. Since it's a
2292 member of ImageDocument, it has better access to appropriate private members,
2293 and we don't have to expose as many functions to the public. Also changed to
2294 not use the frame so much. Also merged in the code that creates the document
2295 instead of having it be a side effect in the cachedImage helper function; all
2296 the other call sites were checking for null before calling cachedImage.
2297 (WebCore::ImageDocument::finishedParsing): Moved the body of the
2298 ImageDocumentParser::finish function here. Added a call to updateStyleIfNeeded
2299 before using the renderer to get the image size.
2300 (WebCore::ImageDocumentParser::document): Made this return a reference. It's
2301 just a convenience function used in the two functions below.
2302 (WebCore::ImageDocumentParser::appendBytes): Just call updateDuringParsing.
2303 (WebCore::ImageDocumentParser::finish): Just call finishedParsing.
2304 (WebCore::ImageDocument::ImageDocument): Take a reference for the argument,
2305 use nullptr, and also initialize m_shouldShrinkImage directly instead of using
2306 a shouldShrinkToFit() helper function to do it.
2307 (WebCore::ImageDocument::createDocumentStructure): Removed unneeded check of
2308 null for the frame, since the caller does it. Removed some unneeded
2309 IGNORE_EXCEPTON and a stray semicolon. Use m_shouldShrinkImage instead of
2310 calling shouldShrinkToFit since at this early point they will be identical.
2311 (WebCore::ImageDocument::scale): Make non-const so we can call the new
2312 imageSize helper. Use Document::view instead of Frame::view. Improved the
2313 conversion to floating point so it doesn't involve a static_cast and an extra
2314 conversion from int to LayoutUnit.
2315 (WebCore::ImageDocument::resizeImageToFit): Ditto.
2316 (WebCore::ImageDocument::imageClicked): Ditto.
2317 (WebCore::ImageDocument::imageUpdated): Ditto. Also use m_shouldShrinkImage
2318 ibnstead of shouldShrinkToFit.
2319 (WebCore::ImageDocument::restoreImageSize): Ditto.
2320 (WebCore::ImageDocument::imageFitsInWindow): Ditto.
2321 (WebCore::ImageDocument::windowSizeChanged): Ditto.
2322 (WebCore::ImageDocument::cachedImage): Deleted. Moved logic into updateDuringParsing.
2323 (WebCore::ImageDocument::shouldShrinkToFit): Deleted. Moved logic into constructor.
2324 (WebCore::ImageEventListener::handleEvent): Updated for changes above.
2325 (WebCore::ImageEventListener::operator==): Simplified. No reason this has to check
2326 whether both listeners are in the same document.
2327 (WebCore::ImageDocumentElement::didMoveToNewDocument): Use nullptr.
2329 * html/ImageDocument.h: Deleted some unused things, updated for changes above,
2330 and made some memer functions private.
2332 * loader/FrameLoaderClient.h: Deleted the allowScriptFromSource, allowPlugins,
2333 allowImage, and allowDisplayingInsecureContent functions. These were only used in
2334 Chromium and are now unneeded complexity. We could bring them back if anyone wants them.
2336 * loader/MixedContentChecker.cpp:
2337 (WebCore::MixedContentChecker::canDisplayInsecureContent): Removed call to
2338 allowDisplayingInsecureContent, just use the setting directly.
2339 (WebCore::MixedContentChecker::canRunInsecureContent): Removed call to
2340 allowRunningInsecureContent, just use the setting directly.
2342 * loader/SubframeLoader.cpp:
2343 (WebCore::SubframeLoader::allowPlugins): Removed call to allowPlugins, just
2344 use the arePluginsEnabled setting directly.
2346 * loader/cache/CachedResourceLoader.cpp:
2347 (WebCore::CachedResourceLoader::canRequest): Removed call to allowScriptFromSource, just
2348 use the isScriptEnabled setting directly.
2349 (WebCore::CachedResourceLoader::clientDefersImage): Removed call to allowImage.
2351 2014-04-21 David Hyatt <hyatt@apple.com>
2353 [New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
2354 https://bugs.webkit.org/show_bug.cgi?id=131811
2356 Reviewed by Dean Jackson.
2358 Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html
2360 With block axis pagination mode, it is possible to set a column height that is not the same
2361 as the available fill height for a block. The new multi-column code had the assumption that
2362 the column height was the same as the amount of fill room you had available. This is not
2365 To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
2366 available column height as a separate variable from the computed column height. This allows
2367 the pagination API to specify a different column height that is not the same as the view's
2370 Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
2371 RenderView to work with the new column code as well.
2373 To address the layout test failures (that caused the previous rollout), I made sure to
2374 initialize m_availableHeight to 0 when m_computedColumnHeight also gets reset to 0.
2376 The assertion is not something I could reproduce on any machine, but I can see the problem.
2377 I patched Page's pageCount method to not have column code directly in Page.cpp,
2378 and to make a new pageCount() method on RenderView that Page calls
2379 into. This method is now patched to handle the new column code as well as the old. I have
2380 no real way of testing this method though, since I can't reproduce the assertion that the
2381 bots were experiencing.
2384 (WebCore::Page::pageCount):
2385 * rendering/RenderMultiColumnSet.cpp:
2386 (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2387 (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
2388 (WebCore::RenderMultiColumnSet::prepareForLayout):
2389 (WebCore::RenderMultiColumnSet::computeLogicalHeight):
2390 * rendering/RenderMultiColumnSet.h:
2391 * rendering/RenderView.cpp:
2392 (WebCore::RenderView::pageOrViewLogicalHeight):
2393 (WebCore::RenderView::pageCount):
2394 * rendering/RenderView.h:
2396 2014-04-18 Dean Jackson <dino@apple.com>
2398 [Media] Clean up localized strings in controls
2399 https://bugs.webkit.org/show_bug.cgi?id=131857
2400 <rdar://problem/16663005>
2402 Reviewed by Eric Carlson.
2404 There is no need for separate localization files
2405 on OS X and iOS. Move the small number of iOS-specific
2406 localizations into a shared file.
2408 We also don't need a function to return a static table.
2409 Ultimately I think we want a top-level WebKit object that
2410 hold the table, but for now use a global variable
2411 called UIStringTable. Since we're in an isolated world, we
2412 won't clash with anything.
2414 I noticed a few cases were we grab a localized string and
2415 then instantly run a replacement on it. This should be
2416 supported directly in the UIString() accessor.
2418 * English.lproj/mediaControlsLocalizedStrings.js: Add iOS strings. Just
2420 (mediaControlsLocalizedStrings): Deleted.
2421 * English.lproj/mediaControlsLocalizedStringsiOS.js: Removed.
2422 * Modules/mediacontrols/mediaControlsApple.js:
2423 (Controller.prototype.extend): Fix braces.
2424 (Controller.prototype.UIString): Use the string table, and allow replacement.
2425 (Controller.prototype.createControls): Use new UIString replacement.
2426 * Modules/mediacontrols/mediaControlsiOS.js:
2427 (ControllerIOS.prototype.updateWirelessPlaybackStatus): Use new UIString.
2428 (ControllerIOS.prototype.UIString): Deleted. Use the parent class version.
2429 * WebCore.xcodeproj/project.pbxproj: Remove file from Resources.
2430 * rendering/RenderThemeIOS.mm:
2431 (WebCore::RenderThemeIOS::mediaControlsScript): No need to include the iOS
2432 specific localization file.
2434 2014-04-21 Brent Fulgham <bfulgham@apple.com>
2436 [Win] Unreviewed build fix.
2438 * inspector/TimelineRecordFactory.cpp: Add missing include.
2440 2014-04-21 Zan Dobersek <zdobersek@igalia.com>
2442 Move cross-port Source/WebCore/page/ code to std::unique_ptr
2443 https://bugs.webkit.org/show_bug.cgi?id=130534
2445 Reviewed by Darin Adler.
2447 Replace uses of OwnPtr and PassOwnPtr in cross-port code under Source/WebCore/page/ with
2448 std::unique_ptr. Unnecessary OwnPtr.h and PassOwnPtr.h header inclusions are removed as well.
2451 (WebCore::Document::initSecurityContext):
2452 * dom/SecurityContext.cpp:
2453 (WebCore::SecurityContext::setContentSecurityPolicy):
2454 * dom/SecurityContext.h:
2455 * page/CaptionUserPreferences.h:
2456 * page/ContentSecurityPolicy.cpp:
2457 (WebCore::CSPDirectiveList::create):
2458 (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
2459 (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
2460 (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
2461 (WebCore::CSPDirectiveList::setCSPDirective):
2462 (WebCore::ContentSecurityPolicy::didReceiveHeader):
2463 * page/ContentSecurityPolicy.h:
2464 * page/DOMSecurityPolicy.h:
2465 * page/DOMWindow.cpp:
2466 (WebCore::PostMessageTimer::fired):
2467 (WebCore::DOMWindow::postMessageTimerFired):
2469 * page/EventHandler.cpp:
2470 (WebCore::EventHandler::EventHandler):
2471 * page/EventHandler.h:
2473 (WebCore::Frame::Frame):
2474 (WebCore::createRegExpForLabels):
2475 (WebCore::Frame::searchForLabelsAboveCell):
2476 (WebCore::Frame::searchForLabelsBeforeElement):
2477 (WebCore::matchLabelsAgainstString):
2478 (WebCore::Frame::setTiledBackingStoreEnabled):
2480 * page/FrameView.cpp:
2481 (WebCore::FrameView::addEmbeddedObjectToUpdate):
2482 (WebCore::FrameView::addSlowRepaintObject):
2483 (WebCore::FrameView::addViewportConstrainedObject):
2484 (WebCore::FrameView::addScrollableArea):
2487 (WebCore::Page::Page):
2489 * page/PageConsole.h:
2490 * page/PageThrottler.h:
2491 * page/SecurityPolicy.cpp:
2492 (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
2493 * page/animation/AnimationController.h:
2494 * page/animation/CSSPropertyAnimation.cpp:
2495 (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
2496 (WebCore::CSSPropertyAnimationWrapperMap::instance):
2497 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2498 * page/mac/PageMac.cpp:
2499 (WebCore::Page::addSchedulePair):
2500 * workers/WorkerGlobalScope.cpp:
2501 (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
2503 2014-04-21 Darin Adler <darin@apple.com>
2505 Add HashSet::takeAny
2506 https://bugs.webkit.org/show_bug.cgi?id=131928
2508 Reviewed by Benjamin Poulain.
2511 (WebCore::Document::takeAnyMediaCanStartListener): Use HashSet::takeAny.
2512 * dom/ScriptExecutionContext.cpp:
2513 (WebCore::takeAny): Deleted.
2514 (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Use HashSet::takeAny.
2516 2014-04-21 Zan Dobersek <zdobersek@igalia.com>
2518 iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
2519 https://bugs.webkit.org/show_bug.cgi?id=131916
2521 Reviewed by Darin Adler.
2523 A follow-up to r167197. Make RemoteCommandListener ctor public and use std::make_unique<>()
2524 in both versions of RemoteCommandListener::create() functions (iOS and non-iOS).
2526 * platform/RemoteCommandListener.cpp:
2527 (WebCore::RemoteCommandListener::create):
2528 * platform/RemoteCommandListener.h:
2529 (WebCore::RemoteCommandListener::RemoteCommandListener):
2530 * platform/ios/RemoteCommandListenerIOS.mm:
2531 (WebCore::RemoteCommandListener::create):
2533 2014-04-21 Andreas Kling <akling@apple.com>
2535 Micro-optimize the way we hand NodeLists to JSC.
2536 <https://webkit.org/b/131932>
2538 Use HashMap::fastAdd() when returning cached node lists and collections.
2539 10.9% progression on Bindings/get-elements-by-tag-name.html
2541 Reviewed by Antti Koivisto.
2543 * dom/NodeRareData.h:
2544 (WebCore::NodeListsNodeData::addCacheWithAtomicName):
2545 (WebCore::NodeListsNodeData::addCacheWithName):
2546 (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
2547 (WebCore::NodeListsNodeData::addCachedCollection):
2549 2014-04-21 Commit Queue <commit-queue@webkit.org>
2551 Unreviewed, rolling out r167584.
2552 https://bugs.webkit.org/show_bug.cgi?id=131929
2554 Broke Objective-C bindings test (Requested by ap on #webkit).
2558 "Add Element.matches, the standard name for
2559 webkitMatchesSelector"
2560 https://bugs.webkit.org/show_bug.cgi?id=131922
2561 http://trac.webkit.org/changeset/167584
2563 2014-04-20 Benjamin Poulain <benjamin@webkit.org>
2565 Compile the :root pseudo class and fix a related issue with :nth-child()
2566 https://bugs.webkit.org/show_bug.cgi?id=131926
2568 Reviewed by Andreas Kling.
2570 Add the :root pseudo class. This is another trivial selector, we just need to compare
2571 the element pointer with the documentElement.
2573 I discovered some issues with :nth-child(n) through the layout tests for ":root".
2574 When the pseudo class nth-child could match anything, no code was generated. That decision
2575 was taken when generating the fragments.
2577 The specification of :nth-child() has two tests: the parent test and the counter test.
2578 Since some fragments would not generate any code for :nth-child(n), they would succeed on the root,
2579 which is incorrect since the root should fail the parent test.
2581 This was fixed by moving the filtering of non-counting :nth-child() after we generate the parent
2583 We still don't generate any counter test unless required.
2585 Test: fast/selectors/nth-child-on-root.html
2587 * cssjit/SelectorCompiler.cpp:
2588 (WebCore::SelectorCompiler::addPseudoClassType):
2589 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2590 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2591 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsRoot):
2593 (WebCore::Document::documentElementMemoryOffset):
2595 2014-04-20 Benjamin Poulain <benjamin@webkit.org>
2597 Add Element.matches, the standard name for webkitMatchesSelector
2598 https://bugs.webkit.org/show_bug.cgi?id=131922
2600 Reviewed by Andreas Kling.
2602 This patch just renames webkitMatchesSelector() to matches().
2604 * bindings/scripts/CodeGeneratorObjC.pm:
2605 (GenerateImplementation):
2606 The Objective-C binding generator only supported ImplementedAs for getters and setters.
2607 This adds support for the option so that Element.matches can be generated for Obj-C.
2610 (WebCore::Element::matches):
2611 (WebCore::Element::webkitMatchesSelector): Deleted.
2614 * inspector/InspectorCSSAgent.cpp:
2615 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2617 2014-04-20 Zalan Bujtas <zalan@apple.com>
2619 Subpixel rendering: RenderLayer's size is set using enclosingRect() which can result in cruft.
2620 https://bugs.webkit.org/show_bug.cgi?id=131468
2622 Reviewed by Darin Adler.
2624 Layers marked opaque may not paint edge pixels, when RenderLayer bounds are non-integral and
2625 get device pixel snapped.
2626 For details see this: https://trac.webkit.org/r159463
2628 Test: compositing/hidpi-non-simple-compositing-layer-with-fractional-size-and-background.html
2630 * rendering/RenderLayerBacking.cpp:
2631 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2633 2014-04-19 Darin Adler <darin@apple.com>
2635 Simple layout can get confused by coordinate overflow
2636 https://bugs.webkit.org/show_bug.cgi?id=131890
2637 rdar://problem/15558510
2639 Reviewed by Andreas Kling.
2641 Test: fast/css/simple-layout-overflow.html
2643 * rendering/SimpleLineLayoutResolver.h:
2644 (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
2645 If lastLine is smaller than firstLine, just ignore it.
2647 2014-04-20 Darin Adler <darin@apple.com>
2649 ScriptExecutionContext::stopActiveDOMObjects iterates a hash map that can change during iteration (for multiple reasons, including GC)
2650 https://bugs.webkit.org/show_bug.cgi?id=52719
2652 Reviewed by Alexey Proskuryakov.
2654 At least two specific ways this can happen:
2656 1) XMLHttpRequest::stop can trigger a JavaScript garbage collection.
2657 2) NotificationCenter::stop can delete the last references to notifications;
2658 those notifications are also active DOM objects.
2660 Besides fixing the iteration in that function, did some other fixes for the
2661 ScriptExecutionContext class, including some coding style changes. Many uses
2662 of nullptr instead of 0, without listing each function separately below.
2664 * Modules/webdatabase/DatabaseContext.cpp:
2665 (WebCore::DatabaseContext::contextDestroyed): Call through to the base class
2666 version of contextDestroyed rather than repeating what it does (with a large
2667 comment that doesn't acknowledge the base class alread does it).
2668 * Modules/webdatabase/DatabaseContext.h: Removed some unneeded includes.
2669 Wrote out "private" explicitly for deriving from ActiveDOMObject. Made the
2670 ActiveDOMObject function overrides private, and marked them override and final.
2672 * dom/ActiveDOMObject.h: Updated comments. Replaced suspendIfNeededCalled with
2673 assertSuspendIfNeededWasCalled, which has an empty inline version in the header.
2674 Renamed m_suspendIfNeededCalled to m_suspendIfNeededWasCalled.
2676 * dom/ActiveDOMObject.cpp:
2677 (WebCore::ActiveDOMObject::ActiveDOMObject): Pass a reference instead of a pointer.
2678 (WebCore::ActiveDOMObject::~ActiveDOMObject): Ditto.
2679 (WebCore::ActiveDOMObject::suspendIfNeeded): Ditto.
2681 * dom/ContextDestructionObserver.cpp:
2682 (WebCore::ContextDestructionObserver::observeContext): Pass a reference instead of a pointer.
2684 * dom/MessagePort.cpp:
2685 (WebCore::MessagePort::MessagePort): Pass a reference instead of a pointer.
2686 (WebCore::MessagePort::~MessagePort): Ditto.
2687 (WebCore::MessagePort::disentangle): Ditto.
2689 * dom/ScriptExecutionContext.cpp:
2690 (WebCore::ScriptExecutionContext::ScriptExecutionContext): Updated flags used
2691 for assertions so they are conditional and updated their names.
2692 (WebCore::takeAny): Added. Helper function that we can consider for HashSet in
2693 the future; makes loop below easier to read.
2694 (WebCore::checkConsistency): Added. Assertions that were done multiple places below,
2695 and should not be written over and over again.
2696 (WebCore::ScriptExecutionContext::~ScriptExecutionContext): Changed to use C++11
2697 for loops and the takeAny function above.
2698 (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Ditto.
2699 (WebCore::ScriptExecutionContext::createdMessagePort): Changed to take a reference
2700 for clarity and so it doesn't have to do an assert the pointer is non-null.
2701 (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
2702 (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects): Changed to use
2703 C++11 for loop and reworded comment and redid assertions.
2704 (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ditto.
2705 (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Ditto.
2706 (WebCore::ScriptExecutionContext::stopActiveDOMObjects): Changed to support
2707 removal of an active DOM object during the stop function. Included new comments
2708 to clarify what the rules are.
2709 (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded): Changed to take
2710 a reference for clarity and so it doesn't have to assert a pointer is non-null.
2711 (WebCore::ScriptExecutionContext::didCreateActiveDOMObject): Ditto. Also changed to
2712 use RELEASE_ASSERT instead of CRASH.
2713 (WebCore::ScriptExecutionContext::willDestroyActiveDOMObject): Ditto.
2714 (WebCore::ScriptExecutionContext::didCreateDestructionObserver): Ditto.
2715 (WebCore::ScriptExecutionContext::willDestroyDestructionObserver): Ditto.
2716 (WebCore::ScriptExecutionContext::closeMessagePorts): Moved the body of this
2717 function into its one call site, ScriptExecutionContext::stopActiveDOMObjects,
2718 since it's simple enough when written as a C++11 for loop.
2719 (WebCore::ScriptExecutionContext::hasPendingActivity): Added. This function was
2720 already exported for workers, and implementing it outside this class required
2721 exposing the private HashSet members; more sensible to implement it here and
2722 simply make it public in WorkerGlobalScope.
2724 * dom/ScriptExecutionContext.h: Removed unnecessary includes and forward declarations.
2725 Removed a long-ago-fixed FIXME. Changed various functions to take references instead of
2726 pointers. Added a protected hasPendingActivity function, deleted the closeMessagePorts
2727 function, deleted the ActiveDOMObjectsSet typedef, made the assertion flags be
2728 !ASSERT_DISABLED only, and deleted the messagePorts and activeDOMObjects functions.
2730 * workers/WorkerGlobalScope.cpp:
2731 (WebCore::WorkerGlobalScope::hasPendingActivity): Deleted. This is now implemented
2734 * workers/WorkerGlobalScope.h: Make hasPendingActivity function from the base class
2735 public instead of declaring it in this class.
2737 2014-04-20 Brent Fulgham <bfulgham@apple.com>
2739 [Mac] Unable to select 'Off' or 'Auto' from track menu when tracks consist of unsupported track types
2740 https://bugs.webkit.org/show_bug.cgi?id=131908
2741 <rdar://problem/15999882>
2743 Reviewed by Eric Carlson.
2745 * html/HTMLMediaElement.cpp:
2746 (WebCore::HTMLMediaElement::setSelectedTextTrack): When the user selects 'Off', make sure the currently 'showing'
2747 track is switched to 'disabled'.
2749 2014-04-20 Andreas Kling <akling@apple.com>
2751 Speed up jsStringWithCache() through WeakGCMap inlining.
2752 <https://webkit.org/b/131923>
2754 Inline the common path of WeakGCMap::add() in jsStringWithCache().
2755 26% progression on Bindings/id-getter.html
2757 Reviewed by Darin Adler.
2760 * bindings/js/JSDOMBinding.h:
2761 * bindings/js/JSDOMBinding.cpp:
2762 (WebCore::jsStringWithCache):
2764 Move jsStringWithCache() out of line since we're now blowing up
2765 its size quite a bit.
2767 2014-04-20 Benjamin Poulain <benjamin@webkit.org>
2769 Fix the build after r167574
2771 * cssjit/SelectorCompiler.cpp:
2772 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2774 2014-04-20 Benjamin Poulain <benjamin@webkit.org>
2776 Compile the pseudo class :target
2777 https://bugs.webkit.org/show_bug.cgi?id=131904
2779 Reviewed by Andreas Kling.
2781 The pseudo class :target is trivial, it just compare the current element with
2782 Document::cssTarget().
2784 * cssjit/SelectorCompiler.cpp:
2785 (WebCore::SelectorCompiler::addPseudoType):
2786 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2787 (WebCore::SelectorCompiler::getDocument):
2788 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
2789 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsTarget):
2791 (WebCore::Document::cssTargetMemoryOffset):
2793 2014-04-20 Benjamin Poulain <benjamin@webkit.org>
2795 Rename the CSSSelector PseudoType to PseudoClassType
2796 https://bugs.webkit.org/show_bug.cgi?id=131907
2798 Reviewed by Andreas Kling.
2800 Pseudo Elements and Page Pseudo Classes have been moved out of PseudoType in previous patches.
2801 The remaining values in the PseudoType enumeration are the pseudo classes.
2803 This patch is the final clean up, PseudoType is renamed to PseudoClassType.
2805 * css/CSSGrammar.y.in:
2806 * css/CSSParserValues.cpp:
2807 (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
2808 * css/CSSParserValues.h:
2809 (WebCore::CSSParserSelector::pseudoClassType):
2810 (WebCore::CSSParserSelector::pseudoType): Deleted.
2811 * css/CSSSelector.cpp:
2812 (WebCore::CSSSelector::specificityForOneSelector):
2813 (WebCore::appendPseudoClassFunctionTail):
2814 (WebCore::CSSSelector::selectorText):
2815 * css/CSSSelector.h:
2816 (WebCore::CSSSelector::pseudoClassType):
2817 (WebCore::CSSSelector::pseudoElementType):
2818 (WebCore::CSSSelector::pagePseudoClassType):
2819 (WebCore::pseudoClassIsRelativeToSiblings):
2820 (WebCore::CSSSelector::isSiblingSelector):
2821 (WebCore::CSSSelector::CSSSelector):
2822 (WebCore::CSSSelector::pseudoType): Deleted.
2824 (WebCore::RuleSet::findBestRuleSetAndAdd):
2825 * css/SelectorChecker.cpp:
2826 (WebCore::SelectorChecker::checkOne):
2827 (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2828 (WebCore::SelectorChecker::determineLinkMatchType):
2829 (WebCore::SelectorChecker::matchesFocusPseudoClass):
2830 * css/SelectorChecker.h:
2831 (WebCore::SelectorChecker::isCommonPseudoClassSelector):
2832 * css/SelectorCheckerFastPath.cpp:
2833 (WebCore::SelectorCheckerFastPath::commonPseudoClassSelectorMatches):
2834 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2835 * css/SelectorPseudoTypeMap.h:
2836 * css/StyleResolver.cpp:
2837 (WebCore::StyleResolver::styleForElement):
2838 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2839 (enumerablePseudoType):
2840 * cssjit/SelectorCompiler.cpp:
2841 (WebCore::SelectorCompiler::addPseudoClassType):
2842 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2843 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2844 (WebCore::SelectorCompiler::addPseudoType): Deleted.
2845 * inspector/InspectorCSSAgent.cpp:
2846 (WebCore::computePseudoClassMask):
2847 (WebCore::InspectorCSSAgent::forcePseudoState):
2848 * inspector/InspectorCSSAgent.h:
2849 * inspector/InspectorInstrumentation.cpp:
2850 (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
2851 * inspector/InspectorInstrumentation.h:
2852 (WebCore::InspectorInstrumentation::forcePseudoState):
2854 2014-04-19 Alexey Proskuryakov <ap@apple.com>
2856 Crashes in HTMLFormElement::submit.
2857 https://bugs.webkit.org/show_bug.cgi?id=131910
2858 <rdar://problem/15661790>
2860 Based on a patch by Kent Tamura.
2862 Reviewed by Anders Carlsson.
2864 Tests: fast/forms/form-submission-crash-2.html
2865 fast/forms/form-submission-crash.html
2867 Code that executes arbitrary JS needs to protect objects that it uses afterwards.
2869 * html/HTMLFormElement.cpp:
2870 (WebCore::HTMLFormElement::prepareForSubmission):
2871 (WebCore::HTMLFormElement::submit):
2872 * loader/FrameLoader.cpp:
2873 (WebCore::FrameLoader::submitForm):
2875 2014-04-20 Antti Koivisto <antti@apple.com>
2877 Text bounding box computation for simple line layout is wrong
2878 https://bugs.webkit.org/show_bug.cgi?id=131912
2880 Reviewed by Andreas Kling.
2882 Top-left is currently the first line top-left which is not always correct.
2885 * rendering/RenderText.cpp:
2886 (WebCore::RenderText::firstRunLocation):
2887 (WebCore::RenderText::firstRunOrigin): Deleted.
2888 (WebCore::RenderText::firstRunX): Deleted.
2889 (WebCore::RenderText::firstRunY): Deleted.
2891 Keep just one accessor and rename it.
2892 Encapsulate the line box and simple line versions.
2894 * rendering/RenderText.h:
2895 * rendering/RenderTextLineBoxes.cpp:
2896 (WebCore::RenderTextLineBoxes::firstRunLocation):
2900 * rendering/RenderTextLineBoxes.h:
2901 * rendering/RenderTreeAsText.cpp:
2903 Simplify RenderText dumping.
2905 (WebCore::RenderTreeAsText::writeRenderObject):
2906 * rendering/SimpleLineLayoutFunctions.cpp:
2907 (WebCore::SimpleLineLayout::computeTextBoundingBox):
2909 Return the correct x position.
2911 (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
2913 Simple line version.
2915 * rendering/SimpleLineLayoutFunctions.h:
2916 * rendering/svg/SVGRenderTreeAsText.cpp:
2917 (WebCore::writeSVGInlineText):
2919 2014-04-19 Zalan Bujtas <zalan@apple.com>
2921 Subpixel rendering: RenderLayer's clipping should snap to device pixel boundaries.
2922 https://bugs.webkit.org/show_bug.cgi?id=131466
2924 Reviewed by Simon Fraser.
2926 Fractional pixel clipping can produce cruft on RenderLayers. Since RenderLayer
2927 sizing and painting are snapped, painting clip rect needs to be snapped the same way.
2929 Test: fast/clip/clip-when-rect-has-fractional-pixel-value.html
2931 * rendering/RenderLayer.cpp:
2932 (WebCore::RenderLayer::clipToRect):
2934 2014-04-19 Brent Fulgham <bfulgham@apple.com>
2936 Latched scrolling may interact badly with custom programmatic scrolling
2937 https://bugs.webkit.org/show_bug.cgi?id=131869
2938 <rdar://problem/16249557>
2940 Reviewed by Darin Adler.
2943 (WebCore::Element::setScrollLeft): Mark scrollable area as having
2944 been scrolled programmatically.
2945 (WebCore::Element::setScrollTop): Ditto.
2946 * page/EventHandler.cpp:
2947 (WebCore::EventHandler::handleWheelEvent): Check for programmatic scroll, and
2948 clear latched state if the handler manually scrolled. Clear programmatic
2949 scroll state at the end of event handling.
2950 (WebCore::EventHandler::clearLatchedState): Refactored code.
2951 * page/EventHandler.h:
2952 * page/mac/EventHandlerMac.mm:
2953 (WebCore::EventHandler::platformPrepareForWheelEvents): Check
2954 if scrollable area was scrolled programmatically. If it was, do
2955 not honor latching behavior.
2956 * platform/ScrollableArea.cpp:
2957 (WebCore::ScrollableArea::ScrollableArea): Initialize new member.
2958 * platform/ScrollableArea.h:
2959 (WebCore::ScrollableArea::isScrolledProgrammatically): Added.
2960 (WebCore::ScrollableArea::setScrolledProgrammatically): Added.
2962 2014-04-19 Chris Fleizach <cfleizach@apple.com>
2964 AX: grid rows are not recognized do to lack of explicit role="row", role="gridcell"
2965 https://bugs.webkit.org/show_bug.cgi?id=131819
2967 Reviewed by Darin Adler.
2969 Test: accessibility/table-with-missing-aria-role-rows.html
2971 If a table is using role="grid", and it has <tr> elements that do not have
2972 role="row", we should still treat them as row elements.
2974 * accessibility/AccessibilityARIAGrid.cpp:
2975 (WebCore::AccessibilityARIAGrid::addTableCellChild):
2977 2014-04-19 Chris Fleizach <cfleizach@apple.com>
2979 AX: Malformed tables exposing incorrect col and colSpans
2980 https://bugs.webkit.org/show_bug.cgi?id=131796
2982 Reviewed by Darin Adler.
2984 Test: accessibility/table-incorrect-colspan-cell.html
2986 When a developer has specified malformed colspans, accessibility is reporting those values instead of the effective column information.
2988 * accessibility/AccessibilityTableCell.cpp:
2989 (WebCore::AccessibilityTableCell::columnIndexRange):
2991 2014-04-19 Benjamin Poulain <bpoulain@apple.com>
2993 Make the CSS JIT compile for ARM64
2994 https://bugs.webkit.org/show_bug.cgi?id=131834
2996 Reviewed by Gavin Barraclough.
2998 Add the CPU specific code required to compile SelectorCompiler on ARM64.
2999 The code is absolutely non-functional, it would crash immediately, but it compiles.
3001 * cssjit/FunctionCall.h:
3002 (WebCore::FunctionCall::FunctionCall):
3003 (WebCore::FunctionCall::callAndBranchOnCondition):
3004 * cssjit/RegisterAllocator.h:
3005 What am I supposed to do with all those registers? There are so many of them :)
3006 The array calleeSavedRegisters is defined for compatibility but it cannot be reached at the moment.
3008 (WebCore::RegisterAllocator::isValidRegister):
3009 * cssjit/SelectorCompiler.cpp:
3010 (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
3011 Implement modulo by doing dividend - (divisor * int(dividend/divisor)).
3013 * cssjit/StackAllocator.h:
3014 StackAllocator will need a small redesign to handle the 16 bytes alligned stack of
3016 The code has been modified to build but it is pretty useless.
3018 (WebCore::StackAllocator::allocateUninitialized):
3019 (WebCore::StackAllocator::push):
3020 (WebCore::StackAllocator::pop):
3021 (WebCore::StackAllocator::popAndDiscard):
3022 (WebCore::StackAllocator::popAndDiscardUpTo):
3023 (WebCore::StackAllocator::alignStackPreFunctionCall):
3024 (WebCore::StackAllocator::unalignStackPostFunctionCall):
3026 2014-04-19 Simon Fraser <simon.fraser@apple.com>
3028 [UI-side compositing] Implement blend modes
3029 https://bugs.webkit.org/show_bug.cgi?id=131891
3030 <rdar://problem/16490085>
3032 Reviewed by Tim Horton.
3034 Implement blend modes with UI-side compositing.
3036 PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
3037 PlatformCALayerMac and PlatformCALayerRemote.
3038 PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
3039 layer, so it can be called from the UI process on a CALayer*.
3041 Fix an issue with GraphicsLayerCA::LayerChange flags. 1 << 31 shifts
3042 a signed integer, so it ended up setting all the high bits in m_uncommittedChanges,
3043 causing us to push blend modes to the UI process for every layer. Fix by shifting
3044 an unsigned long long (1LLU << 31). This should also fix a build warning on Windows.
3047 * platform/graphics/ca/GraphicsLayerCA.h:
3048 * platform/graphics/ca/PlatformCAFilters.h:
3049 * platform/graphics/ca/PlatformCALayer.h:
3050 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3051 (PlatformCAFilters::setBlendingFiltersOnLayer):
3052 * platform/graphics/ca/mac/PlatformCALayerMac.h:
3053 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3054 (PlatformCALayerMac::setFilters):
3055 (PlatformCALayerMac::setBlendMode):
3056 (PlatformCALayer::setBlendMode): Deleted.
3058 2014-04-19 Joseph Pecoraro <pecoraro@apple.com>
3060 Fix AVPlayerController leak on pages with video
3061 https://bugs.webkit.org/show_bug.cgi?id=131878
3063 Reviewed by Eric Carlson.
3065 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3066 (-[WebAVPlayerController init]):
3067 Assigning to the retain property will increment the count,
3068 so balance the alloc with an autorelease.
3070 2014-04-19 Andreas Kling <akling@apple.com>
3072 Slap ALWAYS_INLINE on Element attribute lookup things.
3073 <https://webkit.org/b/131892>
3075 Most of the "inline" helpers for setting/getting attributes were not
3076 actually getting inlined by the compiler, so let's make that happen.
3078 Reviewed by Geoffrey Garen.
3081 (WebCore::Element::synchronizeAttribute):
3082 * dom/ElementData.h:
3083 (WebCore::ElementData::findAttributeByName):
3084 (WebCore::ElementData::findAttributeIndexByName):
3086 2014-04-19 Darin Adler <darin@apple.com>
3088 Telephone number detection should respect its setting consistently
3089 https://bugs.webkit.org/show_bug.cgi?id=131893
3090 rdar://problem/16597639
3092 Reviewed by Tim Horton.
3094 * editing/Editor.cpp:
3095 (WebCore::Editor::respondToChangedSelection): Only start the timer
3096 if shouldDetectTelephoneNumbers returns true.
3097 (WebCore::Editor::shouldDetectTelephoneNumbers): Added. Calls both
3098 isTelephoneNumberParsingEnabled and TelephoneNumberDetector::isSupported.
3099 (WebCore::Editor::scanSelectionForTelephoneNumbers): Use
3100 shouldDetectTelephoneNumbers.
3101 (WebCore::Editor::clearDataDetectedTelephoneNumbers): Use document()
3102 instead of m_frame.document().
3104 * editing/Editor.h: Added declaration of shouldDetectTelephoneNumbers.
3106 2014-04-19 Andrei Bucur <abucur@adobe.com>
3108 [CSS Regions] Harden the layout in case there are no regions
3109 https://bugs.webkit.org/show_bug.cgi?id=131517
3111 Reviewed by Mihnea Ovidenie.
3113 The patch fixes the cases when the content of a flow thread is not
3114 properly invalidated when all the regions of its chain are removed.
3116 Test: fast/regions/simplified-layout-no-regions.html
3118 * rendering/RenderFlowThread.cpp:
3119 (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3120 * rendering/RenderRegion.cpp:
3121 (WebCore::RenderRegion::ensureOverflowForBox):
3123 2014-04-19 Zalan Bujtas <zalan@apple.com>
3125 https://bugs.webkit.org/show_bug.cgi?id=131594
3126 Subpixel rendering: WK1: Wrong repaint rect is calculated when layer has non-compositing transform.
3128 Reviewed by Simon Fraser.
3130 We need to snap the repaint rect for transformed object the same way when we paint them.
3132 Test: fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html
3134 * rendering/RenderBox.cpp:
3135 (WebCore::RenderBox::computeRectForRepaint):
3137 2014-04-18 Simon Fraser <simon.fraser@apple.com>
3139 Use 'override' in GraphicsLayerCA
3140 https://bugs.webkit.org/show_bug.cgi?id=131882
3142 Reviewed by Tim Horton.
3144 Add 'override' to all overridden functions. Found a few that need
3145 not have been virtual. Removed "allowTiledLayer" stuff that was
3149 * platform/graphics/ca/GraphicsLayerCA.cpp:
3150 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3151 (WebCore::GraphicsLayerCA::requiresTiledLayer):
3152 (WebCore::GraphicsLayerCA::setAllowTiledLayer): Deleted.
3153 * platform/graphics/ca/GraphicsLayerCA.h:
3154 (WebCore::GraphicsLayerCA::platformCALayer):
3155 (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
3156 (WebCore::GraphicsLayerCA::allowTiledLayer): Deleted.
3157 (WebCore::GraphicsLayerCA::isGraphicsLayerCA): Deleted.
3158 (WebCore::GraphicsLayerCA::platformCALayerLayoutSublayersOfLayer): Deleted.
3159 (WebCore::GraphicsLayerCA::platformCALayerRespondsToLayoutChanges): Deleted.
3160 (WebCore::GraphicsLayerCA::platformCALayerContentsOrientation): Deleted.
3161 (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders): Deleted.
3162 (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount): Deleted.
3163 (WebCore::GraphicsLayerCA::platformCALayerContentsOpaque): Deleted.
3164 (WebCore::GraphicsLayerCA::platformCALayerDrawsContent): Deleted.
3165 (WebCore::GraphicsLayerCA::platformCALayerLayerDidDisplay): Deleted.
3167 2014-04-18 Timothy Hatcher <timothy@apple.com>
3169 Web Inspector: Move InspectorProfilerAgent to JavaScriptCore
3170 https://bugs.webkit.org/show_bug.cgi?id=131673
3172 Passes existing profiler and inspector tests.
3174 Reviewed by Joseph Pecoraro.
3177 * DerivedSources.make:
3178 * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Added.
3180 * WebCore.vcxproj/WebCore.vcxproj:
3181 * WebCore.vcxproj/WebCore.vcxproj.filters:
3182 * WebCore.xcodeproj/project.pbxproj:
3183 * bindings/js/ScriptProfile.cpp: Removed.
3184 * bindings/js/ScriptProfile.h:
3185 * bindings/js/ScriptProfiler.cpp: Removed.
3186 * bindings/js/ScriptProfiler.h: Removed.
3187 * inspector/InspectorAllInOne.cpp:
3188 * inspector/InspectorConsoleInstrumentation.h:
3189 (WebCore::InspectorInstrumentation::profilerEnabled):
3190 (WebCore::InspectorInstrumentation::startProfiling):
3191 (WebCore::InspectorInstrumentation::stopProfiling):
3192 * inspector/InspectorController.cpp:
3193 (WebCore::InspectorController::InspectorController):
3194 * inspector/InspectorController.h:
3195 * inspector/InspectorInstrumentation.cpp:
3196 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3197 (WebCore::InspectorInstrumentation::startProfilingImpl):
3198 (WebCore::InspectorInstrumentation::stopProfilingImpl):
3199 (WebCore::InspectorInstrumentation::consoleTimeStampImpl): Deleted.
3200 * inspector/InspectorInstrumentation.h:
3201 * inspector/InspectorProfilerAgent.cpp: Removed.
3202 * inspector/InspectorProfilerAgent.h: Removed.
3203 * inspector/InspectorTimelineAgent.cpp:
3204 (WebCore::startProfiling):
3205 (WebCore::stopProfiling):
3206 (WebCore::InspectorTimelineAgent::willCallFunction):
3207 (WebCore::InspectorTimelineAgent::didCallFunction):
3208 (WebCore::InspectorTimelineAgent::willEvaluateScript):
3209 (WebCore::InspectorTimelineAgent::didEvaluateScript):
3210 (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
3211 * inspector/InstrumentingAgents.h:
3212 (WebCore::InstrumentingAgents::inspectorProfilerAgent):
3213 (WebCore::InstrumentingAgents::setInspectorProfilerAgent):
3214 * inspector/PageDebuggerAgent.cpp:
3215 (WebCore::PageDebuggerAgent::sourceMapURLForScript): Deleted.
3216 * inspector/PageDebuggerAgent.h:
3217 * inspector/PageProfilerAgent.cpp: Added.
3218 (WebCore::PageProfilerAgent::PageProfilerAgent):
3219 (WebCore::PageProfilerAgent::profilingGlobalExecState):
3220 * inspector/PageProfilerAgent.h: Added.
3221 (WebCore::PageProfilerAgent::~PageProfilerAgent):
3222 * inspector/ScriptProfile.idl:
3223 * inspector/TimelineRecordFactory.cpp:
3224 (WebCore::TimelineRecordFactory::appendProfile):
3225 * inspector/TimelineRecordFactory.h:
3226 * inspector/WebConsoleAgent.cpp:
3227 * inspector/WebProfilerAgent.cpp: Added.
3228 (WebCore::WebProfilerAgent::WebProfilerAgent):
3229 (WebCore::WebProfilerAgent::enable):
3230 (WebCore::WebProfilerAgent::disable):
3231 * inspector/WebProfilerAgent.h: Added.
3232 (WebCore::WebProfilerAgent::~WebProfilerAgent):
3233 * inspector/WorkerInspectorController.cpp:
3234 (WebCore::WorkerInspectorController::WorkerInspectorController):
3235 * inspector/WorkerProfilerAgent.cpp: Added.
3236 (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
3237 (WebCore::WorkerProfilerAgent::profilingGlobalExecState):
3238 * inspector/WorkerProfilerAgent.h: Added.
3239 (WebCore::WorkerProfilerAgent::~WorkerProfilerAgent):
3240 * loader/appcache/ApplicationCacheGroup.cpp:
3241 * page/PageConsole.cpp:
3242 (WebCore::PageConsole::profile):
3243 (WebCore::PageConsole::profileEnd):
3244 (WebCore::PageConsole::time): Deleted.
3245 (WebCore::PageConsole::timeEnd): Deleted.
3246 (WebCore::PageConsole::timeStamp): Deleted.
3247 * page/PageConsole.h:
3248 * testing/Internals.cpp:
3249 * testing/Internals.h:
3250 * xml/XMLHttpRequest.cpp:
3252 2014-04-18 Simon Fraser <simon.fraser@apple.com>
3254 Contents of directly composited image layers are sometimes missing
3255 https://bugs.webkit.org/show_bug.cgi?id=131880
3257 Reviewed by Tim Horton.
3259 RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
3260 GraphicsLayer had a contents layer to determine whether to call code
3261 that updates the contents rect. However, on Mac, we don't make a contents
3262 layer until later at layer flush time. That would result in an empty
3263 contentsRect being set.
3265 Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
3266 and on Mac consulting the m_contentsLayerPurpose flag, which is set
3267 at the appropriate time.
3269 Test: compositing/images/update-content-rect.html
3271 * platform/ScrollView.cpp:
3272 (WebCore::positionScrollbarLayer):
3273 * platform/graphics/GraphicsLayer.cpp:
3274 (WebCore::GraphicsLayer::getDebugBorderInfo):
3275 * platform/graphics/GraphicsLayer.h:
3276 (WebCore::GraphicsLayer::usesContentsLayer):
3277 (WebCore::GraphicsLayer::hasContentsLayer): Deleted.
3278 * platform/graphics/ca/GraphicsLayerCA.h:
3279 (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
3280 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3281 (WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
3282 (WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
3283 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3284 * rendering/RenderLayerBacking.cpp:
3285 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3286 (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
3287 (WebCore::RenderLayerBacking::compositingLayerType):
3289 2014-04-18 Commit Queue <commit-queue@webkit.org>
3291 Unreviewed, rolling out r167527.
3292 https://bugs.webkit.org/show_bug.cgi?id=131883
3294 Broke 32-bit build (Requested by ap on #webkit).
3298 "[Mac] implement WebKitDataCue"
3299 https://bugs.webkit.org/show_bug.cgi?id=131799
3300 http://trac.webkit.org/changeset/167527
3302 2014-04-18 Eric Carlson <eric.carlson@apple.com>
3304 [Mac] implement WebKitDataCue
3305 https://bugs.webkit.org/show_bug.cgi?id=131799
3307 Reviewed by Dean Jackson.
3309 Tests: http/tests/media/track-in-band-hls-metadata.html
3310 media/track/track-datacue-value.html
3312 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
3313 * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
3315 * CMakeLists.txt: Add JSDataCueCustom.cpp.
3316 * bindings/js/JSBindingsAllInOne.cpp:
3317 * WebCore.xcodeproj/project.pbxproj: Add new files.
3319 * bindings/js/JSDataCueCustom.cpp: Added.
3320 (WebCore::JSDataCue::value):
3321 (WebCore::JSDataCue::setValue):
3322 (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
3324 * html/HTMLMediaElement.cpp:
3325 (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
3326 events when paused, don't call sort on an Vector that can't be sorted.
3328 * html/track/DataCue.cpp:
3329 (WebCore::DataCue::DataCue): Initialize m_type.
3330 (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
3331 (WebCore::DataCue::data): Ask the platform value for data if non-null.
3332 (WebCore::DataCue::setData): Clear m_platformValue and m_value.
3333 (WebCore::DataCue::isEqual): New.
3334 (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
3335 to the constructor/set by script.
3336 (WebCore::DataCue::setValue): Set m_value.
3337 * html/track/DataCue.h:
3338 * html/track/DataCue.idl:
3340 * html/track/InbandDataTextTrack.cpp:
3341 (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
3342 (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
3343 (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
3344 (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
3345 * html/track/InbandDataTextTrack.h:
3347 * html/track/InbandGenericTextTrack.cpp:
3348 (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
3350 * html/track/InbandTextTrack.h:
3352 * html/track/InbandWebVTTTextTrack.cpp:
3353 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
3355 * html/track/TextTrack.cpp:
3356 (WebCore::TextTrack::hasCue): Ditto.
3357 * html/track/TextTrack.h:
3359 * html/track/TextTrackCue.cpp:
3360 (WebCore::TextTrackCue::isEqual): New, test base class equality.
3361 * html/track/TextTrackCue.h:
3363 * html/track/TextTrackCueGeneric.cpp:
3364 (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
3365 * html/track/TextTrackCueGeneric.h:
3367 * html/track/VTTCue.cpp:
3368 (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
3369 * html/track/VTTCue.h:
3371 * platform/SerializedPlatformRepresentation.h: Added.
3372 (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
3373 (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
3375 * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
3377 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
3378 (WebCore::InbandMetadataTextTrackPrivateAVF::create):
3379 (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
3380 (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
3381 (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
3382 (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
3383 (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
3384 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
3386 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3387 (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
3388 (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
3389 (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
3390 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3391 (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
3392 (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
3394 Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
3395 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3396 (WebCore::AVFWrapper::currentTextTrack):
3397 (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
3398 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
3399 (WebCore::AVFWrapper::setCurrentTextTrack):
3400 (WebCore::AVFWrapper::AVFWrapper):
3401 (WebCore::AVFWrapper::processCue):
3402 (WebCore::AVFWrapper::currentTrack): Deleted.
3403 (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
3404 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
3405 (WebCore::AVFWrapper::setCurrentTrack): Deleted.
3406 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3408 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3409 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3410 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3411 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
3412 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
3413 (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
3414 (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
3415 (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
3416 (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
3417 (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
3418 (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
3419 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3420 (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
3422 Create a JSValue representation from an AVMetadataItem.
3423 * platform/mac/SerializedPlatformRepresentationMac.h: Added.
3424 (WebCore::SerializedPlatformRepresentationMac::platformType):
3425 (WebCore::SerializedPlatformRepresentationMac::nativeValue):
3426 * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
3427 (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
3428 (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
3429 (WebCore::SerializedPlatformRepresentationMac::create):
3430 (WebCore::SerializedPlatformRepresentationMac::data):
3431 (WebCore::SerializedPlatformRepresentationMac::deserialize):
3432 (WebCore::SerializedPlatformRepresentationMac::isEqual):
3433 (WebCore::toSerializedPlatformRepresentationMac):
3434 (WebCore::jsValueWithValueInContext):
3435 (WebCore::jsValueWithDataInContext):
3436 (WebCore::jsValueWithArrayInContext):
3437 (WebCore::jsValueWithDictionaryInContext):
3438 (WebCore::jsValueWithAVMetadataItemInContext):
3440 2014-04-18 Jon Honeycutt <jhoneycutt@apple.com>
3442 Harden RenderInline::inlineElementContinuation()
3444 <https://bugs.webkit.org/show_bug.cgi?id=131858>
3446 Reviewed by Sam Weinig.
3448 No new tests, as there are no known cases of this happening.
3450 * rendering/RenderInline.cpp:
3451 (WebCore::RenderInline::inlineElementContinuation):
3452 Return nullptr if the continuation is neither a RenderInline nor a
3455 2014-04-18 Stephanie Lewis <slewis@apple.com>