1 2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
3 Subclass CachedFont for SVG fonts
4 https://bugs.webkit.org/show_bug.cgi?id=138686
6 Reviewed by Simon Fraser.
8 Re-landing due to flakey bots.
10 CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
11 Splitting out this SVG-specific code into a subclass of CachedFont
14 No new tests because there is no behavior change.
17 * WebCore.vcxproj/WebCore.vcxproj:
18 * WebCore.vcxproj/WebCore.vcxproj.filters:
19 * WebCore.xcodeproj/project.pbxproj:
20 * css/CSSFontFaceSource.cpp:
21 (WebCore::CSSFontFaceSource::getFontData): There are two sections
22 in this function; one for SVG fonts and one for regular fonts.
23 I've moved these two sections into CachedFont and SVGCachedFont,
24 thereby simplifying this function.
25 (WebCore::CSSFontFaceSource::ensureFontData): Ditto.
26 (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
27 (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
28 (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
29 * css/CSSFontFaceSource.h: Put functions that are simple enough to
31 * css/CSSFontFaceSrcValue.cpp:
32 (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
34 (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
35 from CSSFontSelector to CachedResourceHandle regarding if we should
36 be using SVGCachedFont instead of CachedFont.
37 * css/CSSFontFaceSrcValue.h: New convenience function.
38 * css/CSSFontSelector.cpp:
39 (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
40 * inspector/InspectorPageAgent.cpp:
41 (WebCore::InspectorPageAgent::cachedResourceType): Update for new
43 (WebCore::cachedResourcesForFrame): Ditto.
44 * loader/cache/CachedFont.cpp:
45 (WebCore::CachedFont::CachedFont):
46 (WebCore::CachedFont::ensureCustomFontData): Taken from
47 CSSFontFaceSource::getFontData()
48 (WebCore::CachedFont::getFontData): Ditto.
49 (WebCore::CachedFont::platformDataFromCustomData): Ditto.
50 (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
51 (WebCore::CachedFont::getSVGFontById): Ditto.
52 * loader/cache/CachedFont.h:
53 * loader/cache/CachedResource.cpp:
54 (WebCore::defaultPriorityForResourceType): Update for new enum
56 * loader/cache/CachedResource.h:
57 * loader/cache/CachedResourceLoader.cpp:
58 (WebCore::createResource): Takes new boolean.
59 (WebCore::CachedResourceLoader::requestFont): Ditto.
60 (WebCore::CachedResourceLoader::checkInsecureContent): Update for
62 (WebCore::CachedResourceLoader::canRequest): Ditto.
63 * loader/cache/CachedResourceLoader.h:
64 * loader/cache/CachedSVGFont.cpp: Added.
65 (WebCore::CachedSVGFont::CachedSVGFont): Moved from
66 CSSFontFaceSource::getFontData() and CachedFont
67 (WebCore::CachedSVGFont::getFontData): Ditto.
68 (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
69 (WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
70 (WebCore::CachedSVGFont::getSVGFontById): Ditto.
71 (WebCore::CachedSVGFont::firstFontFace): Ditto.
72 * loader/cache/CachedSVGFont.h: Subclass CachedFont.
73 * loader/cache/MemoryCache.cpp:
74 (WebCore::MemoryCache::getStatistics): Update for new enum.
75 * svg/SVGFontFaceUriElement.cpp:
76 (WebCore::isSVGFontTarget): Convenience function.
77 (WebCore::SVGFontFaceUriElement::loadFont): Update for new
80 2014-11-18 Chris Dumez <cdumez@apple.com>
82 Update the Vector API to deal with unsigned types instead of size_t
83 https://bugs.webkit.org/show_bug.cgi?id=138824
85 Reviewed by Andreas Kling.
87 Update code base to fix build errors related to the typing changes
88 in the Vector API (size_t -> unsigned).
90 No new tests, no behavior change.
93 * bindings/js/JSDOMBinding.h:
95 * bindings/js/JSWebGLRenderingContextCustom.cpp:
96 * cssjit/SelectorCompiler.cpp:
97 * html/HTMLFormElement.cpp:
98 (WebCore::removeFromVector):
99 * html/parser/HTMLParserIdioms.h:
100 * html/parser/XSSAuditor.cpp:
102 2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
104 Unreviewed iOS build fix
106 * platform/graphics/ios/SimpleFontDataIOS.mm:
107 (WebCore::SimpleFontData::platformInit):
109 2014-11-18 Dan Bernstein <mitz@apple.com>
113 * platform/graphics/ios/SimpleFontDataIOS.mm:
114 (WebCore::SimpleFontData::platformInit):
116 2014-11-18 Commit Queue <commit-queue@webkit.org>
118 Unreviewed, rolling out r176264.
119 https://bugs.webkit.org/show_bug.cgi?id=138837
121 caused many test failures (Requested by litherum on #webkit).
125 "Subclass CachedFont for SVG fonts"
126 https://bugs.webkit.org/show_bug.cgi?id=138686
127 http://trac.webkit.org/changeset/176264
129 2014-11-18 Daniel Bates <dabates@apple.com>
131 [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
132 SPI are not available in public SDK
133 https://bugs.webkit.org/show_bug.cgi?id=138802
135 Reviewed by David Kilzer.
137 Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
138 that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
139 and use these headers instead of the including private headers corresponding to these libraries/frameworks.
141 * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
142 MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
143 DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
144 * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
145 * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
146 * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
147 for private header IOKit/pwr_mgt/IOPMLib.h.
148 * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
149 for private header dispatch/private.h.
150 * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
151 for private header mach-o/dyld_priv.h.
152 * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
153 private header MobileGestalt.h.
154 * platform/spi/cocoa/DispatchSPI.h: Added.
155 * platform/spi/cocoa/DynamicLinkerSPI.h: Added.
156 * platform/spi/cocoa/IOPMLibSPI.h: Added.
157 * platform/spi/cocoa/MachVMSPI.h: Added.
158 * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
159 * platform/spi/ios/MobileGestaltSPI.h: Added.
161 2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
163 Subclass CachedFont for SVG fonts
164 https://bugs.webkit.org/show_bug.cgi?id=138686
166 Reviewed by Simon Fraser.
168 CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
169 Splitting out this SVG-specific code into a subclass of CachedFont
170 cleans up the design.
172 No new tests because there is no behavior change.
175 * WebCore.vcxproj/WebCore.vcxproj:
176 * WebCore.vcxproj/WebCore.vcxproj.filters:
177 * WebCore.xcodeproj/project.pbxproj:
178 * css/CSSFontFaceSource.cpp:
179 (WebCore::CSSFontFaceSource::getFontData): There are two sections
180 in this function; one for SVG fonts and one for regular fonts.
181 I've moved these two sections into CachedFont and SVGCachedFont,
182 thereby simplifying this function.
183 (WebCore::CSSFontFaceSource::ensureFontData): Ditto.
184 (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
185 (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
186 (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
187 * css/CSSFontFaceSource.h: Put functions that are simple enough to
189 * css/CSSFontFaceSrcValue.cpp:
190 (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
192 (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
193 from CSSFontSelector to CachedResourceHandle regarding if we should
194 be using SVGCachedFont instead of CachedFont.
195 * css/CSSFontFaceSrcValue.h: New convenience function.
196 * css/CSSFontSelector.cpp:
197 (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
198 * inspector/InspectorPageAgent.cpp:
199 (WebCore::InspectorPageAgent::cachedResourceType): Update for new
201 (WebCore::cachedResourcesForFrame): Ditto.
202 * loader/cache/CachedFont.cpp:
203 (WebCore::CachedFont::CachedFont):
204 (WebCore::CachedFont::ensureCustomFontData): Taken from
205 CSSFontFaceSource::getFontData()
206 (WebCore::CachedFont::getFontData): Ditto.
207 (WebCore::CachedFont::platformDataFromCustomData): Ditto.
208 (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
209 (WebCore::CachedFont::getSVGFontById): Ditto.
210 * loader/cache/CachedFont.h:
211 * loader/cache/CachedResource.cpp:
212 (WebCore::defaultPriorityForResourceType): Update for new enum
214 * loader/cache/CachedResource.h:
215 * loader/cache/CachedResourceLoader.cpp:
216 (WebCore::createResource): Takes new boolean.
217 (WebCore::CachedResourceLoader::requestFont): Ditto.
218 (WebCore::CachedResourceLoader::checkInsecureContent): Update for
220 (WebCore::CachedResourceLoader::canRequest): Ditto.
221 * loader/cache/CachedResourceLoader.h:
222 * loader/cache/CachedSVGFont.cpp: Added.
223 (WebCore::CachedSVGFont::CachedSVGFont): Moved from
224 CSSFontFaceSource::getFontData() and CachedFont
225 (WebCore::CachedSVGFont::getFontData): Ditto.
226 (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
227 (WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
228 (WebCore::CachedSVGFont::getSVGFontById): Ditto.
229 (WebCore::CachedSVGFont::firstFontFace): Ditto.
230 * loader/cache/CachedSVGFont.h: Subclass CachedFont.
231 * loader/cache/MemoryCache.cpp:
232 (WebCore::MemoryCache::getStatistics): Update for new enum.
233 * svg/SVGFontFaceUriElement.cpp:
234 (WebCore::isSVGFontTarget): Convenience function.
235 (WebCore::SVGFontFaceUriElement::loadFont): Update for new
238 2014-11-18 Myles C. Maxfield <litherum@gmail.com>
240 Use underlining metrics from the font file
241 https://bugs.webkit.org/show_bug.cgi?id=138762
243 Reviewed by Dave Hyatt.
245 Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html
247 * platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and
249 (WebCore::FontMetrics::FontMetrics):
250 (WebCore::FontMetrics::decorationThickness):
251 (WebCore::FontMetrics::setDecorationThickness):
252 (WebCore::FontMetrics::underlinePosition):
253 (WebCore::FontMetrics::setUnderlinePosition):
254 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
255 (WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members.
256 * platform/graphics/ios/SimpleFontDataIOS.mm:
257 (WebCore::SimpleFontData::platformInit): Ditto.
258 * platform/graphics/mac/SimpleFontDataMac.mm:
259 (WebCore::SimpleFontData::platformInit): Ditto.
260 * platform/graphics/win/SimpleFontDataCGWin.cpp:
261 (WebCore::SimpleFontData::platformInit): Ditto.
262 * platform/graphics/win/SimpleFontDataCairoWin.cpp:
263 (WebCore::SimpleFontData::platformInit): Ditto.
264 * platform/graphics/win/SimpleFontDataWin.cpp:
265 (WebCore::SimpleFontData::initGDIFont): Ditto.
266 * rendering/InlineTextBox.cpp:
267 (WebCore::InlineTextBox::paintDecoration): Use FontMetrics data.
268 * style/InlineTextBoxStyle.cpp:
269 (WebCore::computeUnderlineOffset): Ditto.
270 (WebCore::visualOverflowForDecorations): Ditto.
271 * style/InlineTextBoxStyle.h:
272 (WebCore::textDecorationStrokeThickness): Deleted.
273 * svg/SVGFontData.cpp:
274 (WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members.
276 2014-11-17 David Hyatt <hyatt@apple.com>
278 Improve Ruby selection (getting rid of overlap and improving gap filling)
279 https://bugs.webkit.org/show_bug.cgi?id=138250
281 Reviewed by Dean Jackson.
283 * rendering/RenderBlock.cpp:
284 (WebCore::RenderBlock::selectionGaps):
285 (WebCore::RenderBlock::blockSelectionGaps):
286 Add Ruby text in along with the Ruby base.
288 * rendering/RenderBlockFlow.cpp:
289 (WebCore::RenderBlockFlow::inlineSelectionGaps):
290 Don't let block gaps get filled in here.
292 * rendering/RenderRubyBase.h:
293 Expose accessor to the ruby run.
295 * rendering/RenderRubyText.cpp:
296 (WebCore::RenderRubyText::rubyRun):
297 * rendering/RenderRubyText.h:
298 Add accessor to the ruby run.
300 * rendering/RootInlineBox.cpp:
301 (WebCore::RootInlineBox::selectionTop):
302 (WebCore::RootInlineBox::selectionBottom):
303 Improve selectionTop and selectionBottom of ruby bases to avoid the
304 ruby text. Improve the selectionTop and selectionBottom of ruby texts
305 to fill the gap up to the previous/next line as appropriate.
307 2014-11-18 Shivakumar JM <shiva.jm@samsung.com>
309 crypto: Use sequence<> instead of KeyUsage[] in IDL.
310 https://bugs.webkit.org/show_bug.cgi?id=138823
312 Reviewed by Darin Adler.
314 Use sequence<KeyUsage> instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/
315 Overview.html#SubtleCrypto-method-generateKey
317 No new tests, no behavior change.
319 * crypto/SubtleCrypto.idl:
321 2014-11-18 Philippe Normand <pnormand@igalia.com>
323 HRTFDatabaseLoader is not an absolute condition to run audioContext
324 https://bugs.webkit.org/show_bug.cgi?id=138829
326 Reviewed by Jer Noble.
328 This patch is a port of the following Blink revision by
329 <keonho07.kim@samsung.com>:
330 <https://src.chromium.org/viewvc/blink?revision=167887&view=revision>
332 * Modules/webaudio/AudioContext.cpp:
333 (WebCore::AudioContext::AudioContext):
334 (WebCore::AudioContext::isRunnable): Deleted.
335 * Modules/webaudio/AudioContext.h:
336 (WebCore::AudioContext::hrtfDatabaseLoader): Deleted.
337 * Modules/webaudio/AudioDestinationNode.cpp:
338 (WebCore::AudioDestinationNode::render):
339 * Modules/webaudio/OfflineAudioDestinationNode.cpp:
340 (WebCore::OfflineAudioDestinationNode::offlineRender):
341 * Modules/webaudio/PannerNode.cpp:
342 (WebCore::PannerNode::PannerNode):
343 (WebCore::PannerNode::process):
344 (WebCore::PannerNode::initialize):
345 (WebCore::PannerNode::setPanningModel):
346 * Modules/webaudio/PannerNode.h:
347 * Modules/webaudio/RealtimeAnalyser.cpp:
348 * Modules/webaudio/RealtimeAnalyser.h:
349 * platform/audio/HRTFDatabaseLoader.cpp:
350 (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
352 2014-11-18 Commit Queue <commit-queue@webkit.org>
354 Unreviewed, rolling out r176218.
355 https://bugs.webkit.org/show_bug.cgi?id=138827
357 seems to have caused regressions on the perf bots (Requested
358 by lajava on #webkit).
362 "[CSS Grid Layout] Upgrade align-self and align-items parsing
364 https://bugs.webkit.org/show_bug.cgi?id=133359
365 http://trac.webkit.org/changeset/176218
367 2014-11-18 Joanmarie Diggs <jdiggs@igalia.com>
369 AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document
370 https://bugs.webkit.org/show_bug.cgi?id=138727
372 Reviewed by Chris Fleizach.
374 AccessibilityMenuListOption::elementRect() returns the value of the
375 grandparent MenuList, asserting that the grandparent exists with that
376 role. But it is possible to have an existing MenuListOption and remove
377 the element which had been backing that MenuList from the document.
378 Adding null checks prior to the assertions prevents our crashing if the
379 parent or grandparent was removed.
381 Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html
383 * accessibility/AccessibilityMenuListOption.cpp:
384 (WebCore::AccessibilityMenuListOption::elementRect):
386 2014-11-17 Benjamin Poulain <bpoulain@apple.com>
388 Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest
390 * cssjit/SelectorCompiler.cpp:
391 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
393 2014-11-17 Benjamin Poulain <benjamin@webkit.org>
395 Fix two bad function names of HTMLFormControlElement
396 https://bugs.webkit.org/show_bug.cgi?id=138790
398 Reviewed by Andreas Kling.
400 Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769
402 * dom/CheckedRadioButtons.cpp:
403 (WebCore::RadioButtonGroup::add):
404 (WebCore::RadioButtonGroup::updateCheckedState):
405 (WebCore::RadioButtonGroup::requiredAttributeChanged):
406 (WebCore::RadioButtonGroup::remove):
407 (WebCore::RadioButtonGroup::updateValidityForAllButtons):
408 (WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
409 * html/FileInputType.cpp:
410 (WebCore::FileInputType::setFiles):
411 * html/HTMLButtonElement.cpp:
412 (WebCore::HTMLButtonElement::computeWillValidate):
413 (WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
414 * html/HTMLButtonElement.h:
415 * html/HTMLFieldSetElement.h:
416 * html/HTMLFormControlElement.cpp:
417 (WebCore::HTMLFormControlElement::requiredAttributeChanged):
418 (WebCore::HTMLFormControlElement::computeWillValidate):
419 (WebCore::HTMLFormControlElement::willValidate):
420 (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
421 (WebCore::HTMLFormControlElement::isValidFormControlElement):
422 (WebCore::HTMLFormControlElement::updateValidity):
423 (WebCore::HTMLFormControlElement::setCustomValidity):
424 (WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
425 (WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
426 * html/HTMLFormControlElement.h:
427 * html/HTMLInputElement.cpp:
428 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
429 (WebCore::HTMLInputElement::parseAttribute):
430 (WebCore::HTMLInputElement::setChecked):
431 (WebCore::HTMLInputElement::setValueInternal):
432 (WebCore::HTMLInputElement::setValueFromRenderer):
433 (WebCore::HTMLInputElement::computeWillValidate):
434 (WebCore::HTMLInputElement::parseMaxLengthAttribute):
435 (WebCore::HTMLInputElement::recalcWillValidate): Deleted.
436 * html/HTMLInputElement.h:
437 * html/HTMLKeygenElement.h:
438 * html/HTMLOutputElement.h:
439 * html/HTMLSelectElement.cpp:
440 (WebCore::HTMLSelectElement::deselectItems):
441 (WebCore::HTMLSelectElement::optionSelectedByUser):
442 (WebCore::HTMLSelectElement::listBoxSelectItem):
443 (WebCore::HTMLSelectElement::add):
444 (WebCore::HTMLSelectElement::parseAttribute):
445 (WebCore::HTMLSelectElement::childrenChanged):
446 (WebCore::HTMLSelectElement::optionElementChildrenChanged):
447 (WebCore::HTMLSelectElement::setLength):
448 (WebCore::HTMLSelectElement::selectAll):
449 (WebCore::HTMLSelectElement::updateListBoxSelection):
450 (WebCore::HTMLSelectElement::selectOption):
451 (WebCore::HTMLSelectElement::restoreFormControlState):
452 (WebCore::HTMLSelectElement::parseMultipleAttribute):
453 (WebCore::HTMLSelectElement::reset):
454 * html/HTMLTextAreaElement.cpp:
455 (WebCore::HTMLTextAreaElement::parseAttribute):
456 (WebCore::HTMLTextAreaElement::subtreeHasChanged):
457 (WebCore::HTMLTextAreaElement::setValue):
458 (WebCore::HTMLTextAreaElement::setNonDirtyValue):
460 2014-11-17 Sukolsak Sakshuwong <sukolsak@gmail.com>
462 Add parsing for :role()
463 https://bugs.webkit.org/show_bug.cgi?id=138310
465 Reviewed by Benjamin Poulain.
467 Add support for parsing :role() pseudo class. The implementation of selector
468 matching will be in a follow-up patch.
470 * css/CSSGrammar.y.in:
472 (WebCore::CSSParser::detectFunctionTypeToken):
473 * css/CSSSelector.cpp:
474 (WebCore::appendPseudoClassFunctionTail):
475 (WebCore::CSSSelector::selectorText):
477 * css/SelectorChecker.cpp:
478 (WebCore::SelectorChecker::checkOne):
479 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
480 * cssjit/SelectorCompiler.cpp:
481 (WebCore::SelectorCompiler::addPseudoClassType):
483 2014-11-17 Simon Fraser <simon.fraser@apple.com>
485 [iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
486 https://bugs.webkit.org/show_bug.cgi?id=138815
487 rdar://problem/18746203
489 Reviewed by Tim Horton.
491 The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
492 so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.
494 We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
495 between WK1 and WK2 for now.
497 * page/FrameView.cpp:
498 (WebCore::FrameView::FrameView):
500 2014-11-17 Chris Dumez <cdumez@apple.com>
502 Add initial layout testing coverage for timer throttling
503 https://bugs.webkit.org/show_bug.cgi?id=138809
505 Reviewed by Simon Fraser.
507 Add isTimerThrottled() API to Internals so that we can add layout test
508 coverage for timer throttling.
510 Tests: fast/dom/nested-timer-invisible-element-throttling.html
511 fast/dom/nested-timer-visible-element-throttling.html
512 fast/dom/repeating-timer-invisible-element-throttling.html
513 fast/dom/repeating-timer-visible-element-throttling.html
516 * testing/Internals.cpp:
517 (WebCore::Internals::isTimerThrottled):
518 * testing/Internals.h:
519 * testing/Internals.idl:
521 2014-11-17 Zalan Bujtas <zalan@apple.com>
523 Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp
524 https://bugs.webkit.org/show_bug.cgi?id=138799
526 Reviewed by Antti Koivisto.
528 This is in preparation to support multiple renderers.
529 The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time.
531 No change in functionality.
534 * WebCore.vcxproj/WebCore.vcxproj:
535 * WebCore.vcxproj/WebCore.vcxproj.filters:
536 * WebCore.xcodeproj/project.pbxproj:
537 * rendering/SimpleLineLayout.cpp:
538 (WebCore::SimpleLineLayout::removeTrailingWhitespace):
539 (WebCore::SimpleLineLayout::initializeNewLine):
540 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
541 (WebCore::SimpleLineLayout::nextFragment):
542 (WebCore::SimpleLineLayout::createLineRuns):
543 (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
544 (WebCore::SimpleLineLayout::createTextRuns):
545 (WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted.
546 (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted.
547 (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted.
548 (WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted.
549 (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted.
550 (WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted.
551 (WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted.
552 (WebCore::SimpleLineLayout::computeLineLeft): Deleted.
553 * rendering/SimpleLineLayoutFlowContents.cpp: Added.
554 (WebCore::SimpleLineLayout::FlowContents::FlowContents):
555 (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
556 (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
557 (WebCore::SimpleLineLayout::FlowContents::textWidth):
558 * rendering/SimpleLineLayoutFlowContents.h: Added.
559 (WebCore::SimpleLineLayout::FlowContents::Style::Style):
560 (WebCore::SimpleLineLayout::FlowContents::style):
561 (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
562 (WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
564 2014-11-17 Daniel Bates <dabates@apple.com>
566 Unreviewed, rolling out r176232.
568 Broke the Mac build. Will investigate offline.
572 "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
574 https://bugs.webkit.org/show_bug.cgi?id=138802
575 http://trac.webkit.org/changeset/176232
577 2014-11-17 Daniel Bates <dabates@apple.com>
579 [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
580 SPI are not available in public SDK
581 https://bugs.webkit.org/show_bug.cgi?id=138802
583 Reviewed by David Kilzer.
585 Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
586 that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
587 and use these headers instead of the including private headers corresponding to these libraries/frameworks.
589 * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
590 MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
591 DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
592 * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
593 * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
594 * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
595 for private header IOKit/pwr_mgt/IOPMLib.h.
596 * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
597 for private header dispatch/private.h.
598 * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
599 for private header mach-o/dyld_priv.h.
600 * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
601 private header MobileGestalt.h.
602 * platform/spi/cocoa/DispatchSPI.h: Added.
603 * platform/spi/cocoa/DynamicLinkerSPI.h: Added.
604 * platform/spi/cocoa/IOPMLibSPI.h: Added.
605 * platform/spi/cocoa/MachVMSPI.h: Added.
606 * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
607 * platform/spi/ios/MobileGestaltSPI.h: Added.
609 2014-11-17 Daniel Bates <dabates@apple.com>
611 [iOS] CoreText and CoreUI SPI are not available in public SDK
612 https://bugs.webkit.org/show_bug.cgi?id=138760
614 Reviewed by David Kilzer.
616 Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI
617 and use this header instead of including private headers of CoreUI directly.
619 Additionally, add more forward declarations for CoreText SPI.
621 * WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h.
622 * platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead
623 of including CoreText headers directly.
624 * platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead
625 of including CoreUI headers directly.
626 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary
627 include of CoreText headers. These headers will be included by header
628 CoreTextSPI.h (at the top of the file).
629 * platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration
630 of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h
631 as this duplicates the logic in CoreTextSPI.h, which is included in this file.
632 * platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified
634 * platform/spi/ios/CoreUISPI.h: Added.
635 * rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file
636 CoreUISPI.h and include header CoreUISPI.h.
638 2014-11-17 Zalan Bujtas <zalan@apple.com>
640 Simple line layout: Drop 16bit support temporarily.
641 https://bugs.webkit.org/show_bug.cgi?id=138796
643 Reviewed by Antti Koivisto.
645 This is in preparation to multiple renderers support.
646 It requires code refactoring on top of the coming multiple renderers codebase.
647 (Not expecting any significant coverage shrinking.)
649 * rendering/SimpleLineLayout.cpp:
650 (WebCore::SimpleLineLayout::canUseFor):
651 (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
652 (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
653 (WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
654 (WebCore::SimpleLineLayout::removeTrailingWhitespace):
655 (WebCore::SimpleLineLayout::initializeNewLine):
656 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
657 (WebCore::SimpleLineLayout::nextFragment):
658 (WebCore::SimpleLineLayout::createLineRuns):
659 (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
660 (WebCore::SimpleLineLayout::createTextRuns):
661 (WebCore::SimpleLineLayout::create):
663 2014-11-17 Tim Horton <timothy_horton@apple.com>
665 DataDetectors PageOverlay callbacks can come in to the wrong overlay
666 https://bugs.webkit.org/show_bug.cgi?id=138801
667 <rdar://problem/18991369>
669 Reviewed by Anders Carlsson.
671 * page/PageOverlay.cpp:
672 (WebCore::generatePageOverlayID):
673 (WebCore::PageOverlay::PageOverlay):
674 * page/PageOverlay.h:
675 Give each PageOverlay a unique ID.
677 2014-11-17 Javier Fernandez <jfernandez@igalia.com>
679 [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
680 https://bugs.webkit.org/show_bug.cgi?id=133359
682 Reviewed by David Hyatt.
684 Broaden justify-self's parsing name as a preparation of migrating
685 align-self, align-items and justify-items to the CSS 3 Alignment syntax.
687 The current naming was too tied to justify-self and needs to
688 be broadened. This will reduce the follow-up implementations'
691 Upgrade align-self and align-items parsing to CSS 3
693 This change migrates the 2 properties to the CSS 3 Alignment
694 parsing. The new parsing is identical to how we parse
695 'justify-self'. The 2 properties need to be migrated together
696 as they are used in tandem in CSSComputedStyleDeclaration.
698 This change also removes EAlignItems as it is now unused.
700 Tests: css3/parse-align-items.html
701 css3/parse-align-self.html
703 * css/CSSComputedStyleDeclaration.cpp:
704 (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
705 (WebCore::ComputedStyleExtractor::propertyValue):
707 (WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
708 (WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
709 (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
710 (WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
711 (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
712 (WebCore::CSSParser::parseJustifySelf): Deleted.
714 * css/CSSPrimitiveValueMappings.h:
715 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
716 (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
717 (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
718 (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
719 (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
720 (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
721 * css/CSSPropertyNames.in:
722 * css/CSSValueKeywords.in:
723 * css/StyleResolver.cpp:
724 (WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
725 (WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
726 (WebCore::StyleResolver::applyProperty):
727 (WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
728 (WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
729 (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
730 * css/StyleResolver.h:
731 * rendering/RenderBox.cpp:
732 (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
733 * rendering/RenderFlexibleBox.cpp:
734 (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
735 (WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
736 (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
737 (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
738 (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
739 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
740 (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
741 * rendering/RenderFlexibleBox.h:
742 * rendering/RenderFullScreen.cpp:
743 (WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
744 * rendering/RenderMenuList.cpp:
745 (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
746 * rendering/mathml/RenderMathMLRoot.cpp:
747 (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
748 * rendering/mathml/RenderMathMLScripts.cpp:
749 (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
750 (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
751 * rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
752 * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
753 * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
754 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
755 (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
756 * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
757 * style/StyleResolveTree.cpp:
758 (WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
760 2014-11-17 Shivakumar JM <shiva.jm@samsung.com>
762 Attribute text in HTMLAnchorElement should behave as per specification.
763 https://bugs.webkit.org/show_bug.cgi?id=138557
765 Reviewed by Darin Adler.
767 attribute text in HTMLAnchorElement should not be readonly as per specification
768 http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
769 Also This matches the behavior of Chrome 38 and FireFox.
771 Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
773 * html/HTMLAnchorElement.cpp:
774 (WebCore::HTMLAnchorElement::text):
775 (WebCore::HTMLAnchorElement::setText):
776 * html/HTMLAnchorElement.h:
777 * html/HTMLAnchorElement.idl:
779 2014-11-17 Chris Dumez <cdumez@apple.com>
781 Throttle timers that change the style of elements outside the viewport
782 https://bugs.webkit.org/show_bug.cgi?id=138292
784 Reviewed by Antti Koivisto.
786 Throttle timers that change the style of elements outside the viewport
787 to 1 second, similarly to what was already done for timers interacting
788 with non user observable plugins. To be conservative, we don't throttle
789 timers that also cause DOM Tree modifications (e.g. adding/removing
790 nodes, modify element attributes).
792 On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling
793 banner is inside the viewport on my machine. Without this patch, CPU
794 usage would stay ~17% when the banner is outside the viewport. Thanks
795 to timer throttling, CPU usage now goes down to ~1.5%, without user
796 observable side effects. The timers get unthrottled when they are
797 inside the viewport again (i.e. due to scrolling or layout).
799 On espn.com, the CPU usage goes down from ~7% at the top of the page
800 to ~1% when scrolling to the bottom of the page. On ebay.com, CPU
801 usage goes down from ~25% at the top of the page to less than 1% when
802 scrolling to the bottom of the page.
804 2014-11-17 peavo@outlook.com <peavo@outlook.com>
806 [WinCairo] Compile error, CoreGraphics header file included.
807 https://bugs.webkit.org/show_bug.cgi?id=138795
809 Reviewed by Brent Fulgham.
811 CoreGraphics is not available on WinCairo.
813 * platform/graphics/win/FontCacheWin.cpp:
815 2014-11-17 Commit Queue <commit-queue@webkit.org>
817 Unreviewed, rolling out r176169.
818 https://bugs.webkit.org/show_bug.cgi?id=138797
820 Appears to have broken svg/custom/anchor-on-use.svg (Requested
825 "Attribute text in HTMLAnchorElement should behave as per
827 https://bugs.webkit.org/show_bug.cgi?id=138557
828 http://trac.webkit.org/changeset/176169
830 2014-11-17 Daniel Bates <dabates@apple.com>
832 [iOS] AVKit and MediaPlayer SPI are not available in public SDK
833 https://bugs.webkit.org/show_bug.cgi?id=138756
835 Reviewed by Eric Carlson.
837 Add a SPI wrapper headers {AVKit, MPAVRoutingController}SPI.h that forward declares
838 AVKit and MPAVRoutingController SPI, respectively, and use these header instead of
839 including private headers of AVKit and MediaPlayer directly.
841 * WebCore.xcodeproj/project.pbxproj: Add project and private header AVKitSPI.h
842 and MPAVRoutingControllerSPI.h, respectively.
843 * platform/audio/ios/MediaSessionManagerIOS.mm: Include header MPAVRoutingControllerSPI.h
844 instead of including the private header MPAVRoutingController.h.
845 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include header AVKitSPI.h
846 instead of including AVKit headers directly.
848 2014-11-17 Daniel Bates <dabates@apple.com>
850 Attempt to fix the Mac build after <https://trac.webkit.org/changeset/176204>
851 (https://bugs.webkit.org/show_bug.cgi?id=138751)
853 Move declaration of CAContext to be before the declaration of CALayer since
854 the latter depends on the former.
856 * platform/spi/cocoa/QuartzCoreSPI.h:
858 2014-11-17 Daniel Bates <dabates@apple.com>
860 [iOS] QuartzCore SPI not available in public SDK
861 https://bugs.webkit.org/show_bug.cgi?id=138751
863 Reviewed by David Kilzer.
865 Add a SPI wrapper header called QuartzCoreSPI.h that forward declares
866 QuartzCore SPI and use this header instead of including private headers
867 of QuartzCore directly.
869 * WebCore.xcodeproj/project.pbxproj: Added private header QuartzCoreSPI.h.
870 * platform/graphics/ca/mac/PlatformCAFiltersMac.h: Removed; incorporated its
871 functionality into QuartzCoreSPI.h.
872 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Substitute header
873 QuartzCoreSPI.h for PlatformCAFiltersMac.h as the content of the latter
874 was incorporated into the former.
875 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Move CALayer and CATiledLayer
876 forward declarations from this file to file QuartzCoreSPI.h and include
877 header QuartzCoreSPI.h instead of including CATiledLayerPrivate.h directly. Also
878 remove header PlatformCAFiltersMac.h as its content is incorporated into QuartzCoreSPI.h
879 * platform/ios/LegacyTileCache.mm: Include headers CoreGraphicsSPI.h and QuartzCoreSPI.h
880 instead of including QuartzCore headers directly.
881 * platform/ios/LegacyTileGrid.mm: Include header QuartzCoreSPI.h instead
882 of including QuartzCore headers directly. Also sort the list of #include directives.
883 * platform/ios/LegacyTileGridTile.mm: Include header QuartzCoreSPI.h
884 instead of including QuartzCore headers directly.
885 * platform/spi/cocoa/QuartzCoreSPI.h: Added.
887 2014-11-17 Chris Dumez <cdumez@apple.com>
889 Move more CSS properties to the new StyleBuilder
890 https://bugs.webkit.org/show_bug.cgi?id=138766
892 Reviewed by Darin Adler.
894 Move more CSS properties from DeprecatedStyleBuilder to the new
898 -webkit-marquee-repetition
899 -webkit-text-underline-position
901 No new tests, no behavior change.
903 * css/CSSPropertyNames.in:
904 * css/DeprecatedStyleBuilder.cpp:
905 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
906 (WebCore::csstoLengthConversionDataWithTextZoomFactor): Deleted.
907 (WebCore::ApplyPropertyMarqueeRepetition::applyValue): Deleted.
908 (WebCore::ApplyPropertyMarqueeRepetition::createHandler): Deleted.
909 (WebCore::ApplyPropertyTextUnderlinePosition::applyValue): Deleted.
910 (WebCore::ApplyPropertyTextUnderlinePosition::createHandler): Deleted.
911 (WebCore::ApplyPropertyLineHeight::applyValue): Deleted.
912 (WebCore::ApplyPropertyLineHeight::createHandler): Deleted.
913 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Deleted.
914 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Deleted.
915 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Deleted.
916 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Deleted.
917 (WebCore::ApplyPropertyWordSpacing::applyValue): Deleted.
918 (WebCore::ApplyPropertyWordSpacing::createHandler): Deleted.
919 * css/StyleBuilderConverter.h:
920 (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
921 (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
922 * css/StyleBuilderCustom.h:
923 (WebCore::StyleBuilderFunctions::csstoLengthConversionDataWithTextZoomFactor):
924 (WebCore::StyleBuilderFunctions::convertLineHeight):
925 (WebCore::StyleBuilderFunctions::applyValueWordSpacing):
926 (WebCore::StyleBuilderFunctions::applyInheritLineHeight):
927 (WebCore::StyleBuilderFunctions::applyInitialLineHeight):
928 (WebCore::StyleBuilderFunctions::applyValueLineHeight):
930 2014-11-16 Andreas Kling <akling@apple.com>
932 Avoid synchronous style recalc when mutating a Node inside FrameSelection.
933 <https://webkit.org/b/138791>
935 Reviewed by Antti Koivisto.
937 We can safely clear the RenderView's selection without doing a synchronous
940 This is a small progression on Speedometer locally.
942 * editing/FrameSelection.cpp:
943 (WebCore::DragCaretController::nodeWillBeRemoved):
944 (WebCore::FrameSelection::respondToNodeModification):
945 (WebCore::clearRenderViewSelection): Deleted.
947 Merged clearRenderViewSelection() into the call sites and removed
948 the now-unnecessary protection of the Document.
950 2014-11-17 Eric Carlson <eric.carlson@apple.com>
952 [iOS] allow host application to opt-out of alternate fullscreen
953 https://bugs.webkit.org/show_bug.cgi?id=138787
955 Reviewed by Darin Adler.
957 * Modules/mediacontrols/MediaControlsHost.cpp:
958 (WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
960 * html/HTMLMediaElement.cpp:
961 (WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
962 mediaSession().allowsAlternateFullscreen says it isn't allowed.
964 * html/HTMLMediaSession.cpp:
965 (WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
966 * html/HTMLMediaSession.h:
968 * page/Settings.cpp: Add allowsAlternateFullscreen.
969 * page/Settings.in: Ditto.
971 2014-11-16 Zan Dobersek <zdobersek@igalia.com>
973 Replace RenderSVGResource::cast<T>() with downcast<T>()
974 https://bugs.webkit.org/show_bug.cgi?id=138290
976 Reviewed by Chris Dumez.
978 Add type traits for the RenderSVGResource hierarchy. This enables
979 using the typecasting framework in getRenderSVGResourceById() that
980 in return renders the RenderSVGResource::cast<>() template and all
981 the static s_resourceType member variables in the hierarchy removable.
984 * rendering/svg/RenderSVGResource.h:
985 (WebCore::RenderSVGResource::cast): Deleted.
986 * rendering/svg/RenderSVGResourceClipper.h:
987 * rendering/svg/RenderSVGResourceContainer.h:
988 (WebCore::getRenderSVGResourceById):
989 * rendering/svg/RenderSVGResourceFilter.h:
991 * rendering/svg/RenderSVGResourceLinearGradient.h:
992 * rendering/svg/RenderSVGResourceMarker.h:
993 * rendering/svg/RenderSVGResourceMasker.h:
994 * rendering/svg/RenderSVGResourcePattern.h:
995 * rendering/svg/RenderSVGResourceRadialGradient.h:
996 * rendering/svg/RenderSVGResourceSolidColor.h:
998 2014-11-16 Benjamin Poulain <benjamin@webkit.org>
1000 Implement :valid and :invalid matching for the fieldset element
1001 https://bugs.webkit.org/show_bug.cgi?id=138769
1003 Reviewed by Darin Adler.
1005 In the latest HTML spec, the pseudo classes :valid and :invalid match
1006 a fieldset element based on its descendants:
1007 https://html.spec.whatwg.org/#selector-valid
1008 https://html.spec.whatwg.org/#selector-invalid
1010 This patch adds that behavior.
1012 There are two key problems to solve with these pseudo classes on fieldset:
1013 -Efficient matching.
1014 -Style invalidation when any of the descendant changes.
1016 To implement the style invalidation, I have modified HTMLFormControlElement
1017 to notify its ancestor when its state changes.
1019 The first change is making the state fully internal to HTMLFormControlElement,
1020 we do not want subclass to be able to change the behavior and forget to update
1023 To achieve that encapsulation, the interface was changed a bit:
1024 -Neither willValidate() nor isValidFormControlElement() inherit from Element.
1025 Instead, willValidate() is the implementation of FormAssociatedElement's interface
1026 and it is final. The method isValidFormControlElement() becomes completely internal
1027 to HTMLFormControlElement.
1028 -Since willValidate() should no longer be re-implemented by subclass, the elements
1029 that were depending on it have been migrated to recalcWillValidate() to set
1030 the initial state as needed.
1032 With the validity state fully encapsulated in HTMLFormControlElement, all I need
1033 is a way to communicate that information to HTMLFieldSetElement ancestors.
1034 This is done in two cases:
1035 -The validity state changes.
1036 -The tree changes in a way that would make the input element not a descendant
1037 of a HTMLFieldSetElement.
1039 The invalidation is simply done by walking up the ancestors and adding the current
1040 element to a "validity dependency list" on each HTMLFieldSetElement.
1042 Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html
1043 fast/css/pseudo-invalid-fieldset-style-sharing.html
1044 fast/css/pseudo-invalid-fieldset.html
1045 fast/css/pseudo-valid-fieldset-invalidation-optimization.html
1046 fast/css/pseudo-valid-fieldset-style-sharing.html
1047 fast/css/pseudo-valid-fieldset.html
1048 fast/selectors/invalid-fieldset-style-update-1.html
1049 fast/selectors/invalid-fieldset-style-update-2.html
1050 fast/selectors/invalid-fieldset-style-update-3.html
1051 fast/selectors/invalid-fieldset-style-update-4.html
1052 fast/selectors/invalid-fieldset-style-update-5.html
1053 fast/selectors/valid-fieldset-style-update-1.html
1054 fast/selectors/valid-fieldset-style-update-2.html
1055 fast/selectors/valid-fieldset-style-update-3.html
1056 fast/selectors/valid-fieldset-style-update-4.html
1057 fast/selectors/valid-fieldset-style-update-5.html
1059 * css/SelectorCheckerTestFunctions.h:
1060 (WebCore::isInRange):
1061 (WebCore::isOutOfRange):
1062 (WebCore::isInvalid):
1064 The hack "ContainsValidityStyleRules" is in the way of correct styling
1065 of FieldSet and Form.
1066 It is not the right way to get stylesheet properties anyway.
1068 * css/StyleResolver.cpp:
1069 (WebCore::StyleResolver::canShareStyleWithControl):
1070 Make sure style sharing does not incorrectly share style for fieldset elements.
1073 (WebCore::Document::Document):
1075 (WebCore::Document::containsValidityStyleRules): Deleted.
1076 (WebCore::Document::setContainsValidityStyleRules): Deleted.
1078 (WebCore::Element::matchesValidPseudoClass):
1079 (WebCore::Element::matchesInvalidPseudoClass):
1080 (WebCore::Element::willValidate): Deleted.
1081 (WebCore::Element::isValidFormControlElement): Deleted.
1082 * html/FormAssociatedElement.cpp:
1083 (WebCore::FormAssociatedElement::customError):
1084 * html/FormAssociatedElement.h:
1086 * html/HTMLFieldSetElement.cpp:
1087 (WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
1088 (WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
1089 (WebCore::HTMLFieldSetElement::addInvalidDescendant):
1090 (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
1091 Each HTMLFormControlElement that has constraint validation adds or removes
1092 itself from its HTMLFieldSetElement ancestors.
1094 It should be possible to just keep track of a count instead of a HashSet.
1095 I decided to got with the HashSet to make the code more robust and easier
1096 to debug. A few assertions ensure that the HashSet is actually used as a counter.
1098 * html/HTMLFieldSetElement.h:
1099 * html/HTMLFormControlElement.cpp:
1100 (WebCore::addInvalidElementToAncestorFromInsertionPoint):
1101 (WebCore::removeInvalidElementToAncestorFromInsertionPoint):
1103 (WebCore::HTMLFormControlElement::insertedInto):
1104 (WebCore::HTMLFormControlElement::removedFrom):
1105 One tricky part of those two functions is that we cannot use
1106 matchesValidPseudoClass() or matchesInvalidPseudoClass().
1108 The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
1109 and it has its own definition of what Valid and Invalid mean when matching selectors.
1111 In HTMLFormControlElement, we must use the internal state,
1112 willValidate() and isValidFormControlElement() must be used directly.
1114 (WebCore::HTMLFormControlElement::matchesValidPseudoClass):
1115 (WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
1116 (WebCore::HTMLFormControlElement::willValidate):
1117 (WebCore::addInvalidElementToAncestors):
1118 (WebCore::removeInvalidElementFromAncestors):
1119 (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
1120 (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
1121 (WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.
1122 * html/HTMLFormControlElement.h:
1123 (WebCore::HTMLFormControlElement::isValidFormControlElement):
1124 * html/HTMLKeygenElement.h:
1125 * html/HTMLObjectElement.h:
1126 * html/HTMLOutputElement.h:
1128 2014-11-16 Zan Dobersek <zdobersek@igalia.com>
1130 [TexMap] Add typecasting support for GraphicsLayerTextureMapper
1131 https://bugs.webkit.org/show_bug.cgi?id=138741
1133 Reviewed by Martin Robinson.
1135 Add type traits for the GraphicsLayerTextureMapper class.
1136 This enables using typecasting functions instead of
1137 toGraphicsLayerTextureMapper().
1139 Remove toTextureMapperLayer() casting function which actually
1140 returned the TextureMapperLayer object that belonged to the
1141 passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
1142 object is now downcasted and the TextureMapperLayer is accessed
1143 by calling the GraphicsLayerTextureMapper::layer() method.
1145 * platform/graphics/GraphicsLayer.h:
1146 (WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):
1147 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1148 (WebCore::toTextureMapperLayerVector):
1149 (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
1150 (WebCore::toTextureMapperLayer): Deleted.
1151 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1152 (WebCore::toGraphicsLayerTextureMapper): Deleted.
1154 2014-11-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1156 Move WebCore/loader to std::unique_ptr
1157 https://bugs.webkit.org/show_bug.cgi?id=138646
1159 Reviewed by Chris Dumez.
1161 Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
1162 However this patch leaves ResourceRequest::adopt() because this need
1163 to be handled by different patch.
1165 No new tests, no behavior changes.
1167 * loader/DocumentThreadableLoader.cpp:
1168 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1169 (WebCore::DocumentThreadableLoader::preflightSuccess):
1170 * loader/DocumentThreadableLoader.h:
1171 * loader/SubresourceLoader.cpp:
1172 (WebCore::SubresourceLoader::SubresourceLoader):
1173 (WebCore::SubresourceLoader::didReceiveResponse):
1174 (WebCore::SubresourceLoader::notifyDone):
1175 * loader/SubresourceLoader.h:
1176 * loader/TextTrackLoader.h:
1177 * loader/appcache/ApplicationCacheHost.h:
1178 * loader/appcache/ApplicationCacheStorage.cpp:
1179 (WebCore::ApplicationCacheStorage::storeCopyOfCache):
1180 * loader/archive/cf/LegacyWebArchive.cpp:
1181 (WebCore::LegacyWebArchive::create):
1182 * loader/cache/CachedResourceLoader.cpp:
1183 (WebCore::CachedResourceLoader::requestPreload):
1184 (WebCore::CachedResourceLoader::clearPreloads):
1185 (WebCore::CachedResourceLoader::printPreloadStats):
1186 * loader/cache/CachedResourceLoader.h:
1187 * loader/icon/IconDatabase.cpp:
1188 (WebCore::IconDatabase::deleteAllPreparedStatements):
1189 (WebCore::readySQLiteStatement):
1190 * loader/icon/IconDatabase.h:
1191 * loader/icon/IconRecord.h:
1193 2014-11-16 Chris Dumez <cdumez@apple.com>
1195 Crash when setting 'order' CSS property to a calculated value
1196 https://bugs.webkit.org/show_bug.cgi?id=138780
1198 Reviewed by Darin Adler.
1200 CSS Calculated values were not handled by the CSS parser for 'order'
1201 CSS property. As a result, using calculated values wouldn't work in
1202 release builds and would hit an assertion in debug builds.
1204 This patch updates the CSS parser to directly convert the
1205 CSS Calculated value into a simple integer CSSPrimitiveValue for
1206 'order' property. We could have marked CSS Calculated values as
1207 valid in the CSS Parser instead but this would have brought issues:
1208 - The calculated value needs to be adjusted to INT_MIN + 2 if it is less
1209 than that. This would force us to calculate the expression anyway.
1210 - The StyleBuilder would need updating to properly handle CSS Calculated
1213 Test: fast/css/order-calculated-value.html
1215 * css/CSSParser.cpp:
1216 (WebCore::CSSParser::parseValue):
1218 2014-11-16 Chris Dumez <cdumez@apple.com>
1220 Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
1221 https://bugs.webkit.org/show_bug.cgi?id=138770
1223 Reviewed by Darin Adler.
1225 When setting a very large value to a CSS property, it is represented internally as
1226 infinity. r166114 already tried to deal with this by adding an std::isinf() check
1227 in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
1228 CSSValueInvalid value in such case. The issue is that doing leads to the
1229 StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
1230 handled and leads to assertions.
1232 This patch updates the CSSParser to detect cases where the double value is
1233 infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
1234 that we mark the value as invalid and actually drop it. As a result,
1235 CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
1238 Test: fast/css/style-builder-infinite-value.html
1239 fast/css/infinite-floating-value.html
1241 * css/CSSParser.cpp:
1242 (WebCore::parseSimpleLengthValue):
1243 (WebCore::CSSParser::validUnit):
1244 * css/CSSValuePool.cpp:
1245 (WebCore::CSSValuePool::createValue):
1247 2014-11-16 Shivakumar JM <shiva.jm@samsung.com>
1249 Attribute text in HTMLAnchorElement should behave as per specification.
1250 https://bugs.webkit.org/show_bug.cgi?id=138557
1252 Reviewed by Darin Adler.
1254 attribute text in HTMLAnchorElement should not be readonly as per specification
1255 http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
1256 Also This matches the behavior of Chrome 38 and FireFox.
1258 Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
1260 * html/HTMLAnchorElement.cpp:
1261 (WebCore::HTMLAnchorElement::text):
1262 (WebCore::HTMLAnchorElement::setText):
1263 * html/HTMLAnchorElement.h:
1264 * html/HTMLAnchorElement.idl:
1266 2014-11-16 Chris Dumez <cdumez@apple.com>
1268 Move 'vertical-align' CSS property to the new StyleBuilder
1269 https://bugs.webkit.org/show_bug.cgi?id=138764
1271 Reviewed by Darin Adler.
1273 Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
1274 new StyleBuilder by using custom code.
1276 No new tests, no behavior change.
1278 * css/CSSPropertyNames.in:
1279 * css/DeprecatedStyleBuilder.cpp:
1280 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1281 (WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
1282 (WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
1283 * css/StyleBuilderCustom.h:
1284 (WebCore::StyleBuilderFunctions::applyValueVerticalAlign):
1286 2014-11-16 Tim Horton <timothy_horton@apple.com>
1288 Use TextIndicator instead of the built in Lookup highlight
1289 https://bugs.webkit.org/show_bug.cgi?id=138775
1290 <rdar://problem/18953982>
1292 Follow-up to r176164.
1294 * platform/spi/mac/LookupSPI.h:
1295 (WebCore::canDisableLookupIndicator): Deleted.
1296 Remove canDisableLookupIndicator.
1298 2014-11-16 Chris Dumez <cdumez@apple.com>
1300 Crash when setting '-webkit-line-clamp' CSS property to a calculated value
1301 https://bugs.webkit.org/show_bug.cgi?id=138777
1303 Reviewed by Benjamin Poulain.
1305 CSS Calculated values were not handled when converting a CSSPrimitiveValue
1306 to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
1307 assertion. To address this issue, this patch updates the code to use
1308 primitiveType() / getValue<>() instead of m_primitiveUnitType /
1309 m_value.num, as those getter function properly handle CSS Calculated
1312 Test: fast/css/webkit-line-clamp-calculated-value.html
1314 * css/CSSPrimitiveValueMappings.h:
1315 (WebCore::CSSPrimitiveValue::operator LineClampValue):
1317 2014-11-16 Tim Horton <timothy_horton@apple.com>
1319 Use TextIndicator instead of the built in Lookup highlight
1320 https://bugs.webkit.org/show_bug.cgi?id=138775
1321 <rdar://problem/18953982>
1323 Reviewed by Anders Carlsson.
1326 * platform/mac/WebCoreSystemInterface.h:
1327 * platform/mac/WebCoreSystemInterface.mm:
1328 Remove a WKSI import/export that we don't need anymore.
1330 * platform/spi/mac/LookupSPI.h: Added.
1331 (WebCore::canDisableLookupIndicator):
1332 Add Lookup SPI header.
1333 Add a 'canDisableLookupIndicator', which must be called in any translation
1334 unit that wants to use either of the soft-linked constants related to
1335 that functionality, before calling the get* function.
1337 * WebCore.xcodeproj/project.pbxproj:
1338 * editing/mac/DictionaryLookup.mm:
1339 (WebCore::rangeForDictionaryLookupForSelection):
1340 (WebCore::rangeForDictionaryLookupAtHitTestResult):
1341 Adopt the Lookup SPI header.
1343 2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
1345 AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
1346 https://bugs.webkit.org/show_bug.cgi?id=138776
1348 Reviewed by Chris Fleizach.
1350 r166288 used #if...#else instead of #if...#endif, thus disabling the old
1351 AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
1352 new AtkValue API. Thus r166288 broke access to value-holding elements for
1353 AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.
1355 No new tests because catching this regression would require AT-SPI2.
1357 * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
1358 (webkitAccessibleValueGetMinimumIncrement):
1359 (webkitAccessibleValueInterfaceInit):
1361 2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
1363 AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
1364 https://bugs.webkit.org/show_bug.cgi?id=138771
1366 Reviewed by Chris Fleizach.
1368 Add BlockquoteRole and assigns it to blockquote elements. Make
1369 corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
1370 for GTK and EFL; AXGroup (which was being used already) for the Mac.
1372 No new tests are required. Instead, updated the existing expectations
1373 to reflect the new mapping.
1375 * accessibility/AccessibilityNodeObject.cpp:
1376 (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1377 * accessibility/AccessibilityObject.cpp:
1378 (WebCore::AccessibilityObject::isBlockquote):
1379 * accessibility/AccessibilityObject.h:
1380 * accessibility/AccessibilityRenderObject.cpp:
1381 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1382 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1384 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1385 (createAccessibilityRoleMap):
1387 2014-11-16 Chris Dumez <cdumez@apple.com>
1389 Crash when setting 'alt' CSS property to inherit or initial
1390 https://bugs.webkit.org/show_bug.cgi?id=138774
1391 <rdar://problem/18995409>
1393 Reviewed by Chris Fleizach.
1395 The StyleResolver was not handling 'inherit' or 'initial' values for
1396 'alt' CSS property. As a result, the code was assuming the CSSValue
1397 was a CSSPrimitiveValue (although it could be a CSSInitialValue or
1398 a CSSInheritValue). In such case, the code would dereference a null
1399 pointer because primitiveValue is initialized using:
1400 CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)
1401 ? downcast<CSSPrimitiveValue>(value)
1404 Test: fast/css/alt-inherit-initial.html
1406 * css/StyleResolver.cpp:
1407 (WebCore::StyleResolver::applyProperty):
1409 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
1411 AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
1412 https://bugs.webkit.org/show_bug.cgi?id=127060
1414 Reviewed by Chris Fleizach.
1416 Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.
1418 No new tests. Instead, updated the expectations of roles-exposed.html to
1419 reflect the corrected mapping.
1421 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1424 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
1426 AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
1427 https://bugs.webkit.org/show_bug.cgi?id=138767
1429 Reviewed by Chris Fleizach.
1431 Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
1432 respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
1433 in environments which have an older version of ATK.
1435 No new tests are required. Instead, existing expectations were updated
1436 to reflect the new mapping.
1438 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1441 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
1443 AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
1444 https://bugs.webkit.org/show_bug.cgi?id=138773
1446 Reviewed by Chris Fleizach.
1448 Map FooterRole to ATK_ROLE_FOOTER.
1450 No new tests. Unskipped a test that verifies this mapping.
1452 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1455 2014-11-14 Dean Jackson <dino@apple.com>
1457 Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
1458 https://bugs.webkit.org/show_bug.cgi?id=138763
1459 <rdar://problem/18991569>
1461 Reviewed by Simon Fraser.
1463 Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
1464 CSSKeyframeRule and CSSKeyframesRule respectively.
1466 This *may* break some existing content, but is compatible with
1467 what Blink and Firefox are doing. To minimize breakage, I kept an
1468 alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
1469 and WEBKIT_KEYFRAME_RULE.
1471 Covered by existing tests.
1474 * DerivedSources.cpp:
1475 * DerivedSources.make:
1476 * WebCore.vcxproj/WebCore.vcxproj:
1477 * WebCore.vcxproj/WebCore.vcxproj.filters:
1478 * WebCore.xcodeproj/project.pbxproj:
1479 * bindings/js/JSCSSRuleCustom.cpp:
1481 * bindings/objc/DOMCSS.mm:
1483 * css/CSSGrammar.y.includes:
1484 * css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.
1485 (WebCore::StyleKeyframe::StyleKeyframe):
1486 (WebCore::StyleKeyframe::~StyleKeyframe):
1487 (WebCore::StyleKeyframe::mutableProperties):
1488 (WebCore::StyleKeyframe::parseKeyString):
1489 (WebCore::StyleKeyframe::cssText):
1490 (WebCore::CSSKeyframeRule::CSSKeyframeRule):
1491 (WebCore::CSSKeyframeRule::~CSSKeyframeRule):
1492 (WebCore::CSSKeyframeRule::style):
1493 (WebCore::CSSKeyframeRule::reattach):
1494 * css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.
1495 (WebCore::StyleKeyframe::create):
1496 (WebCore::StyleKeyframe::keyText):
1497 (WebCore::StyleKeyframe::setKeyText):
1498 (WebCore::StyleKeyframe::getKeys):
1499 (WebCore::StyleKeyframe::properties):
1500 * css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
1501 * css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.
1502 (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
1503 (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
1504 (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
1505 (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
1506 (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
1507 (WebCore::StyleRuleKeyframes::findKeyframeIndex):
1508 (WebCore::CSSKeyframesRule::CSSKeyframesRule):
1509 (WebCore::CSSKeyframesRule::~CSSKeyframesRule):
1510 (WebCore::CSSKeyframesRule::setName):
1511 (WebCore::CSSKeyframesRule::appendRule):
1512 (WebCore::CSSKeyframesRule::insertRule):
1513 (WebCore::CSSKeyframesRule::deleteRule):
1514 (WebCore::CSSKeyframesRule::findRule):
1515 (WebCore::CSSKeyframesRule::cssText):
1516 (WebCore::CSSKeyframesRule::length):
1517 (WebCore::CSSKeyframesRule::item):
1518 (WebCore::CSSKeyframesRule::cssRules):
1519 (WebCore::CSSKeyframesRule::reattach):
1520 * css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.
1521 (WebCore::StyleRuleKeyframes::create):
1522 (WebCore::StyleRuleKeyframes::keyframes):
1523 (WebCore::StyleRuleKeyframes::name):
1524 (WebCore::StyleRuleKeyframes::setName):
1525 (WebCore::StyleRuleKeyframes::copy):
1526 * css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
1527 * css/CSSParser.cpp:
1530 * css/CSSStyleSheet.cpp:
1532 * css/StyleResolver.cpp:
1533 * css/StyleRule.cpp:
1534 (WebCore::StyleRuleBase::createCSSOMWrapper):
1535 * inspector/InspectorStyleSheet.cpp:
1536 (WebCore::asCSSRuleList):
1538 2014-11-15 David Kilzer <ddkilzer@apple.com>
1540 REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
1542 This regressed with the following commit:
1544 Move DataDetectors scanning code to WebCore
1545 https://bugs.webkit.org/show_bug.cgi?id=138731
1546 <rdar://problem/18877535>
1548 This fixes the following build failures:
1550 In file included from WebCore/editing/mac/DataDetection.mm:29:
1551 WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
1552 @property NSRect highlightFrame;
1554 WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
1555 RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
1560 (DataDetection::detectItemAroundHitTestResult): Move symbol from
1561 shared section to Mac-only section.
1562 * editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
1563 the entire implementation since it it unused on iOS.
1564 * platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
1565 check around DDActionContext class declarations.
1567 2014-11-14 Benjamin Poulain <benjamin@webkit.org>
1569 Compute the selector specificity as we match simple selectors
1570 https://bugs.webkit.org/show_bug.cgi?id=138718
1572 Reviewed by Andreas Kling.
1574 This is an other tiny step toward dynamic specificity. Instead of computing
1575 the entire specificity at the end, compute it dynamically as we are matching
1576 each individual simple selector.
1578 * css/CSSSelector.cpp:
1579 (WebCore::CSSSelector::specificity):
1580 (WebCore::CSSSelector::simpleSelectorSpecificity):
1581 (WebCore::CSSSelector::addSpecificities):
1582 (WebCore::CSSSelector::specificityForPage):
1583 (WebCore::CSSSelector::specificityForOneSelector): Deleted.
1584 * css/CSSSelector.h:
1585 * css/SelectorChecker.cpp:
1586 (WebCore::SelectorChecker::match):
1587 (WebCore::SelectorChecker::matchRecursively):
1588 (WebCore::SelectorChecker::checkOne):
1589 (WebCore::SelectorChecker::matchSelectorList):
1590 * css/SelectorChecker.h:
1592 2014-11-14 Andreas Kling <akling@apple.com>
1594 [mac] Only images that are actually purgeable should be advertised as such.
1595 <https://webkit.org/b/138759>
1596 <rdar://problem/13205438>
1598 Reviewed by Tim Horton.
1600 Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage
1601 forward the question to CGImage for the correct answer.
1603 The memory may be marked non-volatile by frameworks underneath WebKit at any
1604 given time, but that's not something we need to worry about.
1606 * platform/graphics/BitmapImage.cpp:
1607 (WebCore::BitmapImage::decodedDataIsPurgeable):
1608 * platform/graphics/BitmapImage.h:
1609 * platform/graphics/cg/BitmapImageCG.cpp:
1610 (WebCore::BitmapImage::decodedDataIsPurgeable):
1611 * platform/graphics/cg/ImageSourceCG.cpp:
1612 (WebCore::ImageSource::createFrameAtIndex):
1613 * platform/spi/cg/CoreGraphicsSPI.h:
1615 2014-11-14 Zalan Bujtas <zalan@apple.com>
1617 Remove computeTextPaintStyle's RenderText dependency.
1618 https://bugs.webkit.org/show_bug.cgi?id=138754
1620 Reviewed by Simon Fraser.
1622 So that we can compute text paint style across renderers in simple line layout.
1624 No change in functionality.
1626 * rendering/InlineTextBox.cpp:
1627 (WebCore::InlineTextBox::paint):
1628 * rendering/SimpleLineLayoutFunctions.cpp:
1629 (WebCore::SimpleLineLayout::paintFlow):
1630 * rendering/TextPaintStyle.cpp:
1631 (WebCore::computeTextPaintStyle):
1632 * rendering/TextPaintStyle.h:
1634 2014-11-14 Myles C. Maxfield <mmaxfield@apple.com>
1636 Get rid of WebFontCache
1637 https://bugs.webkit.org/show_bug.cgi?id=134752
1639 Reviewed by Dave Hyatt.
1641 No new tests because there is no behavior change.
1643 * Configurations/WebCore.xcconfig:
1644 * PlatformMac.cmake:
1647 * WebCore.xcodeproj/project.pbxproj:
1648 * platform/graphics/mac/FontCacheMac.mm:
1649 (WebCore::acceptableChoice):
1650 (WebCore::betterChoice):
1651 (WebCore::toTraitsMask):
1652 (WebCore::desiredFamilyToAvailableFamilyDictionary):
1653 (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
1654 (WebCore::fontWithFamily):
1655 (WebCore::invalidateFontCache):
1656 (WebCore::FontCache::getTraitsInFamily):
1657 (WebCore::FontCache::createFontPlatformData):
1658 * platform/mac/WebFontCache.h: Removed.
1659 * platform/mac/WebFontCache.mm: Removed.
1661 2014-11-14 Daniel Bates <dabates@apple.com>
1663 [iOS] NSFileManager and QuickLook SPI not available in public SDK
1664 https://bugs.webkit.org/show_bug.cgi?id=138742
1666 Reviewed by Pratik Solanki.
1668 Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares
1669 NSFileManager and QuickLook SPI, respectively, and use these header instead of
1670 including private headers of Foundation and QuickLook directly.
1672 * WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h
1673 and NSFileManagerSPI.h, respectively.
1674 * platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h
1675 instead of including headers of QuickLook and Foundation directly.
1676 * platform/spi/cocoa/NSFileManagerSPI.h: Added.
1677 * platform/spi/ios/QuickLookSPI.h: Added.
1679 2014-11-14 Daniel Bates <dabates@apple.com>
1681 [iOS] CoreGraphics SPI not available in public SDK
1682 https://bugs.webkit.org/show_bug.cgi?id=138709
1684 Reviewed by David Kilzer.
1686 Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares
1687 CoreGraphics SPI and use this header instead of including private headers
1688 of CoreGraphics directly.
1690 * WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header
1691 CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h.
1692 * WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h.
1693 * WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg.
1694 * WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg.
1695 * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This
1696 is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And
1697 WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port.
1698 * platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum
1699 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
1700 * platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h.
1701 * platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers
1702 of CoreGraphics directly.
1703 * platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions
1704 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list
1705 of #include directives.
1706 * platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including
1707 headers of CoreGraphics directly.
1708 * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
1709 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
1710 * platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including
1711 header <CoreGraphics/CGFontUnicodeSupport.h> directly.
1712 * platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including
1713 headers of CoreGraphics directly.
1714 * platform/graphics/ios/SimpleFontDataIOS.mm: Ditto.
1715 * platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this
1716 file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
1717 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h
1718 and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h).
1719 * platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions
1720 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
1721 * platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of
1722 CoreGraphics directly.
1723 * platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare
1724 CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this
1725 data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of
1726 CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations
1727 of CoreGraphics data types reside, as opposed to defining it in this file.
1728 * platform/ios/wak/WKGraphics.mm:
1729 (WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added
1730 compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation.
1731 * platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and
1732 forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include
1733 header CoreGraphicsSPI.h.
1734 (WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment.
1735 * platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h.
1736 * platform/spi/cg/CoreGraphicsSPI.h: Added.
1738 * rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer
1739 make use of any functionality from CGPathPrivate.h in this file. The functionality we used from
1740 CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h,
1741 which is included from header CoreGraphics.h.
1743 2014-11-14 Dean Jackson <dino@apple.com>
1745 [Media] Timeline scrubber not updating as the video plays
1746 https://bugs.webkit.org/show_bug.cgi?id=138717
1747 <rdar://problem/18957509>
1749 Reviewed by Jer Noble.
1751 There is some confusing logic that determines
1752 whether or not the controls are hidden, and a
1753 slight error caused timelines to not advance unless
1754 they were explicitly showing.
1756 The fix was to be a bit more liberal in deciding
1757 when the controls are showing, but still cautious
1758 enough to stop up causing repaints when things
1761 Test: media/media-controls-timeline-updates.html
1763 * Modules/mediacontrols/mediaControlsApple.js:
1764 (Controller.prototype.controlsAreHidden): We only need
1765 to check if we're an audio element or explicitly
1767 (Controller.prototype.showControls): Explicitly call
1770 2014-11-14 Tim Horton <timothy_horton@apple.com>
1772 Move DataDetectors scanning code to WebCore
1773 https://bugs.webkit.org/show_bug.cgi?id=138731
1774 <rdar://problem/18877535>
1776 Reviewed by Anders Carlsson.
1779 Export our new function.
1781 * WebCore.xcodeproj/project.pbxproj:
1782 Add DataDetection.{mm, h}
1783 Adjust the project so that editing/mac actually points to editing/mac instead of editing/
1785 * editing/mac/DictionaryLookup.h:
1786 * editing/mac/DictionaryLookup.mm:
1787 Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
1788 Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
1790 * editing/mac/DataDetection.h: Added.
1791 * editing/mac/DataDetection.mm: Added.
1792 (WebCore::DataDetection::detectItemAroundHitTestResult):
1795 2014-11-14 Dan Bernstein <mitz@apple.com>
1797 <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
1798 https://bugs.webkit.org/show_bug.cgi?id=138753
1800 Reviewed by Tim Horton.
1802 Removed a FrameLoaderClient function that no one overrides anymore.
1804 * loader/FrameLoaderClient.h:
1805 (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
1806 * loader/HistoryController.cpp:
1807 (WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
1808 (WebCore::HistoryController::replaceCurrentItem): Ditto.
1810 2014-11-14 Jeremy Jones <jeremyj@apple.com>
1812 Do proper teardown for optimized fullscreen
1813 https://bugs.webkit.org/show_bug.cgi?id=138648
1815 Reviewed by Eric Carlson.
1817 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1818 (WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.
1820 2014-11-11 David Hyatt <hyatt@apple.com>
1822 Table rows repaint entire table when their background color changes.
1823 https://bugs.webkit.org/show_bug.cgi?id=26662
1825 Reviewed by Simon Fraser.
1827 Added fast/repaint/table-row-repaint.html
1829 * rendering/RenderTableCell.h:
1830 * rendering/RenderTableRow.cpp:
1831 (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
1832 Improve table row's function to unite with the cell rects that can possibly
1833 have the the row's background color painted behind them.
1835 2014-11-14 Zalan Bujtas <zalan@apple.com>
1837 Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp
1838 https://bugs.webkit.org/show_bug.cgi?id=138704
1840 Reviewed by Antti Koivisto.
1842 No change in functionality.
1845 * WebCore.vcxproj/WebCore.vcxproj:
1846 * WebCore.vcxproj/WebCore.vcxproj.filters:
1847 * WebCore.xcodeproj/project.pbxproj:
1848 * rendering/SimpleLineLayoutResolver.cpp: Added.
1849 (WebCore::SimpleLineLayout::RunResolver::Run::Run):
1850 (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1851 (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
1852 (WebCore::SimpleLineLayout::RunResolver::Run::text):
1853 (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
1854 (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
1855 (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
1856 (WebCore::SimpleLineLayout::RunResolver::RunResolver):
1857 (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
1858 (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
1859 (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
1860 (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
1861 (WebCore::SimpleLineLayout::LineResolver::LineResolver):
1862 * rendering/SimpleLineLayoutResolver.h:
1863 (WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted.
1864 (WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted.
1865 (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
1866 (WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted.
1867 (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted.
1868 (WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted.
1869 (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted.
1870 (WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted.
1871 (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted.
1872 (WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted.
1873 (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted.
1874 (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted.
1875 (WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted.
1877 2014-11-14 Andrzej Badowski <a.badowski@samsung.com>
1879 AX: Improve AccessibilityTableCell isColumnHeaderCell function.
1880 https://bugs.webkit.org/show_bug.cgi?id=138423
1882 Reviewed by Chris Fleizach.
1884 <th> cell in the zero row should be column header.
1886 New tests are not necessary.
1888 * accessibility/AccessibilityTableCell.cpp:
1889 (WebCore::AccessibilityTableCell::isColumnHeaderCell):
1891 2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
1893 [SOUP] Use GMainLoopSource for request timeout in ResourceHandle
1894 https://bugs.webkit.org/show_bug.cgi?id=138695
1896 Reviewed by Sergio Villar Senin.
1898 We are currently using soup_timeout_add() that simply creates a
1899 GSource and attaches it to the given context. Using
1900 GMainLoopSource we simplify the code and fix any potential problem
1901 of converting the double value into milliseconds.
1903 * platform/network/ResourceHandleInternal.h:
1904 * platform/network/soup/ResourceHandleSoup.cpp:
1905 (WebCore::cleanupSoupRequestOperation):
1906 (WebCore::ResourceHandle::sendPendingRequest):
1907 (WebCore::ResourceHandle::platformSetDefersLoading):
1908 (WebCore::requestTimeoutCallback): Deleted.
1910 2014-11-13 Tim Horton <timothy_horton@apple.com>
1912 [mac] Keep around more decoded image data, since it's purgeable
1913 https://bugs.webkit.org/show_bug.cgi?id=125273
1914 <rdar://problem/13205438>
1916 Reviewed by Simon Fraser.
1918 No new tests, just an optimization.
1920 Instead of throwing away decoded image data eagerly, allow the operating
1921 system to manage the memory via the standard purgeability mechanism,
1924 This improves the performance on some pathological cases (extremely large
1925 animated GIFs) by up to 8x.
1927 * loader/cache/MemoryCache.cpp:
1928 (WebCore::MemoryCache::pruneLiveResourcesToSize):
1929 Don't prune live resources' decoded data if it is purgeable.
1931 * platform/graphics/BitmapImage.cpp:
1932 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1933 Don't eagerly throw away decoded image data if it's purgeable.
1935 * loader/cache/CachedImage.h:
1936 * loader/cache/CachedResource.h:
1937 (WebCore::CachedResource::decodedDataIsPurgeable):
1938 * platform/graphics/BitmapImage.h:
1939 * platform/graphics/Image.h:
1940 (WebCore::Image::decodedDataIsPurgeable):
1942 2014-11-13 Myles C. Maxfield <litherum@gmail.com>
1944 Addressing post-review comment
1945 https://bugs.webkit.org/show_bug.cgi?id=138633
1947 * platform/spi/cg/CoreGraphicsSPI.h:
1949 2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
1951 Move FontMac and FontCacheMac off of WKSI
1952 https://bugs.webkit.org/show_bug.cgi?id=138633
1954 Reviewed by Simon Fraser.
1956 No new tests because there is no behavior change.
1960 * WebCore.vcxproj/WebCoreCG.props:
1961 * WebCore.xcodeproj/project.pbxproj:
1962 * platform/graphics/ios/FontCacheIOS.mm:
1963 (WebCore::FontCache::platformInit):
1964 * platform/graphics/mac/FontCacheMac.mm:
1965 (WebCore::FontCache::platformInit):
1966 (WebCore::FontCache::systemFallbackForCharacters):
1967 * platform/graphics/mac/FontMac.mm:
1968 (WebCore::isIntegral):
1969 (WebCore::setCGFontRenderingMode):
1970 (WebCore::Font::drawGlyphs):
1971 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1972 * platform/graphics/win/FontCacheWin.cpp:
1973 (WebCore::FontCache::platformInit):
1974 * platform/ios/WebCoreSystemInterfaceIOS.mm:
1975 * platform/mac/WebCoreSystemInterface.h:
1976 * platform/mac/WebCoreSystemInterface.mm:
1977 * platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1978 * platform/spi/cocoa/CoreTextSPI.h:
1979 * platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1981 2014-11-13 Chris Dumez <cdumez@apple.com>
1983 Move 'image-resolution' CSS property to the new StyleBuilder
1984 https://bugs.webkit.org/show_bug.cgi?id=138715
1986 Reviewed by Andreas Kling.
1988 Move 'image-resolution' CSS property from DeprecatedStyleBuilder to
1989 the new StyleBuilder by using custom code.
1991 No new tests, no behavior change.
1993 * css/CSSPropertyNames.in:
1994 * css/DeprecatedStyleBuilder.cpp:
1995 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1996 (WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted.
1997 (WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted.
1998 (WebCore::ApplyPropertyImageResolution::applyValue): Deleted.
1999 (WebCore::ApplyPropertyImageResolution::createHandler): Deleted.
2000 * css/StyleBuilderCustom.h:
2001 (WebCore::StyleBuilderFunctions::applyInheritImageResolution):
2002 (WebCore::StyleBuilderFunctions::applyInitialImageResolution):
2003 (WebCore::StyleBuilderFunctions::applyValueImageResolution):
2005 2014-11-13 Commit Queue <commit-queue@webkit.org>
2007 Unreviewed, rolling out r176106.
2008 https://bugs.webkit.org/show_bug.cgi?id=138719
2010 needs build love (Requested by kling on #webkit).
2014 "[mac] Keep around more decoded image data, since it's
2016 https://bugs.webkit.org/show_bug.cgi?id=125273
2017 http://trac.webkit.org/changeset/176106
2019 2014-11-13 Eric Carlson <eric.carlson@apple.com>
2021 Context menus should not offer the "Download video" option for videos that cannot
2023 https://bugs.webkit.org/show_bug.cgi?id=138530
2025 rdar://problem/18919130
2027 Reviewed by Tim Horton.
2029 * html/HTMLMediaElement.cpp:
2030 (WebCore::HTMLMediaElement::parseAttribute):
2031 * html/HTMLMediaElement.h:
2032 * page/ContextMenuController.cpp:
2033 (WebCore::ContextMenuController::populate):
2034 * platform/graphics/MediaPlayer.cpp:
2035 (WebCore::MediaPlayer::canSaveMediaData):
2036 (WebCore::MediaPlayer::supportsSave): Deleted.
2037 * platform/graphics/MediaPlayer.h:
2038 * platform/graphics/MediaPlayerPrivate.h:
2039 (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
2040 (WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
2041 (WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
2042 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2043 (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
2044 (WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
2045 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2046 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2047 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2048 (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
2049 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2050 (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
2051 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2052 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2053 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2054 (WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
2055 * rendering/HitTestResult.cpp:
2056 (WebCore::HitTestResult::isDownloadableMedia):
2058 2014-11-02 Tim Horton <timothy_horton@apple.com>
2060 [mac] Keep around more decoded image data, since it's purgeable
2061 <https://webkit.org/b/125273>
2062 <rdar://problem/13205438>
2064 Reviewed by Simon Fraser and Andreas Kling.
2066 No new tests, just an optimization.
2068 Instead of throwing away decoded image data eagerly, allow the operating
2069 system to manage the memory via the standard purgeability mechanism,
2072 This improves the performance on some pathological cases (extremely large
2073 animated GIFs) by up to 8x.
2075 * loader/cache/MemoryCache.cpp:
2076 (WebCore::MemoryCache::pruneLiveResourcesToSize):
2077 Don't prune live resources' decoded data if it is purgeable.
2079 * platform/graphics/BitmapImage.cpp:
2080 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2081 Don't eagerly throw away decoded image data if it's purgeable.
2083 * loader/cache/CachedImage.h:
2084 * loader/cache/CachedResource.h:
2085 (WebCore::CachedResource::decodedDataIsPurgeable):
2086 * platform/graphics/BitmapImage.h:
2087 * platform/graphics/Image.h:
2088 (WebCore::Image::decodedDataIsPurgeable):
2090 2014-11-13 Daniel Bates <dabates@apple.com>
2092 [iOS] NSGeometry data types are not available in the public SDK
2093 https://bugs.webkit.org/show_bug.cgi?id=137536
2095 Reviewed by David Kilzer.
2097 Towards building iOS WebKit with the public iOS SDK, define NSGeometry
2098 data types and functions in terms of CGGeometry data types and functions
2099 because the former is SPI on iOS.
2101 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include
2102 header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h.
2103 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h.
2104 We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported
2105 by header WAKWindow.h.
2106 * platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h.
2107 * platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives.
2108 * platform/ios/WebEvent.mm: Ditto.
2109 * platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types
2110 and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__-
2111 guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included
2112 in an Objective-C/Objective-C++ file.
2113 * platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some
2114 NSGeometry data types.
2116 2014-11-13 Simon Fraser <simon.fraser@apple.com>
2118 [WK2] Fire a layout milestone on session restore based on render tree size
2119 https://bugs.webkit.org/show_bug.cgi?id=138711
2120 rdar://problem/16033854
2122 Reviewed by Anders Carlsson.
2124 New layout milestone for session restore based on render tree size. Only used
2127 * page/LayoutMilestones.h:
2129 2014-11-13 Dan Bernstein <mitz@apple.com>
2131 Policy client not called for navigations through the page cache
2132 https://bugs.webkit.org/show_bug.cgi?id=138703
2134 Reviewed by Alexey Proskuryakov.
2136 Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.
2138 * loader/FrameLoader.cpp:
2139 (WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
2140 has a document loader, set the document loader’s triggering action (so that the policy
2141 client sees that this is a back/forward navigation) and clear its last checked request (so
2142 that the policy client gets called).
2144 2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
2146 AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
2147 https://bugs.webkit.org/show_bug.cgi?id=137867
2149 Reviewed by Chris Fleizach.
2151 Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.
2153 Test: platform/gtk/accessibility/detached-object-role.html
2155 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2156 (webkitAccessibleGetRole):
2158 2014-11-13 Eric Carlson <eric.carlson@apple.com>
2160 [iOS] update optimized fullscreen media controls artwork
2161 https://bugs.webkit.org/show_bug.cgi?id=138705
2163 Reviewed by Dean Jackson.
2165 * Modules/mediacontrols/MediaControlsHost.cpp:
2166 (WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
2167 * Modules/mediacontrols/MediaControlsHost.idl:
2169 * Modules/mediacontrols/mediaControlsApple.js:
2170 (Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.
2172 * Modules/mediacontrols/mediaControlsiOS.js:
2173 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
2174 visible during playback.
2175 (ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
2176 (ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
2177 calling updateControls, which calls shouldHaveStartPlaybackButton.
2179 * platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.
2181 * rendering/RenderThemeIOS.mm:
2182 (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.
2184 2014-11-13 Benjamin Poulain <bpoulain@apple.com>
2186 Implement the matching for :nth-last-child(An+B of selector-list)
2187 https://bugs.webkit.org/show_bug.cgi?id=138650
2189 Reviewed by Andreas Kling.
2191 Matching is trivial based on the existing CSS4 infrastructure.
2193 The tricky part is style invalidation. In the cases of the old :nth-last-child()
2194 and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules.
2196 The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate
2197 subtrees when nodes are being added or removed. It is a valuable optimization by itself
2198 since tree updates are less common than property updates.
2200 For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules".
2201 It pretty much work the same way but invalidates subtree on style recalc.
2203 Tests: fast/css/nth-child-and-nth-last-child.html
2204 fast/css/nth-last-child-of-classname.html
2205 fast/css/nth-last-child-of-complex-selector.html
2206 fast/css/nth-last-child-of-compound-selector.html
2207 fast/css/nth-last-child-of-style-sharing-1.html
2208 fast/css/nth-last-child-of-style-sharing-2.html
2209 fast/css/nth-last-child-of-style-update-optimization.html
2210 fast/css/nth-last-child-of-tagname.html
2211 fast/selectors/nth-last-child-of-class-style-update.html
2213 * css/SelectorChecker.cpp:
2214 (WebCore::SelectorChecker::checkOne):
2216 (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
2217 (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
2218 (WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules):
2220 (WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules):
2221 * dom/ElementRareData.h:
2222 (WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules):
2223 (WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
2224 (WebCore::ElementRareData::ElementRareData):
2225 (WebCore::ElementRareData::resetDynamicRestyleObservations):
2227 (WebCore::Node::updateAncestorsForStyleRecalc):
2228 (WebCore::Node::setNeedsStyleRecalc):
2229 (WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted.
2231 Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really
2232 affect one level (because we don't have a parent-selectors). It is quite easy to mark large
2233 trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit
2234 too generic. When that happen, we must be careful not invalidating everything, just the affected subtree.
2236 2014-11-12 Jon Honeycutt <jhoneycutt@apple.com>
2238 REGRESSION (r172826): Password field placeholder text is missing if
2239 placeholder attribute precedes type attribute
2241 <https://bugs.webkit.org/show_bug.cgi?id=138682>
2242 <rdar://problem/18574213>
2244 When the placeholder attribute is encountered, a shadow tree is created
2245 to include the placeholder element. When the type attribute is
2246 encountered, the previous shadow tree is destroyed, and a new shadow
2247 tree is created. TextFieldInputType::createShadowSubtree() did not
2248 handle creating the placeholder element.
2250 This regressed in r172826 because prior to r172826, the placeholder
2251 element would be recreated when
2252 HTMLTextFormControlElement::updatePlaceholderVisibility() was called.
2253 In r172826, updatePlaceholderVisibility() was changed to only show or
2254 hide the placeholder element if it exists.
2256 Reviewed by Benjamin Poulain.
2258 * html/TextFieldInputType.cpp:
2259 (WebCore::TextFieldInputType::createShadowSubtree):
2260 Call updatePlaceholderVisibility() to insert the placeholder element
2261 (after the inner text element has been inserted, as it appears before
2262 it in the shadow DOM).
2264 2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
2266 AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
2267 https://bugs.webkit.org/show_bug.cgi?id=137866
2269 Reviewed by Mario Sanchez Prada.
2271 Check that the AccessibilityMenuList is really focused before notifying
2272 the platform that it is focused. Likewise, only notify the platform of
2273 an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
2274 containing that option is expanded.
2276 Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html
2278 * accessibility/atk/AXObjectCacheAtk.cpp:
2279 (WebCore::notifyChildrenSelectionChange):
2280 (WebCore::AXObjectCache::postPlatformNotification):
2282 2014-11-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2284 [EFL] Unexpected crashes in layout test after r175953
2285 https://bugs.webkit.org/show_bug.cgi?id=138652
2287 Reviewed by Csaba Osztrogonác.
2289 In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
2290 out of bound index crash because the reusableNodeIndex is Vector object.
2292 No new test. This patch is to fix broken tests related to widgets on EFL port.
2294 * platform/efl/RenderThemeEfl.cpp:
2295 (WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".
2297 2014-11-13 Chris Dumez <cdumez@apple.com>
2299 Lazily create HTMLInputElement's inputType and shadow subtree
2300 https://bugs.webkit.org/show_bug.cgi?id=138524
2302 Reviewed by Ryosuke Niwa.
2304 When an HTMLInputElement was created by the parser, we would first call
2305 HTMLInputElement::create(), then call Element::parserSetAttributes() on
2306 the constructed input. With the previous implementation, this was a bit
2307 inefficient because HTMLInputElement::create() would construct a
2308 TextInputType inputType (as this is the default) as well as its
2309 corresponding shadow subtree. Then, parserSetAttributes() would often
2310 set the |type| attribute and would need to destroy this input type as
2311 well as its subtree if the new |type| is not 'text', to create a new
2312 inputType / shadow subtree of the right type. The profiler showed that
2313 this was fairly expensive.
2315 To improve this, this patch delays the inputType / shadow subtree
2316 creation when the HTMLInputElement is constructed by the parser, until
2317 the attributes are actually set by the parser. This way, we directly
2318 create an inputType / shadow subtree of the right type.
2320 I see a 1.4% speed up on speedometer (73.95 -> 75.0).
2322 Test: fast/dom/HTMLInputElement/border-attribute-crash.html
2325 (WebCore::Element::parserSetAttributes):
2326 (WebCore::Element::parserDidSetAttributes):
2328 * html/HTMLInputElement.cpp:
2329 (WebCore::HTMLInputElement::HTMLInputElement):
2330 (WebCore::HTMLInputElement::create):
2331 (WebCore::HTMLInputElement::updateType):
2332 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
2333 (WebCore::HTMLInputElement::initializeInputType):
2334 (WebCore::HTMLInputElement::parseAttribute):
2335 (WebCore::HTMLInputElement::parserDidSetAttributes):
2336 (WebCore::HTMLInputElement::finishParsingChildren):
2337 * html/HTMLInputElement.h:
2339 2014-11-12 Chris Dumez <cdumez@apple.com>
2341 Have DOMTimer deal with more ScriptExecutionContext references
2342 https://bugs.webkit.org/show_bug.cgi?id=138679
2344 Reviewed by Andreas Kling.
2346 Have DOMTimer deal with more ScriptExecutionContext references instead
2347 of pointers, to make it clear the script execution context cannot be
2350 No new tests, no behavior change.
2352 * bindings/js/ScheduledAction.cpp:
2353 (WebCore::ScheduledAction::execute):
2354 (WebCore::ScheduledAction::executeFunctionInContext):
2355 * bindings/js/ScheduledAction.h:
2356 * dom/DocumentEventQueue.cpp:
2357 * page/DOMTimer.cpp:
2358 (WebCore::DOMTimerFireState::DOMTimerFireState):
2359 (WebCore::NestedTimersMap::instanceForContext):
2360 (WebCore::DOMTimer::DOMTimer):
2361 (WebCore::DOMTimer::install):
2362 (WebCore::DOMTimer::removeById):
2363 (WebCore::DOMTimer::fired):
2365 * page/DOMWindow.cpp:
2366 (WebCore::DOMWindow::setTimeout):
2367 (WebCore::DOMWindow::clearTimeout):
2368 (WebCore::DOMWindow::setInterval):
2369 (WebCore::DOMWindow::clearInterval):
2370 * page/SuspendableTimer.cpp:
2371 (WebCore::SuspendableTimer::SuspendableTimer):
2372 * page/SuspendableTimer.h:
2373 * workers/WorkerGlobalScope.cpp:
2374 (WebCore::WorkerGlobalScope::setTimeout):
2375 (WebCore::WorkerGlobalScope::clearTimeout):
2376 (WebCore::WorkerGlobalScope::setInterval):
2377 (WebCore::WorkerGlobalScope::clearInterval):
2379 2014-11-12 Dean Jackson <dino@apple.com>
2381 Support unprefixed animation property names
2382 https://bugs.webkit.org/show_bug.cgi?id=138678
2383 <rdar://problem/18943059>
2385 Reviewed by Simon Fraser.
2387 Step 1 of 3 in unprefixing CSS animations: handling the
2388 property names and values.
2390 Unlike other unprefixing, where we use an alias that
2391 effectively removes the prefixed values from the code,
2392 for animations we need to keep the old values around so that
2393 existing content will not break (e.g. computed style).
2395 During testing I noticed that we didn't handle the
2396 (relatively) new animation-direction values of
2397 "reverse" and "alternate-reverse" when querying
2400 Tests: animations/unprefixed-properties.html
2401 animations/unprefixed-shorthand.html
2403 * css/CSSComputedStyleDeclaration.cpp:
2404 (WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
2405 values, but also get animation direction to produce the correct
2406 results when "reverse" and "alternate-reverse" is specified.
2408 * css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
2409 around indicating whether it is prefixed or unprefixed.
2410 (WebCore::CSSParser::parseValue):
2411 (WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
2412 which of the forms we're going to check.
2413 (WebCore::CSSParser::parseAnimationProperty):
2416 * css/CSSProperty.h:
2417 (WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
2418 all the animation values, and clean up the code a bit.
2420 * css/CSSPropertyNames.in: Add new properties.
2422 * css/DeprecatedStyleBuilder.cpp:
2423 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
2424 unprefixed forms. This should move to the new StyleBuilder soon.
2426 * css/StyleProperties.cpp: Handle new values.
2427 (WebCore::StyleProperties::getPropertyValue):
2428 (WebCore::StyleProperties::asText):
2430 * css/StylePropertyShorthand.cpp:
2431 (WebCore::animationShorthand):
2432 (WebCore::animationShorthandForParsing): Decide which list of properties to use.
2433 (WebCore::shorthandForProperty):
2434 (WebCore::matchingShorthandsForLonghand):
2435 (WebCore::webkitAnimationShorthandForParsing): Deleted.
2436 * css/StylePropertyShorthand.h:
2438 * css/StyleResolver.cpp: Since the new properties come before "background" in
2439 alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
2440 we need to update the call sites that think CSSPropertyBackground is the first
2442 (WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
2443 (WebCore::StyleResolver::styleForPage):
2444 (WebCore::StyleResolver::applyMatchedProperties):
2445 (WebCore::StyleResolver::applyProperty):
2447 2014-11-12 Beth Dakin <bdakin@apple.com>
2449 Speculative build fix.
2453 2014-11-12 Timothy Horton <timothy_horton@apple.com>
2457 * platform/spi/mac/DataDetectorsSPI.h:
2458 It's likely that more of this file should be compiled out on iOS,
2459 but this is all we need to build.
2461 2014-11-12 Beth Dakin <bdakin@apple.com>
2463 WK1: Support default actions for images
2464 https://bugs.webkit.org/show_bug.cgi?id=138668
2466 rdar://problem/18785434
2468 Reviewed by Tim Horton.
2470 Symbol needed for copying image.
2473 2014-11-05 Ada Chan <adachan@apple.com>
2475 Implement new plug-in API for muting plug-ins
2476 https://bugs.webkit.org/show_bug.cgi?id=138105
2478 Reviewed by Anders Carlsson.
2480 Add the new NPNVmuteAudioBool NPNVariable.
2482 Test: platform/mac-wk2/plugins/muted-state.html
2486 2014-11-12 Tim Horton <timothy_horton@apple.com>
2488 Need to show the text indicator when Data Detectors shows a popover
2489 https://bugs.webkit.org/show_bug.cgi?id=138664
2490 <rdar://problem/18869900>
2492 Reviewed by Beth Dakin.
2494 * platform/spi/mac/DataDetectorsSPI.h:
2495 Add new DataDetectors SPI.
2497 2014-11-12 Chris Dumez <cdumez@apple.com>
2499 Minor improvements to RenderListItem
2500 https://bugs.webkit.org/show_bug.cgi?id=138601
2502 Reviewed by Darin Adler.
2504 Make several minor improvements to RenderListItem and clean up the
2507 No new tests, no behavior change.
2509 * rendering/RenderListItem.cpp:
2510 (WebCore::isHTMLListElement):
2511 - Rename isList to isHTMLListElement() for clarity as it checks
2512 for HTMLOListElement and HTMLUListElement types
2513 - Inline the function as it is short.
2514 - Use is<HTML*Element>() for type checking
2515 - Update the argument to take a Node& instead of an Element*. This
2516 is because the argument is expected to the non-null. Also using
2517 looser typing here allows us to use this utility function is one
2518 more place, without impacting performance as
2519 hasTagName(HTMLQualifiedName) is defined on Node.
2521 (WebCore::enclosingList):
2522 - Pass the argument as a reference instead of a pointer as it is
2523 expected to be non-null.
2524 - Initialize firstNode before the loop to avoid the if (!firstNode)
2525 check for every iteration.
2527 (WebCore::nextListItem):
2528 - Take an Element as second argument instead of a RenderListItem*
2529 and provide convenience overloads so that we don't need to do
2530 null checks just because some calls sites call this function
2531 with 2 arguments and others with 1 argument. This way, we avoid
2532 unnecessary null checks as most call sites already do such
2533 checks (or have references).
2534 - Transform the while loop into a for loop for clarity.
2535 - Don't traverse an Element's subtree if the Element does not have
2536 a renderer as it is impossible of any of its descendant to have
2537 a renderer (and we are looking for a specific type of renderer).
2539 (WebCore::previousListItem):
2540 - Pass the item argument as a reference instead of a pointer as it
2541 is expected to be non-null.
2542 - Reduce the scope of the |current| so that it is now declared
2545 (WebCore::RenderListItem::updateItemValuesForOrderedList):
2546 (WebCore::RenderListItem::itemCountForOrderedList):
2547 - Pass argument as a reference instead of a pointer as it was expected
2548 to be non-null (There was an assertion in place to make sure of it).
2550 (WebCore::RenderListItem::calcValue):
2551 - Use is<HTMLOListElement>() instead of hasTagName().
2553 (WebCore::getParentOfFirstLineBox):
2554 - Rename variables to stop using abbreviations.
2555 - Pass arguments as references instead of pointers as they are expected
2557 - Remove the firstChild null check before the loop as it does not
2558 change behavior. The loop will abort early if firstChild is null
2559 and we will end up returning nullptr as well.
2560 - Use is<>() more for type checking.
2561 - Reuse the isHTMLListElement() utility function instead of duplicating
2562 its code inside this function.
2564 (WebCore::firstNonMarkerChild):
2565 - Pass argument as a reference as it is expected to be non-null.
2566 - Rename variable from result to child for clarity, as we are traversing
2569 (WebCore::RenderListItem::markerTextWithSuffix):
2570 - Use String appending instead of StringBuilder as it simplifies the
2571 code a lot and should not impact performance in this case.
2573 (WebCore::RenderListItem::explicitValueChanged):
2574 - Restructure the code a bit to do the |listNode| null check before the
2575 loop, now that nextListItem() takes a reference in argument. This is
2576 the only call site where we didn't already know that listNode is
2579 (WebCore::previousOrNextItem):
2580 - Mark this function as inline as it is short and called repeatedly.
2582 2014-11-12 Chris Dumez <cdumez@apple.com>
2584 Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
2585 https://bugs.webkit.org/show_bug.cgi?id=138619
2587 Reviewed by Darin Adler.
2589 Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
2590 - Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
2591 not returning null is sufficient.
2592 - Caching the result of innerTextElement() instead of repeatedly calling that
2594 - De-virtualizing setFormControlValueMatchesRenderer() /
2595 formControlValueMatchesRenderer() as these are never overridden.
2596 - Moving the code constructing the innerTextValue from a
2597 TextControlInnerTextElement from innerTextValue() to a new
2598 innerTextValueFrom(TextControlInnerTextElement&) function and call this new
2599 function from setInnerTextValue() to avoid calling innerTextElement() again
2600 and making sure it is non-null
2601 - Do the tree traversal from innerTextElement's firstChild instead of from
2602 innerTextElement. The innerTextElement is a TextControlInnerTextElement.
2603 Therefore, it cannot be an HTMLBRElement or a Text node.
2605 No new tests, no behavior change.
2607 * html/HTMLFormControlElement.h:
2608 (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
2609 (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
2610 * html/HTMLTextFormControlElement.cpp:
2611 (WebCore::stripTrailingNewline):
2612 (WebCore::innerTextValueFrom):
2613 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2614 (WebCore::HTMLTextFormControlElement::innerTextValue):
2615 (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
2616 (WebCore::finishText): Deleted.
2618 2014-11-12 Jer Noble <jer.noble@apple.com>
2620 [Mac] media/track/audio-track.html is flakey
2621 https://bugs.webkit.org/show_bug.cgi?id=138394
2623 Reviewed by Alexey Proskuryakov.
2625 The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
2626 "addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
2627 empties when that individual queue's timer fires. So events can be enqueued in the following order:
2628 1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.
2630 Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
2631 which they are enqueued, regardless of which object owns the queue. Use a static queue of
2632 GenericEventQueues to manage which GenericEventQueue fires and in what order.
2634 GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
2635 weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.
2637 * dom/GenericEventQueue.cpp:
2638 (WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
2639 (WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
2640 (WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
2641 (WebCore::GenericEventQueue::sharedTimerFired): Ask each queue to dispatch one event.
2642 (WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
2643 (WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
2644 (WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
2645 (WebCore::GenericEventQueue::cancelAllEvents): Ditto.
2646 (WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
2647 (WebCore::GenericEventQueue::timerFired): Deleted.
2648 * dom/GenericEventQueue.h:
2650 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
2652 [GTK] Expose user script messages to GObject DOM bindings
2653 https://bugs.webkit.org/show_bug.cgi?id=138411
2655 Reviewed by Philippe Normand.
2657 * PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
2658 installed headers and make a symlink for it in the DerivedSources dir.
2659 * bindings/gobject/WebKitDOMCustomUnstable.h: Added.
2660 * bindings/gobject/WebKitDOMCustom.cpp:
2661 (webkit_dom_dom_window_get_webkit_namespace):
2662 (webkit_dom_user_message_handlers_namespace_get_handler):
2663 * bindings/scripts/CodeGeneratorGObject.pm:
2664 (HasUnstableCustomAPI): Helper function to check if the given
2665 class has custom unstable API.
2666 (WriteData): Include WebKitDOMCustomUnstable.h header if the class
2667 has API defined there.
2669 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
2671 [GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
2672 https://bugs.webkit.org/show_bug.cgi?id=138409
2674 Reviewed by Philippe Normand.
2676 It's currently exposed as a WebKitDOMSerializedScriptValue class
2677 that doesn't really exist. It should be handled as a string, that
2678 is used to create a SerializedScriptValue when coming from the
2679 API, and converted to a string again when returned to the API.
2681 * bindings/scripts/CodeGeneratorGObject.pm:
2682 (GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
2683 (IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
2684 (GenerateFunction): Handle SerializedScriptValue parameters and
2685 return values specially.
2686 * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2687 (webkit_dom_test_callback_callback_with_serialized_script_value_param):
2688 * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2689 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2690 (webkit_dom_test_obj_serialized_value):
2691 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2692 * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2693 (webkit_dom_test_serialized_script_value_interface_class_init):
2694 (webkit_dom_test_serialized_script_value_interface_get_value):
2695 (webkit_dom_test_serialized_script_value_interface_set_value):
2696 (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
2697 (webkit_dom_test_serialized_script_value_interface_get_cached_value):
2698 (webkit_dom_test_serialized_script_value_interface_set_cached_value):
2699 (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
2700 * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2701 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
2702 (webkit_dom_test_typedefs_class_init):
2703 (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
2704 (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
2705 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2707 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
2709 [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
2710 https://bugs.webkit.org/show_bug.cgi?id=138093
2712 Reviewed by Martin Robinson.
2714 Remove RedirectedXCompositeWindow.
2716 * PlatformGTK.cmake:
2718 2014-09-01 Philippe Normand <pnormand@igalia.com>
2720 [WK2] UserMediaClient support
2721 https://bugs.webkit.org/show_bug.cgi?id=123158
2723 Reviewed by Benjamin Poulain.
2725 Added document and frame accessors, needed by the
2726 UserMediaRequestManager of the WebProcess. Also added two methods
2727 used by the permission request manager to know if access to audio
2728 or video devices is requested.
2730 Tests: fast/mediastream/error.html
2731 fast/mediastream/success.html
2732 fast/mediastream/delayed-permission-allowed.html
2733 fast/mediastream/delayed-permission-denied.html
2734 http/tests/media/media-stream/disconnected-frame-already.html
2735 http/tests/media/media-stream/disconnected-frame-permission-denied.html
2736 http/tests/media/media-stream/disconnected-frame.html
2738 * Modules/mediastream/UserMediaRequest.cpp:
2739 (WebCore::UserMediaRequest::document):
2740 (WebCore::UserMediaRequest::frame):
2741 * Modules/mediastream/UserMediaRequest.h:
2742 (WebCore::UserMediaRequest::requiresAudio):
2743 (WebCore::UserMediaRequest::requiresVideo):
2745 2014-11-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2747 [EFL] Clean up OwnPtr in RenderThemeEfl
2748 https://bugs.webkit.org/show_bug.cgi?id=138642
2750 Reviewed by Zoltan Herczeg.
2752 No new tests, no behavior change.
2754 * platform/efl/RenderThemeEfl.cpp:
2755 (WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr.
2757 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2759 Move Modules/websockets to std::unique_ptr
2760 https://bugs.webkit.org/show_bug.cgi?id=138649
2762 Reviewed by Chris Dumez.
2764 Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
2765 instead of OwnPtr, PassOwnPtr.
2766 However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
2767 with std::unique_ptr<>
2769 No new tests, no behavior.
2771 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2772 * Modules/websockets/WebSocket.cpp:
2773 * Modules/websockets/WebSocketChannel.cpp:
2774 (WebCore::WebSocketChannel::connect):
2775 (WebCore::WebSocketChannel::didFail):
2776 (WebCore::WebSocketChannel::processFrame):
2777 (WebCore::WebSocketChannel::enqueueTextFrame):
2778 (WebCore::WebSocketChannel::enqueueRawFrame):
2779 (WebCore::WebSocketChannel::enqueueBlobFrame):
2780 (WebCore::WebSocketChannel::processOutgoingFrameQueue):
2781 (WebCore::WebSocketChannel::sendFrame):
2782 * Modules/websockets/WebSocketChannel.h:
2783 * Modules/websockets/WebSocketDeflateFramer.cpp:
2784 (WebCore::WebSocketDeflateFramer::createExtensionProcessor):
2785 (WebCore::WebSocketDeflateFramer::enableDeflate):
2786 (WebCore::WebSocketDeflateFramer::deflate):
2787 (WebCore::WebSocketDeflateFramer::inflate):
2788 (WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
2789 * Modules/websockets/WebSocketDeflateFramer.h:
2790 (WebCore::DeflateResultHolder::create): Deleted.
2791 (WebCore::InflateResultHolder::create): Deleted.
2792 * Modules/websockets/WebSocketDeflater.cpp:
2793 (WebCore::WebSocketDeflater::WebSocketDeflater):
2794 (WebCore::WebSocketInflater::WebSocketInflater):
2795 (WebCore::WebSocketDeflater::create): Deleted.
2796 (WebCore::WebSocketInflater::create): Deleted.
2797 * Modules/websockets/WebSocketDeflater.h:
2798 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
2799 (WebCore::WebSocketExtensionDispatcher::addProcessor):
2800 * Modules/websockets/WebSocketExtensionDispatcher.h:
2801 * Modules/websockets/WebSocketHandshake.cpp:
2802 (WebCore::WebSocketHandshake::addExtensionProcessor):
2803 * Modules/websockets/WebSocketHandshake.h:
2805 2014-11-11 Chris Dumez <cdumez@apple.com>
2807 Unreviewed iOS build fix after r176001.
2809 Export an additional symbol.
2813 2014-11-11 Jer Noble <jer.noble@apple.com>
2815 [Mac] Add diagnostic logging for per-media-engine load failures
2816 https://bugs.webkit.org/show_bug.cgi?id=138647
2818 Reviewed by Eric Carlson.
2820 Add diagnostic logging fired whenever a media engine fails to load media,
2821 even if another engine subsequentially succeeds. Add a mechanism for retrieving
2822 the platform-specific error code from a given engine.
2824 * html/HTMLMediaElement.cpp:
2825 (WebCore::HTMLMediaElement::parseAttribute):
2826 * html/HTMLMediaElement.h:
2827 * page/DiagnosticLoggingKeys.cpp:
2828 (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
2829 * page/DiagnosticLoggingKeys.h:
2830 * platform/graphics/MediaPlayer.cpp:
2831 (WebCore::MediaPlayer::networkStateChanged):
2832 (WebCore::MediaPlayer::platformErrorCode):
2833 * platform/graphics/MediaPlayer.h:
2834 (WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
2835 * platform/graphics/MediaPlayerPrivate.h:
2836 (WebCore::MediaPlayerPrivateInterface::platformErrorCode):
2837 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2838 (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
2839 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2840 (WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
2841 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2842 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2843 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2844 (WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
2845 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2846 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2847 (WebCore::MediaPlayerPrivateQTKit::platformErrorCode):
2849 2014-11-11 Chris Dumez <cdumez@apple.com>
2851 Mark more virtual functions in HTMLInputElement as final
2852 https://bugs.webkit.org/show_bug.cgi?id=138644
2854 Reviewed by Andreas Kling.
2856 Mark more virtual functions in HTMLInputElement as final to help the
2857 compiler optimize better.
2859 No new tests, no behavior change.
2861 * html/HTMLInputElement.h:
2863 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2865 Remove IncrementalSweeper::create()
2866 https://bugs.webkit.org/show_bug.cgi?id=138243
2868 Reviewed by Filip Pizlo.
2870 As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
2871 IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
2872 Now we begins to use std::make_unique<> to create IncrementalSweeper instance.
2874 No new tests, no behavior changes.
2876 * bindings/js/JSDOMWindowBase.cpp:
2877 (WebCore::JSDOMWindowBase::commonVM):
2878 * platform/ios/WebSafeIncrementalSweeperIOS.h:
2880 2014-11-11 Chris Dumez <cdumez@apple.com>
2882 Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
2883 https://bugs.webkit.org/show_bug.cgi?id=138594
2885 Reviewed by Antti Koivisto.
2887 Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
2888 DeprecatedStyleBuilder to the new StyleBuilder using custom code.
2890 No new tests, no behavior change.
2892 * css/CSSPropertyNames.in:
2893 * css/DeprecatedStyleBuilder.cpp:
2894 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2895 (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
2896 (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
2897 (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
2898 (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
2899 (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
2900 (WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
2901 * css/StyleBuilderCustom.h:
2902 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
2903 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
2904 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
2905 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
2906 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):
2908 2014-11-11 David Kilzer <ddkilzer@apple.com>
2910 Modernize $buildingForIPhone in CodeGeneratorObjC.pm
2911 <http://webkit.org/b/138640>
2913 Reviewed by Daniel Bates.
2915 Mac OS X is the only platform that supports NSColor, so rename
2916 $buildingForIPhone to $shouldUseCGColor (which is actually what
2917 the variable represents) and define it in terms of the "macosx"
2920 * bindings/scripts/CodeGeneratorObjC.pm:
2921 ($buildingForIPhone): Rename to $shouldUseCGColor.
2922 ($shouldUseCGColor): False if PLATFORM_NAME is not defined,
2923 which is the case on older Xcodes when building for Mac OS X, or
2924 if PLATFORM_NAME is equal to "macosx". True otherwise.
2925 (GetClassName): Switch to use new variable name.
2926 (AddIncludesForType): Ditto.
2927 (GenerateHeader): Remove dead code. The
2928 $buildingForTigerOrEarlier variable was accidentally
2929 re-introduced in r161638, but was originally removed in r127032!
2930 (GenerateImplementation): Switch to use new variable name.
2932 2014-11-11 Tim Horton <timothy_horton@apple.com>
2934 Add support for mailto: link action menus
2935 https://bugs.webkit.org/show_bug.cgi?id=138641
2936 <rdar://problem/18741567>
2938 Reviewed by Beth Dakin.
2943 * platform/spi/mac/DataDetectorsSPI.h:
2944 Add some DataDetectors SPI.
2946 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2948 [iOS] video is sometimes allowed to play from the background
2949 https://bugs.webkit.org/show_bug.cgi?id=138522
2951 Rubber-stamped by Jer Noble.
2953 * platform/audio/MediaSession.cpp:
2954 (WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.
2956 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2958 [iOS] a page with video in optimized fullscreen is visible
2959 https://bugs.webkit.org/show_bug.cgi?id=138632
2961 Reviewed by Anders Carlsson.
2963 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2964 (WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.
2966 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2968 Mountain Lion build fix
2969 https://bugs.webkit.org/show_bug.cgi?id=138631
2971 Reviewed by Simon Fraser.
2973 * platform/spi/cocoa/CoreTextSPI.h:
2975 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2977 [iOS] cleanup wireless route monitoring
2978 https://bugs.webkit.org/show_bug.cgi?id=138614
2980 Reviewed by Jer Noble.
2982 * html/HTMLMediaElement.cpp:
2983 (WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
2984 (WebCore::HTMLMediaElement::removeEventListener): Ditto.
2985 (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2987 * platform/audio/ios/MediaSessionManagerIOS.mm:
2988 (WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
2989 (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
2990 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
2991 (-[WebMediaSessionHelper initWithCallback:]): Ditto.
2992 (-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
2994 (-[WebMediaSessionHelper clearCallback]): Add logging.
2995 (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
2996 (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
2998 (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
2999 (-[WebMediaSessionHelper interruption:]): Add logging.
3000 (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
3001 (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
3002 (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
3003 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
3005 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3007 Unreviewd iOS build fix
3009 * platform/spi/cocoa/CoreTextSPI.h:
3011 2014-11-11 David Kilzer <ddkilzer@apple.com>
3013 Protect Document in ProcessingInstruction::setXSLStyleSheet()
3014 <http://webkit.org/b/138621>
3016 Reviewed by Andreas Kling.
3018 The patch is inspired by the following Blink revision by
3020 <https://src.chromium.org/viewvc/blink?view=rev&revision=182309>
3022 * dom/ProcessingInstruction.cpp:
3023 (WebCore::ProcessingInstruction::setXSLStyleSheet):
3025 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3027 Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
3028 https://bugs.webkit.org/show_bug.cgi?id=138623
3030 Reviewed by Geoff Garen.
3032 No new tests because there is no behavior change.
3036 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3037 (WebCore::GlyphPage::fill):
3038 * platform/graphics/mac/SimpleFontDataMac.mm:
3039 (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
3040 * platform/ios/WebCoreSystemInterfaceIOS.mm:
3041 * platform/mac/WebCoreSystemInterface.h:
3042 * platform/mac/WebCoreSystemInterface.mm:
3043 * platform/spi/cocoa/CoreTextSPI.h:
3045 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3047 Unreviewed Mountain Lion build fix
3049 * platform/spi/cocoa/CoreTextSPI.h:
3051 2014-11-11 Commit Queue <commit-queue@webkit.org>
3053 Unreviewed, rolling out r175852.
3054 https://bugs.webkit.org/show_bug.cgi?id=138626
3056 Broke PLT by introducing a crash. (Requested by rniwa on
3061 "Lazily create HTMLInputElement's inputType and shadow
3063 https://bugs.webkit.org/show_bug.cgi?id=138524
3064 http://trac.webkit.org/changeset/175852
3066 2014-11-11 Chris Dumez <cdumez@apple.com>
3068 Regression(r175947): Caused assertions in debug builds
3069 https://bugs.webkit.org/show_bug.cgi?id=138620
3071 Reviewed by Benjamin Poulain.
3073 In HTMLCollection::traverseForward(), traversedCount was incremented 1
3074 time too many when hitting the end of the collection (i.e. element
3075 becomes null). Doing a partial revert.
3077 No new tests, already covered by existing tests.
3079 * html/HTMLCollection.cpp:
3080 (WebCore::HTMLCollection::traverseForward):
3082 2014-11-11 Tim Horton <timothy_horton@apple.com>
3084 DataDetectors' menu items aren't presented in the telephone number menu
3085 https://bugs.webkit.org/show_bug.cgi?id=138602
3086 <rdar://problem/18866308>
3088 Reviewed by Beth Dakin.
3090 * English.lproj/Localizable.strings:
3091 Remove a now-unused localized string.
3093 2014-11-11 Daniel Bates <dabates@apple.com>
3095 [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
3096 https://bugs.webkit.org/show_bug.cgi?id=138615
3097 <rdar://problem/18928487>
3099 Reviewed by David Hyatt.
3101 Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
3102 RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
3103 the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
3104 expectation is only true when frame flattening is disabled.
3106 Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
3108 * rendering/RenderBlock.cpp:
3109 (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
3111 2014-11-11 Tim Horton <timothy_horton@apple.com>
3113 Adopt DDActionContext menu type SPI
3114 https://bugs.webkit.org/show_bug.cgi?id=138603
3115 <rdar://problem/18867627>
3117 Reviewed by Anders Carlsson.
3119 * platform/spi/mac/DataDetectorsSPI.h:
3122 2014-11-11 Tim Horton <timothy_horton@apple.com>
3124 Data Detectors popovers should be dismissed upon scrolling
3125 https://bugs.webkit.org/show_bug.cgi?id=138600
3126 <rdar://problem/18932770>
3128 Reviewed by Beth Dakin.
3130 * platform/spi/mac/DataDetectorsSPI.h:
3131 Adjust the SPI header.
3133 2014-11-11 Tim Horton <timothy_horton@apple.com>
3135 Localize strings for action menus
3136 https://bugs.webkit.org/show_bug.cgi?id=138591
3137 <rdar://problem/18815343>
3139 Reviewed by Dan Bates.
3141 * English.lproj/Localizable.strings:
3142 Add a bunch of localizable strings.
3144 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3146 Cleanup from r175379
3147 https://bugs.webkit.org/show_bug.cgi?id=138616
3149 Reviewed by Simon Fraser.
3151 No new tests because there is no behavior change.
3154 * platform/ios/WebCoreSystemInterfaceIOS.mm:
3155 * platform/mac/WebCoreSystemInterface.h:
3156 * platform/mac/WebCoreSystemInterface.mm:
3158 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3160 Move CTFontTransformGlyphs out from WKSI
3161 https://bugs.webkit.org/show_bug.cgi?id=138599
3163 Reviewed by Simon Fraser.
3165 No new tests because there is no behavior change.
3169 * platform/graphics/SimpleFontData.cpp:
3170 (WebCore::SimpleFontData::applyTransforms):
3171 * platform/graphics/SimpleFontData.h:
3172 * platform/ios/WebCoreSystemInterfaceIOS.mm:
3173 * platform/mac/WebCoreSystemInterface.h:
3174 * platform/mac/WebCoreSystemInterface.mm:
3175 * platform/spi/cocoa/CoreTextSPI.h:
3177 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3179 Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
3180 https://bugs.webkit.org/show_bug.cgi?id=138558
3182 Reviewed by Anders Carlsson.
3184 This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
3185 It would be good if we also remove create() factory function though, in this case, it is
3186 a little hard to remove it since the create() factory function does many works to create
3187 a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
3188 std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
3190 Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
3191 std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
3192 so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
3193 cache algorithm based on Vector class.
3195 No new tests, no behavior changes.
3197 * platform/efl/RenderThemeEfl.cpp:
3198 (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
3199 (WebCore::RenderThemeEfl::getThemePartFromCache):
3200 * platform/efl/RenderThemeEfl.h:
3202 2014-11-09 Darin Adler <darin@apple.com>
3204 Minor tweaks to HTMLCollection
3205 https://bugs.webkit.org/show_bug.cgi?id=138556
3207 Reviewed by Chris Dumez.
3209 * accessibility/AccessibilityRenderObject.cpp:
3210 (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3211 Update for namedElements function that now returns a Vector; also use
3212 a new style for loop to iterate it.
3214 * bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
3215 (WebCore::namedItems): Updated name to match WebKit coding style, and also
3216 updated to use the return value from namedItems, which now returns a Vector.
3217 (WebCore::callHTMLAllCollection): Updated for namedItems name change.
3218 Also removed explicit Node* type from result of namedItemWithIndex, since that
3219 function now returns a more specific type.
3220 (WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
3221 (WebCore::JSHTMLAllCollection::item): Ditto.
3222 (WebCore::JSHTMLAllCollection::namedItem): Ditto.
3224 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
3225 (WebCore::namedItems): Updated name to match WebKit coding style, and also
3226 updated to use the return value from namedItems, which now returns a Vector.
3227 (WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
3228 (WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
3230 * bindings/js/JSHTMLFormElementCustom.cpp:
3231 (WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
3232 namedItems, which now returns a Vector.
3234 * html/HTMLAllCollection.cpp:
3235 (WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
3236 since it's only used in one place, the create function.
3237 (WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
3238 explicit destructor since there's nothing special to implement, and includers of
3239 the header file have everything they ened to compile the compiler-generated one.
3240 (WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
3242 * html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
3243 Chagned return type of namedItemWithIndex to Element.
3245 * html/HTMLCollection.cpp:
3246 (WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
3247 changed this to be a static member function so it can use the RootType enum, which
3248 is now private to the class.
3249 (WebCore::isMatchingHTMLElement): Marked this function static so it will get
3251 (WebCore::isMatchingElement): Ditto.
3252 (WebCore::previousElement): Marked this function inline since it's called in only
3253 one place. Changed argument type to a reference since it can never be null.
3254 (WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
3255 also updated for above changes.
3256 (WebCore::firstMatchingElement): Marked this function static so it will get
3258 (WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
3259 since it can never be null.
3260 (WebCore::HTMLCollection::item): Changed return type to Element.
3261 (WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
3262 Element. This streamlines the code below that calls it so it fits on one line.
3263 (WebCore::firstMatchingChildElement): Marked this function static so it will get
3265 (WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
3266 since it can never be null.
3267 (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
3268 header since, although it's marked inline, it's only used inside this file.
3269 (WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
3270 to make the function smaller and possibly easier to read. This does add one
3271 redundant null check, but it seems OK to do that.
3272 (WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
3273 (WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
3274 the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
3275 Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
3276 instead of an && since it makes the code a little easier to read.
3277 (WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
3278 using shorter variable names, and using references instead of pointers. Also removed
3279 the call to didPopulate, since setNamedItemCache now takes care of that.
3280 (WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
3281 appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
3282 for better performance. Added a FIXME, because there seems to be something wrong
3283 here about this being non-virtual. Made other small tweaks to streamline the code.
3284 (WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
3285 There is no reason to need to inline this.
3287 * html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
3288 of the class definitions so the class definitions are easier to read. Made some
3289 functions that were formerly public or protected be private instead. Added a call
3290 to didPopulate to setNamedItemCache so the callers don't have to do it.
3292 * html/HTMLFormControlsCollection.cpp:
3293 (WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
3294 Tweaked coding style a little bit.
3295 (WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
3296 simplify a bit. Don't build the foundInputElements set when the owner is not a
3297 form element, since we don't use the set in that case. Use shorter variable names,
3298 and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
3299 now takes care of that.
3301 * html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
3302 Updated return type for namedItem, and also made the override private.
3304 * html/HTMLFormElement.cpp:
3305 (WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
3306 function name accordingly.
3307 * html/HTMLFormElement.h: Ditto.
3309 * html/HTMLNameCollection.h: Removed a stray blank line.
3311 * html/HTMLSelectElement.cpp:
3312 (WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
3313 (WebCore::HTMLSelectElement::item): Ditto.
3314 * html/HTMLSelectElement.h: Ditto.
3316 * page/scrolling/AxisScrollSnapOffsets.cpp:
3317 (WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
3318 loop. Removed unwanted use of children()->collectionBegin() to get the first element
3319 child of an HTMLElement. This function uses a mix of DOM and rendering functions that
3320 is probably incorrect, but I did not tackle fixing that at this time.
3322 2014-11-11 Dan Bernstein <mitz@apple.com>
3324 [Mac] WebCore includes unused cursor image resources
3325 https://bugs.webkit.org/show_bug.cgi?id=138605
3327 Reviewed by Anders Carlsson.
3329 * Resources/aliasCursor.png: Removed.
3330 * Resources/cellCursor.png: Removed.
3331 * Resources/contextMenuCursor.png: Removed.
3332 * Resources/copyCursor.png: Removed.
3333 * Resources/eastResizeCursor.png: Removed.
3334 * Resources/eastWestResizeCursor.png: Removed.
3335 * Resources/helpCursor.png: Removed.
3336 * Resources/linkCursor.png: Removed.
3337 * Resources/moveCursor.png: Removed.
3338 * Resources/noDropCursor.png: Removed.
3339 * Resources/noneCursor.png: Removed.
3340 * Resources/northEastResizeCursor.png: Removed.
3341 * Resources/northEastSouthWestResizeCursor.png: Removed.
3342 * Resources/northResizeCursor.png: Removed.
3343 * Resources/northSouthResizeCursor.png: Removed.
3344 * Resources/northWestResizeCursor.png: Removed.
3345 * Resources/northWestSouthEastResizeCursor.png: Removed.
3346 * Resources/progressCursor.png: Removed.
3347 * Resources/southEastResizeCursor.png: Removed.
3348 * Resources/southResizeCursor.png: Removed.
3349 * Resources/southWestResizeCursor.png: Removed.
3350 * Resources/verticalTextCursor.png: Removed.
3351 * Resources/waitCursor.png: Removed.
3352 * Resources/westResizeCursor.png: Removed.
3353 * Resources/zoomInCursor.png: Removed.
3354 * Resources/zoomOutCursor.png: Removed.
3356 * WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
3358 * platform/mac/CursorMac.mm:
3359 (WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
3360 for a nil return value from wkCursor(), which can’t occur in any supported configuration.
3361 For None, create a cursor with an empty NSImage instead of loading a transparent image from
3363 (WebCore::createNamedCursor): Deleted.
3365 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3367 Unreviewed, rolling out r175844.
3369 Win debug build has broken since r175844.
3373 "Use std::unique_ptr<> and std::make_unique<> in WebCore"
3374 https://bugs.webkit.org/show_bug.cgi?id=138560
3375 http://trac.webkit.org/changeset/175844
3377 2014-11-11 Philippe Normand <pnormand@igalia.com>
3379 Qt/Chromium remnants in MediaPlayer
3380 https://bugs.webkit.org/show_bug.cgi?id=138611
3382 Reviewed by Jer Noble.
3384 * platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
3386 2014-11-11 Chris Dumez <cdumez@apple.com>
3388 Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
3389 https://bugs.webkit.org/show_bug.cgi?id=138595
3391 Reviewed by Antti Koivisto.
3393 Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
3394 to the new StyleBuilder by adding a new MarqueeSpeed Converter.
3396 No new tests, no behavior change.
3398 * css/CSSPropertyNames.in:
3399 * css/DeprecatedStyleBuilder.cpp:
3400 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3401 (WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
3402 (WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
3403 * css/StyleBuilderConverter.h:
3404 (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
3406 2014-10-07 Sergio Villar Senin <svillar@igalia.com>
3408 [CSS Grid Layout] Limit the size of explicit/implicit grid
3409 https://bugs.webkit.org/show_bug.cgi?id=136217
3411 Reviewed by Andreas Kling.
3413 A recent change in the specs allow us to set a limit (maximum
3414 size) for both the explicit and implicit grids so we can protect
3415 ourselves from absurdly huge grid specifications. It was decided
3416 to use the recommended limit which is 1 million.
3418 This means that we can remove the old limitation for the number of
3419 repetitions in repeat(). Instead we now clamp the number of
3420 repetitions to the maximum value that allow us to have the maximum