1 2015-02-18 Chris Dumez <cdumez@apple.com>
3 Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
4 https://bugs.webkit.org/show_bug.cgi?id=141723
6 Reviewed by Andreas Kling.
8 Evict dead resources from the MemoryCache on non-critical memory
9 pressure. On critical memory pressure, we already evict ALL resources
10 from the MemoryCache. It is a good idea to start by evicting resources
11 we care less about on non-critical warning to decrease the chances of
12 getting a critical warning and thus having to clear the whole
15 * loader/cache/MemoryCache.h:
16 * platform/MemoryPressureHandler.cpp:
17 (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
18 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
19 (WebCore::MemoryPressureHandler::releaseMemory):
20 Call releaseCriticalMemory() before releaseNoncriticalMemory()
21 as releaseCriticalMemory() is more aggressive. Doing it the
22 other way around would mean that on critical warning, we would
23 first evict dead resources, then evict all resources. It is
24 more efficient to evict all resources first, as it makes the
25 non-critical operation (evict dead resources) a no-op.
27 2015-02-18 Eric Carlson <eric.carlson@apple.com>
29 [iOS] pause video when a tab moves to the background on some devices
30 https://bugs.webkit.org/show_bug.cgi?id=141753
31 <rdar://problem/19814562>
33 Reviewed by Jer Noble.
35 Test: media/video-background-tab-playback.html
37 * platform/audio/MediaSession.cpp:
38 (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
39 hidden if the BackgroundTabPlaybackRestricted is set.
41 * platform/audio/MediaSessionManager.cpp:
42 (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
43 to BackgroundProcessPlaybackRestricted.
44 (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
45 * platform/audio/MediaSessionManager.h:
47 * platform/audio/ios/MediaSessionManagerIOS.mm:
48 (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
49 devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
51 * testing/Internals.cpp:
52 (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
53 BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
55 2015-02-16 David Hyatt <hyatt@apple.com>
57 Wrong element's style is used for text-decoration-style.
58 https://bugs.webkit.org/show_bug.cgi?id=141673
59 <rdar://problem/19876774>
61 Reviewed by Dean Jackson.
63 Added fast/text/text-underline-style.html
65 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
66 (AXAttributeStringSetStyle):
67 Add arguments for fetching styles.
69 * rendering/InlineTextBox.cpp:
70 (WebCore::InlineTextBox::paint):
71 (WebCore::InlineTextBox::paintDecoration):
72 * rendering/InlineTextBox.h:
73 Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
74 way it fetches the colors.
76 * rendering/RenderObject.cpp:
77 (WebCore::RenderObject::getTextDecorationColorsAndStyles):
78 (WebCore::RenderObject::getTextDecorationColors): Deleted.
79 * rendering/RenderObject.h:
80 Add style fetching to the same function that fetches colors and rename it.
82 2015-02-18 David Kilzer <ddkilzer@apple.com>
84 REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
86 Attempt to fix this linker error by making a non-coding change:
88 Undefined symbols for architecture i386:
89 "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
90 __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
91 ld: symbol(s) not found for architecture i386
93 This should have been fixed by r180266, but perhaps Xcode didn't
94 recognize that it needed to rebuild this source file.
96 * page/UserContentController.cpp: Update copyright.
98 2015-02-18 Andreas Kling <akling@apple.com>
100 Purge PassRefPtr from CanvasRenderingContext2D.
101 <https://webkit.org/b/141749>
103 Reviewed by Gyuyoung Kim.
105 Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
107 * html/TextMetrics.h:
108 (WebCore::TextMetrics::create): Changed create() helper to return Ref.
110 * html/canvas/CanvasRenderingContext2D.h:
111 * html/canvas/CanvasRenderingContext2D.cpp:
112 (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
114 (WebCore::CanvasRenderingContext2D::createLinearGradient):
115 (WebCore::CanvasRenderingContext2D::createRadialGradient):
116 (WebCore::CanvasRenderingContext2D::createPattern):
117 (WebCore::createEmptyImageData):
118 (WebCore::CanvasRenderingContext2D::createImageData):
119 (WebCore::CanvasRenderingContext2D::getImageData):
120 (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
121 a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
122 and changed a PassRefPtr argument to RefPtr&&.
124 (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
126 2015-02-18 Commit Queue <commit-queue@webkit.org>
128 Unreviewed, rolling out r180260.
129 https://bugs.webkit.org/show_bug.cgi?id=141757
131 Broke the 32-bit builders (Requested by jessieberlin on
136 "Add a trivial code generator for the DFA"
137 https://bugs.webkit.org/show_bug.cgi?id=141017
138 http://trac.webkit.org/changeset/180260
140 2015-02-17 Anders Carlsson <andersca@apple.com>
142 Add API for clearing in-memory caches to WKWebsiteDataStore
143 https://bugs.webkit.org/show_bug.cgi?id=141724
145 Reviewed by Tim Horton.
147 Add a version of evictResources that takes a session id.
149 * loader/cache/MemoryCache.cpp:
150 (WebCore::MemoryCache::evictResources):
152 2015-02-18 Timothy Horton <timothy_horton@apple.com>
154 Remove more references to WebCore.exp.in
155 https://bugs.webkit.org/show_bug.cgi?id=141747
157 Reviewed by Alexey Proskuryakov.
159 * WebCore.xcodeproj/project.pbxproj:
161 2015-02-17 Benjamin Poulain <benjamin@webkit.org>
163 Add a trivial code generator for the DFA
164 https://bugs.webkit.org/show_bug.cgi?id=141017
166 Reviewed by Andreas Kling.
168 Nothing fancy yet, this is just doing a literal translation from the DFA
169 to machine code. It is extremely inefficient at the moment.
171 * WebCore.xcodeproj/project.pbxproj:
172 * contentextensions/ContentExtensionsBackend.cpp:
173 (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
174 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
175 (WebCore::ContentExtensions::addActionToHashSet):
176 (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
177 * contentextensions/ContentExtensionsBackend.h:
178 * contentextensions/DFA.cpp:
179 (WebCore::ContentExtensions::DFA::nextState): Deleted.
180 (WebCore::ContentExtensions::DFA::actions): Deleted.
181 * contentextensions/DFA.h:
182 (WebCore::ContentExtensions::DFA::size):
183 (WebCore::ContentExtensions::DFA::nodeAt):
184 * contentextensions/DFACompiler.cpp: Added.
185 (WebCore::ContentExtensions::compileDFA):
186 (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
187 (WebCore::ContentExtensions::DFACodeGenerator::compile):
188 (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
189 (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
190 (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
191 (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
192 * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
194 2015-02-17 Chris Dumez <cdumez@apple.com>
196 Rename ScopedEventQueue::instance() to singleton()
197 https://bugs.webkit.org/show_bug.cgi?id=141738
199 Reviewed by Daniel Bates.
201 Rename ScopedEventQueue::instance() to singleton(), as per coding
202 style. Also modernize the code a little bit.
204 * dom/EventDispatcher.cpp:
205 (WebCore::EventDispatcher::dispatchScopedEvent):
206 * dom/ScopedEventQueue.cpp:
207 (WebCore::ScopedEventQueue::singleton):
208 (WebCore::ScopedEventQueue::dispatchAllEvents):
209 (WebCore::ScopedEventQueue::incrementScopingLevel):
210 (WebCore::ScopedEventQueue::decrementScopingLevel):
211 (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
212 (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
213 (WebCore::ScopedEventQueue::instance): Deleted.
214 * dom/ScopedEventQueue.h:
215 (WebCore::EventQueueScope::EventQueueScope):
216 (WebCore::EventQueueScope::~EventQueueScope):
218 2015-02-17 Chris Dumez <cdumez@apple.com>
220 Remove dead code from FontCache
221 https://bugs.webkit.org/show_bug.cgi?id=141741
223 Reviewed by Daniel Bates.
225 Remove dead code from FontCache:
226 - getFontFamilyForCharacters() has no implementation.
227 - SimpleFontFamily is unused.
229 * platform/graphics/FontCache.h:
231 2015-02-17 Chris Dumez <cdumez@apple.com>
233 Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
234 https://bugs.webkit.org/show_bug.cgi?id=141739
236 Reviewed by Simon Fraser.
238 Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
241 * page/animation/CSSPropertyAnimation.cpp:
242 (WebCore::CSSPropertyAnimationWrapperMap::singleton):
243 (WebCore::CSSPropertyAnimation::blendProperties):
244 (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
245 (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
246 (WebCore::CSSPropertyAnimation::propertiesEqual):
247 (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
248 (WebCore::CSSPropertyAnimation::getNumProperties):
249 (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
251 2015-02-17 David Kilzer <ddkilzer@apple.com>
253 REGRESSION (r180224): Remove unused generate-export-file script
254 <http://webkit.org/b/141491>
256 * generate-export-file: Removed. This was the script used to
257 create WebCore.exp files for iOS since we couldn't compile a
258 host-side tool to run like we did on Mac OS X. Dont't tell
259 anyone, but this was an epic hack I created while merging open
260 source changes to the internal iOS WebKit repository around the
261 time that the WebCore.exp.in file was created. End of an era.
263 2015-02-17 David Kilzer <ddkilzer@apple.com>
265 SoftLinking.h: Update copyright and license; clean up whitespace
267 * platform/win/SoftLinking.h:
269 2015-02-17 Chris Dumez <cdumez@apple.com>
271 Slight CachedPage class clean up
272 https://bugs.webkit.org/show_bug.cgi?id=141693
274 Reviewed by Andreas Kling.
276 Slight CachedPage class clean up:
277 - Drop unnecessary m_timeStamp data member
278 - Protect m_needsCaptionPreferencesChanged data member with
279 #if ENABLE(VIDEO_TRACK)
280 - Merge destroy() method into the destructor as this is the
282 - Update clear() to reset 2 data members that were missing
284 2015-02-17 Anders Carlsson <andersca@apple.com>
286 Silence two -Wcast-qual warnings.
287 rdar://problem/19758266
289 * platform/ios/wak/WKUtilities.c:
293 2015-02-17 Zalan Bujtas <zalan@apple.com>
295 Minor RenderTable* class cleanups.
296 https://bugs.webkit.org/show_bug.cgi?id=141707
298 Reviewed by Andreas Kling.
300 Use in-class initializer where possible.
301 Remove redundant code.
302 Move multiline implementations out of class declaration.
304 No change in functionality.
306 * rendering/RenderTableCaption.cpp:
307 (WebCore::RenderTableCaption::insertedIntoTree):
308 (WebCore::RenderTableCaption::willBeRemovedFromTree):
309 (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
310 * rendering/RenderTableCaption.h:
311 * rendering/RenderTableCell.cpp:
312 (WebCore::RenderTableCell::RenderTableCell):
313 * rendering/RenderTableCell.h:
314 (WebCore::RenderTableCell::colSpan):
315 (WebCore::RenderTableCell::rowSpan):
316 (WebCore::RenderTableCell::setCol):
317 (WebCore::RenderTableCell::col):
318 (WebCore::RenderTableCell::section):
319 (WebCore::RenderTableCell::table):
320 (WebCore::RenderTableCell::rowIndex):
321 (WebCore::RenderTableCell::styleOrColLogicalWidth):
322 (WebCore::RenderTableCell::logicalHeightForRowSizing):
323 (WebCore::RenderTableCell::isBaselineAligned):
324 (WebCore::RenderTableCell::borderAdjoiningTableStart):
325 (WebCore::RenderTableCell::borderAdjoiningTableEnd):
326 (WebCore::RenderTableCell::borderAdjoiningCellBefore):
327 (WebCore::RenderTableCell::borderAdjoiningCellAfter):
328 * rendering/RenderTableCol.cpp:
329 (WebCore::RenderTableCol::RenderTableCol):
330 * rendering/RenderTableCol.h:
331 (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
332 (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
333 * rendering/RenderTableRow.h:
334 (WebCore::RenderTableRow::setRowIndex):
335 (WebCore::RenderTableRow::rowIndex):
336 (WebCore::RenderTableRow::borderAdjoiningTableStart):
337 (WebCore::RenderTableRow::borderAdjoiningTableEnd):
338 (WebCore::RenderTableRow::table):
339 (WebCore::RenderTableSection::firstRow):
340 (WebCore::RenderTableSection::lastRow):
341 * rendering/RenderTableSection.cpp:
342 (WebCore::RenderTableSection::RenderTableSection):
343 (WebCore::RenderTableSection::dirtiedRows):
344 (WebCore::RenderTableSection::dirtiedColumns):
345 (WebCore::RenderTableSection::paintObject):
346 (WebCore::RenderTableSection::nodeAtPoint):
347 * rendering/RenderTableSection.h:
348 (WebCore::CellSpan::CellSpan):
349 (WebCore::RenderTableSection::borderAdjoiningTableStart):
350 (WebCore::RenderTableSection::borderAdjoiningTableEnd):
351 (WebCore::RenderTableSection::cellAt):
352 (WebCore::RenderTableSection::primaryCellAt):
353 (WebCore::RenderTableSection::rowRendererAt):
354 (WebCore::RenderTableSection::outerBorderLeft):
355 (WebCore::RenderTableSection::outerBorderRight):
356 (WebCore::RenderTableSection::outerBorderTop):
357 (WebCore::RenderTableSection::outerBorderBottom):
358 (WebCore::RenderTableSection::numRows):
359 (WebCore::RenderTableSection::recalcCellsIfNeeded):
360 (WebCore::RenderTableSection::rowBaseline):
361 (WebCore::RenderTableSection::fullTableRowSpan):
362 (WebCore::CellSpan::start): Deleted.
363 (WebCore::CellSpan::end): Deleted.
365 2015-02-16 Dean Jackson <dino@apple.com>
367 REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
368 https://bugs.webkit.org/show_bug.cgi?id=141689
369 <rdar://problem/19689286>
371 Reviewed by Eric Carlson.
373 The iBooks app turns off the requirement for a user gesture
374 before triggering playback. When we moved to script-based
375 media controls there were a few regressions in this setup.
376 This makes them behave a lot more like iOS 7.
378 * Modules/mediacontrols/mediaControlsApple.js:
379 (Controller.prototype.setPlaying): We don't want to hide the controls
380 yet, just start a hiding timer.
381 * Modules/mediacontrols/mediaControlsiOS.js:
382 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
383 played before, we don't want to show the big start button. If we
384 are in the middle of construction, we do want to show it. We no
385 longer care about the case where you're not in setup and have
386 the relaxed restrictions (we still want to show the start button
388 (ControllerIOS.prototype.showControls): When we show the controls,
389 make sure our timeline is up to date. This is necessary for the
390 cases where we automatically show the controls, such as when we hit
392 (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
393 parameter on to the super-method.
394 (ControllerIOS.prototype.setPlaying):
395 (ControllerIOS.prototype.progressFillStyle): Deleted.
397 2015-02-17 Chris Dumez <cdumez@apple.com>
399 Access MemoryPressureHandler global instance via a singleton() static member function
400 https://bugs.webkit.org/show_bug.cgi?id=141691
402 Reviewed by Andreas Kling.
404 Access MemoryPressureHandler global instance via a singleton() static
405 member function as per coding style. Also make all other member
406 functions non-static as callers can just use singleton() to get the
407 instance and access methods. This avoid having to call
408 MemoryPressureHandler::singleton() from member functions.
410 * bindings/js/ScriptController.cpp:
411 (WebCore::collectGarbageAfterWindowShellDestruction):
412 * history/PageCache.cpp:
413 (WebCore::PageCache::canCache):
414 * loader/FrameLoader.cpp:
415 (WebCore::FrameLoader::commitProvisionalLoad):
416 * page/FrameView.cpp:
417 (WebCore::FrameView::willPaintContents):
418 (WebCore::FrameView::didPaintContents):
419 (WebCore::FrameView::computeCoverageRect):
420 * platform/MemoryPressureHandler.cpp:
421 (WebCore::MemoryPressureHandler::singleton):
422 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
423 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
424 (WebCore::memoryPressureHandler): Deleted.
425 * platform/MemoryPressureHandler.h:
426 (WebCore::MemoryPressureHandler::setLowMemoryHandler):
427 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
428 (WebCore::MemoryPressureHandler::platformReleaseMemory):
429 (WebCore::MemoryPressureHandler::install):
430 (WebCore::MemoryPressureHandler::holdOff):
431 (WebCore::respondToMemoryPressureCallback):
432 * platform/graphics/FontCache.cpp:
433 (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
434 * platform/ios/LegacyTileCache.mm:
435 (WebCore::LegacyTileCache::createTilesInActiveGrid):
436 * platform/ios/LegacyTileGrid.mm:
437 (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
438 * platform/ios/LegacyTileLayerPool.mm:
439 (WebCore::LegacyTileLayerPool::addLayer):
440 * platform/ios/TileControllerMemoryHandlerIOS.cpp:
441 (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
442 * platform/linux/MemoryPressureHandlerLinux.cpp:
443 (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
445 2015-02-17 Alex Christensen <achristensen@webkit.org>
447 Remove WebCore.exp.in and clean up.
448 https://bugs.webkit.org/show_bug.cgi?id=141491
450 Reviewed by Andreas Kling.
452 * Configurations/WebCore.xcconfig:
453 Don't use exported symbols files.
454 * DerivedSources.make:
455 Don't generate export files.
456 * WebCore.exp.in: Removed.
457 * WebCore.xcodeproj/project.pbxproj:
458 Removed WebCoreExportFileGenerator targets.
459 * make-export-file-generator: Removed.
461 2015-02-17 Carlos Garcia Campos <cgarcia@igalia.com>
463 Use HashMap::add instead of get/contains + set in DOMObjectCache
464 https://bugs.webkit.org/show_bug.cgi?id=141558
466 Rubber-stamped by Žan Doberšek.
468 * bindings/gobject/DOMObjectCache.cpp:
469 (WebKit::getOrCreateDOMObjectCacheFrameObserver):
470 (WebKit::DOMObjectCache::put):
472 2015-02-17 Carlos Garcia Campos <cgarcia@igalia.com>
474 [GTK] GObject DOM bindings object are cached forever
475 https://bugs.webkit.org/show_bug.cgi?id=141558
477 Reviewed by Sergio Villar Senin.
479 Rework the DOMObjectCache to avoid having to manually clear the
480 objects when the frame is destroyed, using a FrameDestructionObserver
481 instead. When a new object associated to a Frame is added to the
482 cache, a FrameDestructionObserver is created for the frame if
483 needed, and the DOM object is tracked by the observer too. When
484 the frame is detached from the page all its objects are cleared,
485 and if the aren't additional references, the object is finalized
486 and removed from the cache normally.
487 This patch also simplifies and modernizes the code to make it
488 easier to read an maintain.
490 * bindings/gobject/DOMObjectCache.cpp:
491 (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
492 to initialize its members and simplify the callers.
493 (WebKit::DOMObjectCacheData::clearObject): Remove the references
494 added by the cache, ensuring the GObject is not finalized until
496 (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
498 (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
499 (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
500 FrameDestructionObserver for the given Frame or return the
502 (WebKit::domObjects): Map wrapped object to wrapper object.
503 (WebKit::DOMObjectCache::forget): Remove the wrapped object from
505 (WebKit::DOMObjectCache::get): Return the wrapped object if it is
506 in the cache, increasing the cache references.
507 (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
508 for the given wrapped object. If it's a Node and has a frame add
509 the node to the FrameDestructionObserver corresponding to the frame.
510 (WebKit::getFrameFromHandle): Deleted.
511 (WebKit::weakRefNotify): Deleted.
512 (WebKit::DOMObjectCache::clearByFrame): Deleted.
513 (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
514 * bindings/gobject/DOMObjectCache.h:
516 2015-02-17 ChangSeok Oh <changseok.oh@collabora.com>
518 REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
519 https://bugs.webkit.org/show_bug.cgi?id=141647
521 Reviewed by Csaba Osztrogonác.
523 No new tests since this just fixes a build break.
525 * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
526 (WebCore::Position::isCandidate):
528 2015-02-16 Chris Dumez <cdumez@apple.com>
530 Keep all memory cache resources in ListHashSets
531 https://bugs.webkit.org/show_bug.cgi?id=141667
533 Reviewed by Andreas Kling.
535 Keep all memory cache resources in ListHashSets instead of manual linked
536 lists. This simplifies the code a lot and is also more efficient for
537 retrieving / removing particular CachedResources.
539 * loader/cache/CachedResource.cpp:
540 (WebCore::CachedResource::CachedResource):
541 * loader/cache/CachedResource.h:
542 * loader/cache/MemoryCache.cpp:
543 (WebCore::MemoryCache::pruneDeadResourcesToSize):
544 (WebCore::MemoryCache::removeFromLRUList):
545 (WebCore::MemoryCache::insertInLRUList):
546 (WebCore::MemoryCache::dumpLRULists):
547 (WebCore::MemoryCache::lruListFor): Deleted.
548 * loader/cache/MemoryCache.h:
550 2015-02-16 Benjamin Poulain <benjamin@webkit.org>
552 CSS JIT: finish :nth-last-child()
553 https://bugs.webkit.org/show_bug.cgi?id=141629
555 Reviewed by Andreas Kling.
557 This patch adds the matcher for :nth-child(An+B of selector list) and
558 fix a small bug I discovered while working on it.
560 The matcher is straightforward: count the next siblings matching the selector,
563 While working on it I noticed I forgot the test for IsParsingChildrenFinished
564 on the simple version of :nth-last-child(). I add it in both matcher, write
565 a couple of tests, the first part of the tests now succeed, but the second part
569 1) We interupt the parsing to execute the JavaScript.
570 From there, we force the style resolution to get the computed style.
571 2) When resolving the style, the early check for isFinishedParsingChildren()
572 quits the function early. This is done *before* we marked the parent
573 for :nth-last-child() style resolution.
574 3) After the script, parsing resume and the following elements are added.
575 4) When resolving the style, only the new elements are marked dirty,
576 the elements pending their :nth-last-child() style never get udpated.
578 To fix the problem, I moved the test for FinishedParsingChildren after
581 Honestly, those early return for FinishedParsingChildren need to be refined
582 and they should be tested properly. We should not do this kind of things
583 for Query for example.
585 Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
586 fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
587 fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
588 fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
589 fast/selectors/nth-last-child-of-register-requirement.html
591 * css/SelectorChecker.cpp:
592 (WebCore::SelectorChecker::checkOne):
593 Fix the tree marking.
595 * cssjit/SelectorCompiler.cpp:
596 (WebCore::SelectorCompiler::addPseudoClassType):
597 The fragment creation was already done, all I had to do was
600 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
601 :nth-child() and :nth-last-child() with a selector list are heavier than :not()
602 and :matches(), move them accordingly.
604 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
605 More the early return after the tree marking.
607 (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
608 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
609 New matcher, nothing optimized yet.
611 2015-02-16 Tim Horton <timothy_horton@apple.com>
613 Adopt CAMachPort-as-layer-contents
614 https://bugs.webkit.org/show_bug.cgi?id=141687
615 <rdar://problem/19393233>
617 Reviewed by Simon Fraser.
619 No new tests, just a performance bump.
621 * platform/cocoa/MachSendRight.h:
622 (WebCore::MachSendRight::operator bool):
623 Add an operator bool() that checks if the underlying port is nonnull.
625 * platform/spi/cocoa/QuartzCoreSPI.h:
628 2015-02-15 Sam Weinig <sam@webkit.org>
630 Add experimental <attachment> element support
631 https://bugs.webkit.org/show_bug.cgi?id=141626
633 Reviewed by Tim Horton.
635 Adds scaffolding for an experimental implementation of an <attachment> element
636 which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
639 The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and
640 a setting (Settings::attachmentElementEnabled()).
642 Tests: fast/attachment/attachment-disabled-dom.html
643 fast/attachment/attachment-disabled-rendering.html
644 fast/attachment/attachment-dom.html
645 fast/attachment/attachment-rendering.html
647 * Configurations/FeatureDefines.xcconfig:
648 Add new ENABLE_ATTACHMENT_ELEMENT macro.
651 * WebCore.vcxproj/WebCore.vcxproj:
652 * WebCore.xcodeproj/project.pbxproj:
656 Add support for checking a setting to determine if a particular tag should be exposed.
658 * html/HTMLAttachmentElement.cpp: Added.
659 * html/HTMLAttachmentElement.h: Added.
660 Stub out the basics of the new element.
662 * html/HTMLElementsAllInOne.cpp:
663 Add HTMLAttachmentElement.cpp.
665 * html/HTMLTagNames.in:
669 Add attachmentElementEnabled setting.
671 * rendering/RenderAttachment.cpp: Added.
672 * rendering/RenderAttachment.h: Added.
673 Stub out the basics of the new render. We will probably want to replace this with
674 a non-replaced render, but this will do as a placeholder for now.
676 * rendering/RenderObject.h:
677 (WebCore::RenderObject::isAttachment):
678 Add predicate for type casting.
680 * rendering/RenderingAllInOne.cpp:
681 Add RenderAttachment.cpp.
683 2015-02-16 Andreas Kling <akling@apple.com>
685 GC (almost) immediately when navigating under memory pressure.
686 <https://webkit.org/b/141663>
688 Reviewed by Geoffrey Garen.
690 Since the PageCache is already disabled in memory pressure situations,
691 we know that detaching the old window shell on navigation is basically
692 guaranteed to generate a bunch of garbage, we can soften the memory
693 peak a bit by doing a GC right away instead of scheduling one for soon(tm).
695 * bindings/js/GCController.cpp:
696 (WebCore::GCController::GCController):
697 (WebCore::GCController::garbageCollectSoon):
698 (WebCore::GCController::garbageCollectOnNextRunLoop):
699 (WebCore::GCController::gcTimerFired):
700 * bindings/js/GCController.h:
702 Add a GCController::garbageCollectOnNextRunLoop() complement to the
703 "soon" and "now" options. There was already a zero timer in here for
704 non-CF builds, so I just used that same timer to implement this
705 and have the non-CF code path call garbageCollectOnNextRunLoop().
707 * bindings/js/ScriptController.cpp:
708 (WebCore::collectGarbageAfterWindowShellDestruction):
709 (WebCore::ScriptController::~ScriptController):
710 (WebCore::ScriptController::clearWindowShell):
712 Under system memory pressure conditions, schedule a full GC on next
713 runloop iteration instead of just asking for it to happen soon.
714 We do it on next runloop to ensure that there's no pointer to the
715 window object on the stack.
717 2015-02-16 Enrica Casucci <enrica@apple.com>
719 Emoji sequences do not render properly.
720 https://bugs.webkit.org/show_bug.cgi?id=141661
721 rdar://problem/19820463
723 Reviewed by Sam Weinig.
725 Emoji sequences and emoji with variations should be rendered
726 using the Complex code path and should be treated as graphemes.
727 This change modifies advanceByCombiningCharacterSequence to add
730 Test: fast/text/emoji.html
732 * WebCore.xcodeproj/project.pbxproj:
733 * platform/graphics/FontCascade.cpp:
734 (WebCore::FontCascade::characterRangeCodePath):
735 * platform/graphics/mac/ComplexTextController.cpp:
736 (WebCore::advanceByCombiningCharacterSequence): Implements a simple
737 logic to treat emoji sequences and emoji with variations as graphemes.
738 * platform/text/CharacterProperties.h: Added.
739 (WebCore::isEmojiGroupCandidate):
740 (WebCore::isEmojiModifier):
741 (WebCore::isVariationSelector):
742 * rendering/RenderText.cpp:
743 (WebCore::isEmojiGroupCandidate): Deleted.
744 (WebCore::isEmojiModifier): Deleted.
746 2015-02-16 Zalan Bujtas <zalan@apple.com>
748 RenderTableRow should check if it has access to its ancestor chain.
749 https://bugs.webkit.org/show_bug.cgi?id=141668
751 Reviewed by Andreas Kling.
755 * rendering/RenderTableRow.cpp:
756 (WebCore::RenderTableRow::styleDidChange):
757 (WebCore::RenderTableRow::addChild):
758 * rendering/RenderTableRow.h:
760 2015-02-16 Jer Noble <jer.noble@apple.com>
762 [iOS] Build fix: declare undeclared identifier 'credential'.
764 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
765 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):
767 2015-02-16 Jer Noble <jer.noble@apple.com>
769 [iOS] Unable to play .mp4 file over http with basic http authentication
770 https://bugs.webkit.org/show_bug.cgi?id=141503
771 rdar://problem/15799844
773 Reviewed by Alexey Proskuryakov.
775 On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
776 provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
777 object by way of CFURLAuthChallengeRef.
779 Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
780 is to take AuthenticationChallengeClient callbacks and pass them along to a
781 NSURLAuthenticationChallenge sender.
783 Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
784 that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
785 them into that same header.
787 * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
788 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
789 (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
790 (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
791 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
792 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
793 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
794 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
795 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
796 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
797 Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
798 to the HTMLMediaElement.
799 * platform/network/mac/AuthenticationMac.mm:
800 * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
802 2015-02-16 Said Abou-Hallawa <sabouhallawa@apple.com>
804 Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing <https://bugs.webkit.org/show_bug.cgi?id=119626>.
805 https://bugs.webkit.org/show_bug.cgi?id=138439
807 Reviewed by Darin Adler.
809 The change http://trac.webkit.org/changeset/164861 was ported from Blink
810 but it was was revert later because it broke Chrome SVG rendering. It also
811 broke the WebKit SVG text search highlighting.
813 Tests: svg/transforms/svg-geometry-crash.html: This test was added by the
814 blamed change. A new but correct solution is required to fix the assertion.
816 * rendering/svg/SVGRenderSupport.h:
817 * rendering/svg/SVGRenderSupport.cpp:
818 Notice that TransformState.applyTransform() does matrix-left-multiplication,
819 i.e. state = transform * state. But operator*() of AffineTransform and
820 MatrixTransform does right multiply, i.e. this = this * transform.
822 (WebCore::SVGRenderSupport::localToParentTransform): Have the calculation
823 of the SVG localToParentTransform in one shared function.
825 (WebCore::SVGRenderSupport::mapLocalToContainer): Revert the Blink change.
826 If the parent is the SVG root, the transform state should be equal to
827 transform = svg_to_css_mapping * local_to_parent_mapping * transform.
829 (WebCore::SVGRenderSupport::pushMappingToContainer): Get the localToParent
830 transform to be pushed in the geometryMap. If the parent is the SVG root,
831 localToParent = svg_to_css_mapping * local_to_parent_mapping. The original
832 code was doing the opposite and this is the cause of the assertion which
833 was fixed wrongly by reversing the correct multiplication order in
834 SVGRenderSupport::mapLocalToContainer().
836 2015-02-16 Zalan Bujtas <zalan@apple.com>
838 RenderTableCell can't access its parent while in detached state.
839 https://bugs.webkit.org/show_bug.cgi?id=141639
840 rdar://problem/19850760
842 Reviewed by Simon Fraser.
844 Null check against ancestor chain so that certain methods in RenderTableCell can
845 be called even if the renderer is not yet attached.
847 Test: fast/table/table-cell-crash-when-detached-state.html
849 * rendering/RenderTableCell.cpp:
850 (WebCore::RenderTableCell::borderLeft):
851 (WebCore::RenderTableCell::borderRight):
852 (WebCore::RenderTableCell::borderTop):
853 (WebCore::RenderTableCell::borderBottom):
854 (WebCore::RenderTableCell::borderStart):
855 (WebCore::RenderTableCell::borderEnd):
856 (WebCore::RenderTableCell::borderBefore):
857 (WebCore::RenderTableCell::borderAfter):
858 * rendering/RenderTableCell.h:
860 2015-02-16 David Hyatt <hyatt@apple.com>
862 Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
863 https://bugs.webkit.org/show_bug.cgi?id=141651
864 <rdar://problem/19182526>
866 Reviewed by Simon Fraser.
868 * rendering/RootInlineBox.cpp:
869 (WebCore::RootInlineBox::selectionTop):
870 (WebCore::RootInlineBox::selectionBottom):
872 2015-02-16 David Kilzer <ddkilzer@apple.com>
874 SoftLinking.h: Update copyright and license; clean up whitespace
876 * platform/mac/SoftLinking.h:
878 2015-02-12 David Hyatt <hyatt@apple.com>
880 text-underline-position:under has multiple correctness issues
881 https://bugs.webkit.org/show_bug.cgi?id=141528
883 Reviewed by Dean Jackson.
885 Added a bunch of new tests in fast/text
887 * rendering/InlineFlowBox.cpp:
888 (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
889 (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
890 (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
891 * rendering/InlineFlowBox.h:
892 These functions have been re-written to take an enclosing renderer that specified the
893 decoration. This way they can properly limit the bottom/top computation to only line boxes
894 that are contained inside the renderer.
896 * rendering/InlineTextBox.cpp:
897 (WebCore::InlineTextBox::paintDecoration):
898 Tweak the call to get the decoration colors now that quirks mode has been removed.
900 * rendering/RenderElement.cpp:
901 (WebCore::RenderElement::enclosingRendererWithTextDecoration):
902 * rendering/RenderElement.h:
903 New function that finds the enclosing renderer that specified a text decoration. For now
904 this is only used in the "under" position computation, but soon we'll be using it
907 * rendering/RenderObject.cpp:
908 (WebCore::RenderObject::getTextDecorationColors):
909 * rendering/RenderObject.h:
910 Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
912 * rendering/RootInlineBox.cpp:
913 (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
914 * rendering/RootInlineBox.h:
915 Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
916 the InlineFlowBox functions directly.
918 * style/InlineTextBoxStyle.cpp:
919 (WebCore::computeUnderlineOffset):
920 Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
921 computation to limit which line boxes get included.
923 2015-02-16 Brent Fulgham <bfulgham@apple.com>
925 FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
926 https://bugs.webkit.org/show_bug.cgi?id=141596
927 <rdar://problem/19837103>
929 Reviewed by Zalan Bujtas.
931 No new tests. Covered by css3/filters/huge-blur-value.html
933 Avoid overflowing the signed integer values by not converting from unsigned
934 until the maximum size has been clamped to the expected max.
936 * platform/graphics/filters/FEGaussianBlur.cpp:
937 (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
939 2015-02-13 Sergio Villar Senin <svillar@igalia.com>
941 [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
942 https://bugs.webkit.org/show_bug.cgi?id=140763
944 Reviewed by Antti Koivisto.
946 Content sized tracks with non-spanning grid items were not
947 properly sized because the growth limit was sometimes infinity
948 (-1) after calling resolveContentBasedTrackSizingFunctions() when
949 it should not. This patch adds an special initialization phase for
950 non-spanning grid items as the new track sizing algorithm
953 Granted, that was handled in the old algorithm in
954 distributeSpaceToTracks() as a special case. The problem is that
955 it regressed after the optimization added in r173868 because that
956 method is no longer called when the space to distribute is 0.
958 That's why we could fix this by allowing calls to
959 distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
960 it with an explicit initialization our implementation becomes
961 closer to the new algorithm and the initialization is now explicit
962 in the code instead of a side effect of calling
963 distributeSpaceToTracks() with no space to be distributed. It also
964 brings a slight performance improvement as we save sorts and hash
967 I also took the change to add caching to several GridTrackSize
968 methods that were hot on the profiler (each one accounted for ~1%
969 of the total time, now they account for ~0.3% each).
971 Test: fast/css-grid-layout/grid-initialize-span-one-items.html
973 * rendering/RenderGrid.cpp:
974 (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
975 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
976 Exclude non spanning grid items from the calls to
977 resolveContentBasedTrackSizingFunctionsForItems().
978 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
979 New method to resolve track sizes only using non-spanning grid
981 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
982 Ensure that it isn't called for non-spanning grid items.
983 * rendering/RenderGrid.h:
984 * rendering/style/GridTrackSize.h:
985 (WebCore::GridTrackSize::GridTrackSize): Cache return values.
986 (WebCore::GridTrackSize::setLength): Ditto.
987 (WebCore::GridTrackSize::setMinMax): Ditto.
988 (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
989 that caches the return values for hasXXXTrackBreadth() methods.
990 (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
991 the cached return value.
992 (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
993 (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
994 (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
995 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
996 (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
997 (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
999 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
1002 2015-02-16 Milan Crha <mcrha@redhat.com>
1004 [GTK] Loading page into WebView shows g_closure_unref warning
1005 https://bugs.webkit.org/show_bug.cgi?id=127474
1007 Reviewed by Carlos Garcia Campos.
1009 * bindings/gobject/GObjectEventListener.cpp:
1010 (WebCore::GObjectEventListener::gobjectDestroyed):
1012 2015-02-13 Sergio Villar Senin <svillar@igalia.com>
1014 [CSS Grid Layout] Remove the usage of Length(Undefined) in GridLength
1015 https://bugs.webkit.org/show_bug.cgi?id=141562
1017 Reviewed by Chris Dumez.
1019 From Blink r164154 by <timloh@chromium.org>
1021 The patch simplifies some of the logic in creating and applying
1022 GridLength and GridTrackSize values to RenderStyles by using the
1023 constructors for initialisation instead of deferring to setters.
1025 The rationale behind this change is that neither of
1026 createGridTrackSize() nor createGridTrackBreadth() should be able
1027 to fail, so these are changed to return objects directly instead
1028 of taking an out reference (note that in general failing in
1029 applying properties is incorrect and we should catch these in the
1032 The quirk value across to the Lengths was also removed because it
1033 doesn't apply to Grid.
1035 * css/CSSPropertyNames.in:
1036 * css/StyleBuilderConverter.h:
1037 (WebCore::StyleBuilderConverter::createGridTrackBreadth): Return a
1038 GridLength instead of a bool.
1039 (WebCore::StyleBuilderConverter::createGridTrackSize): Return a
1040 GridTrackSize instead of a bool.
1041 (WebCore::StyleBuilderConverter::createGridTrackList): Do not
1042 create temporary GridTrackSizes with undefined Lengths.
1043 (WebCore::StyleBuilderConverter::convertGridTrackSize): Ditto.
1044 * rendering/style/GridLength.h:
1045 (WebCore::GridLength::GridLength): It now requires a mandatory
1047 (WebCore::GridLength::length): Deleted.
1048 (WebCore::GridLength::setFlex): Deleted.
1049 * rendering/style/GridTrackSize.h:
1050 (WebCore::GridTrackSize::GridTrackSize): It now requires a
1051 mandatory GridLength argument.
1052 (WebCore::GridTrackSize::length): Removed no longer valid ASSERTs.
1053 (WebCore::GridTrackSize::minTrackBreadth): Ditto.
1054 (WebCore::GridTrackSize::maxTrackBreadth): Ditto.
1055 (WebCore::GridTrackSize::setLength): Deleted.
1056 (WebCore::GridTrackSize::setMinMax): Deleted.
1057 * rendering/style/RenderStyle.h:
1059 2015-02-13 Grzegorz Czajkowski <g.czajkowski@samsung.com>
1061 Removing text node does not remove its associated markers
1062 https://bugs.webkit.org/show_bug.cgi?id=140999
1064 Reviewed by Ryosuke Niwa.
1066 Removing text node via script does not remove its markers.
1067 For example, running the following script:
1070 var div = document.getElementById("testElement");
1072 document.execCommand("InsertText", false, "welllcome ");
1074 // Give a time async spellchecker to show its markers and
1076 setTimeout(function() { div.removeChild(div.firstChild); }, 100);
1079 will cause that DocumentMarkerController still stores the markers for
1082 The same issue occurs when the text gets cleared, for example,
1084 input.value = ""; // for HTMLTextAreaElement, HTMLInputElement
1086 div.innerHTML = ""; // for content editable
1089 No new tests. Internals marker APIs operate on text node attached
1090 to the element. To test it we could expose document().markers().hasMarkers()
1091 but there is no more useful cases where it could be used.
1092 Another obstacle is that we are in isInShadowTree() so that there is
1093 no possible to register on "DOMSubtreeModified" event.
1094 Test cases attached to the bug:
1095 1. input.value = "" https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704
1096 2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515
1098 Remove markers when text nodes are about to remove.
1100 (WebCore::Document::nodeChildrenWillBeRemoved):
1101 Fixes input.value = ""
1102 (WebCore::Document::nodeWillBeRemoved):
1103 Fixes elem.removeChild(textNode)
1105 2015-02-15 David Kilzer <ddkilzer@apple.com>
1107 REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
1108 <http://webkit.org/b/141607>
1110 This should fix the build, but leaves a FIXME list in
1113 * Configurations/WebCore.unexp: Add weak externals with a FIXME
1114 statement so they can be removed later. It's more important to
1115 fix the build first.
1117 * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to
1118 XCODE_VERSION_MAJOR since the internal bots use version 5.1.1
1119 which still has the error.
1121 2015-02-15 Brian J. Burg <burg@cs.washington.edu>
1123 Web Inspector: remove unused XHR replay code
1124 https://bugs.webkit.org/show_bug.cgi?id=141622
1126 Reviewed by Timothy Hatcher.
1128 XHR Replay functionality became unused with the last frontend rewrite.
1129 Remove instrumentation and data storage classes only used by this feature.
1131 * inspector/InspectorInstrumentation.cpp:
1132 (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
1133 (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted.
1134 (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted.
1135 * inspector/InspectorInstrumentation.h:
1136 (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
1137 (WebCore::InspectorInstrumentation::willLoadXHR): Deleted.
1138 (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted.
1139 * inspector/InspectorResourceAgent.cpp:
1140 (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1141 (WebCore::InspectorResourceAgent::didFinishXHRLoading):
1142 (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
1143 (WebCore::InspectorResourceAgent::willLoadXHR): Deleted.
1144 (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted.
1145 (WebCore::InspectorResourceAgent::replayXHR): Deleted.
1146 * inspector/InspectorResourceAgent.h:
1147 * inspector/NetworkResourcesData.cpp:
1148 (WebCore::NetworkResourcesData::clear):
1149 (WebCore::XHRReplayData::create): Deleted.
1150 (WebCore::XHRReplayData::XHRReplayData): Deleted.
1151 (WebCore::NetworkResourcesData::xhrReplayData): Deleted.
1152 (WebCore::NetworkResourcesData::setXHRReplayData): Deleted.
1153 (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted.
1154 * inspector/NetworkResourcesData.h:
1155 (WebCore::XHRReplayData::method): Deleted.
1156 (WebCore::XHRReplayData::url): Deleted.
1157 (WebCore::XHRReplayData::async): Deleted.
1158 (WebCore::XHRReplayData::formData): Deleted.
1159 (WebCore::XHRReplayData::headers): Deleted.
1160 (WebCore::XHRReplayData::includeCredentials): Deleted.
1161 (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted.
1162 (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted.
1163 * loader/DocumentThreadableLoader.cpp:
1164 (WebCore::DocumentThreadableLoader::loadRequest):
1165 * xml/XMLHttpRequest.cpp:
1166 (WebCore::XMLHttpRequest::createRequest):
1167 (WebCore::XMLHttpRequest::internalAbort):
1168 (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted.
1169 * xml/XMLHttpRequest.h:
1171 2015-02-15 Said Abou-Hallawa <sabouhallawa@apple.com>
1173 Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
1174 https://bugs.webkit.org/show_bug.cgi?id=141550.
1176 Reviewed by David Kilzer.
1178 * svg/properties/SVGMatrixTearOff.h:
1179 (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build.
1180 The ASSERT() here references a parameter which is not used anywhere else. We need
1181 to change it to ASSERT_UNUSED().
1183 2015-02-15 Said Abou-Hallawa <sabouhallawa@apple.com>
1185 Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
1186 https://bugs.webkit.org/show_bug.cgi?id=141550.
1188 Reviewed by Darin Adler.
1190 Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
1191 include a new test case.
1193 * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
1194 pointer. There is no point in having SVGMatrixTearOff points to the parent and
1195 the property of the parent at the same time.
1197 (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
1198 the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
1199 and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
1202 (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
1203 SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
1204 itself but it knows what property to set and get from the parent.
1206 * svg/properties/SVGPropertyTearOff.h:
1207 (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
1209 (WebCore::SVGPropertyTearOff::propertyReference):
1210 (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
1211 like SVGMatrixTearOff can override them.
1213 (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.
1215 2015-02-15 Said Abou-Hallawa <sabouhallawa@apple.com>
1217 Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
1218 https://bugs.webkit.org/show_bug.cgi?id=141552.
1220 Reviewed by Darin Adler.
1222 Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
1223 include a new test case.
1225 * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
1226 before trying to detach the wrapper of the item which going to be replaced.
1228 2015-02-15 David Kilzer <ddkilzer@apple.com>
1230 CoreText only needs to be soft-linked on Windows
1232 More work towards the Maverick Debug build fix:
1234 REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
1235 <http://webkit.org/b/141607>
1237 * page/CaptionUserPreferencesMediaAF.cpp:
1239 2015-02-15 Alexey Proskuryakov <ap@apple.com>
1243 * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
1245 2015-02-14 Alexey Proskuryakov <ap@apple.com>
1247 More internal build fixing.
1249 DDDFACache.h is not an actual private header, so we were using open source
1250 redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h.
1252 * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
1253 (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
1255 2015-02-14 Benjamin Poulain <benjamin@webkit.org>
1257 Add the initial matching implementation for attribute selectors with case-insensitive value
1258 https://bugs.webkit.org/show_bug.cgi?id=141615
1260 Reviewed by Andreas Kling.
1262 Tests: fast/css/case-insensitive-attribute-selector-specificity.html
1263 fast/css/case-insensitive-attribute-selector-styling-html-1.html
1264 fast/css/case-insensitive-attribute-selector-styling-html-2.html
1265 fast/css/case-insensitive-attribute-selector-styling-html-3.html
1266 fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml
1267 fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml
1268 fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml
1269 fast/selectors/case-insensitive-attribute-bascis.html
1270 fast/selectors/case-insensitive-attribute-matching-style-attribute.html
1271 fast/selectors/case-insensitive-attribute-style-update.html
1272 fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html
1274 * css/SelectorChecker.cpp:
1275 (WebCore::SelectorChecker::checkOne):
1276 We already had case-insensitive value matching due to some legacy HTML
1277 behaviors where some attribute values would be matched case-insensitively
1278 depending on the attribute name.
1280 For this patch, I just re-use the same mechanism. I used branches to try
1281 to convey the idea that matching is case sensitive by default unless
1282 the selector has a flag or we are in the weird HTML exception.
1284 * cssjit/SelectorCompiler.cpp:
1285 (WebCore::SelectorCompiler::constructFragmentsInternal):
1286 Disable that case in the CSS JIT for now, I'll implement it later.
1288 2015-02-14 David Kilzer <ddkilzer@apple.com>
1290 Declare soft-linked functions with extern "C" linkage
1292 More work towards the Maverick Debug build fix:
1294 REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
1295 <http://webkit.org/b/141607>
1297 * platform/mac/SoftLinking.h: Try declaring soft-linked
1298 functions with extern "C" linkage to see if they stop appearing
1299 as weak externals. This has the added benefit that if the
1300 function signature changes, we'll get a build failure.
1302 2015-02-14 Joseph Pecoraro <pecoraro@apple.com>
1304 [Mac] RetainPtr member cleanup, possible leaks
1305 https://bugs.webkit.org/show_bug.cgi?id=141616
1307 Reviewed by Andreas Kling.
1309 * platform/mac/PlatformSpeechSynthesizerMac.mm:
1310 (-[WebSpeechSynthesisWrapper speakUtterance:]):
1311 Adopt the allocated object to avoid a possible leak.
1313 * platform/mac/ScrollAnimatorMac.mm:
1314 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1315 Adopt to avoid unnecessary retain/autorelease.
1317 2015-02-14 Joseph Pecoraro <pecoraro@apple.com>
1319 IncompleteMetaDataCue leak seen on leaks bot
1320 https://bugs.webkit.org/show_bug.cgi?id=141611
1322 Reviewed by Eric Carlson.
1324 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
1325 (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted.
1326 (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted.
1327 (WebCore::IncompleteMetaDataCue::cueData): Deleted.
1328 (WebCore::IncompleteMetaDataCue::startTime): Deleted.
1329 Convert to a struct and hold a list of structs instead of pointers.
1331 * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1332 (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
1333 (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
1334 (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
1335 Update use of IncompleteMetaDataCue and modernize related code.
1337 2015-02-09 Brian J. Burg <burg@cs.washington.edu>
1339 Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
1340 https://bugs.webkit.org/show_bug.cgi?id=141372
1342 Reviewed by Joseph Pecoraro.
1345 * inspector/InspectorApplicationCacheAgent.cpp:
1346 (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
1347 (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
1348 * inspector/InspectorApplicationCacheAgent.h:
1349 * inspector/InspectorCSSAgent.cpp:
1350 (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
1351 (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
1352 * inspector/InspectorCSSAgent.h:
1353 * inspector/InspectorController.cpp:
1354 (WebCore::InspectorController::InspectorController):
1355 (WebCore::InspectorController::inspectedPageDestroyed):
1356 (WebCore::InspectorController::connectFrontend):
1357 (WebCore::InspectorController::disconnectFrontend):
1358 (WebCore::InspectorController::show):
1359 (WebCore::InspectorController::close):
1360 (WebCore::InspectorController::dispatchMessageFromFrontend):
1361 * inspector/InspectorController.h:
1362 * inspector/InspectorDOMAgent.cpp:
1363 (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1364 (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
1365 * inspector/InspectorDOMAgent.h:
1366 * inspector/InspectorDOMDebuggerAgent.cpp:
1367 (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
1368 (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
1369 (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
1370 (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
1371 (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
1372 (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
1373 (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1374 (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
1375 * inspector/InspectorDOMDebuggerAgent.h:
1376 * inspector/InspectorDOMStorageAgent.cpp:
1377 (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
1378 (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
1379 * inspector/InspectorDOMStorageAgent.h:
1380 * inspector/InspectorDatabaseAgent.cpp:
1381 (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
1382 (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
1383 * inspector/InspectorDatabaseAgent.h:
1384 * inspector/InspectorDatabaseResource.cpp:
1385 (WebCore::InspectorDatabaseResource::bind):
1386 * inspector/InspectorDatabaseResource.h:
1387 * inspector/InspectorForwarding.h:
1388 * inspector/InspectorIndexedDBAgent.cpp:
1389 (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
1390 (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
1391 * inspector/InspectorIndexedDBAgent.h:
1392 * inspector/InspectorLayerTreeAgent.cpp:
1393 (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
1394 (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
1395 * inspector/InspectorLayerTreeAgent.h:
1396 * inspector/InspectorPageAgent.cpp:
1397 (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
1398 (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
1399 (WebCore::InspectorPageAgent::getScriptExecutionStatus):
1400 * inspector/InspectorPageAgent.h:
1401 * inspector/InspectorReplayAgent.cpp:
1402 (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
1403 (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
1404 * inspector/InspectorReplayAgent.h:
1405 * inspector/InspectorResourceAgent.cpp:
1406 (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
1407 (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
1408 * inspector/InspectorResourceAgent.h:
1409 * inspector/InspectorStyleSheet.cpp:
1410 (WebCore::InspectorStyle::styleWithProperties):
1411 * inspector/InspectorTimelineAgent.cpp:
1412 (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
1413 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1414 * inspector/InspectorTimelineAgent.h:
1415 * inspector/InspectorWorkerAgent.cpp:
1416 (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
1417 (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
1418 (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
1419 * inspector/InspectorWorkerAgent.h:
1420 * inspector/PageRuntimeAgent.cpp:
1421 (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
1422 (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
1423 * inspector/PageRuntimeAgent.h:
1424 * inspector/WorkerInspectorController.cpp:
1425 (WebCore::WorkerInspectorController::~WorkerInspectorController):
1426 (WebCore::WorkerInspectorController::connectFrontend):
1427 (WebCore::WorkerInspectorController::disconnectFrontend):
1428 * inspector/WorkerInspectorController.h:
1429 * inspector/WorkerRuntimeAgent.cpp:
1430 (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
1431 (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
1432 * inspector/WorkerRuntimeAgent.h:
1433 * loader/EmptyClients.h:
1434 * page/PageDebuggable.cpp:
1435 (WebCore::PageDebuggable::connect):
1436 (WebCore::PageDebuggable::disconnect):
1437 * page/PageDebuggable.h:
1438 * testing/Internals.cpp:
1439 (WebCore::Internals::closeDummyInspectorFrontend):
1440 * workers/WorkerMessagingProxy.cpp:
1441 (WebCore::WorkerMessagingProxy::disconnectFromInspector):
1443 2015-02-14 David Kilzer <ddkilzer@apple.com>
1445 REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
1446 <http://webkit.org/b/141607>
1448 Work towards fixing the Mavericks Debug build.
1451 (WebCore::Document::setAnnotatedRegionsDirty):
1453 (WebCore::Event::create):
1455 (WebCore::Node::hasEditableStyle):
1457 (WebCore::Position::Position):
1458 * editing/FrameSelection.h:
1459 (WebCore::DragCaretController::clear):
1460 * loader/ResourceLoader.h:
1461 (WebCore::ResourceLoader::originalRequest):
1462 - Do not mark inline methods for export.
1464 2015-02-14 Alexey Proskuryakov <ap@apple.com>
1466 rel="noreferrer" should make window.opener null
1467 https://bugs.webkit.org/show_bug.cgi?id=141579
1469 Reviewed by Darin Adler.
1471 Tests: http/tests/navigation/target-blank-opener-post.html
1472 http/tests/navigation/target-blank-opener.html
1474 We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
1475 member variable. This works for some clients - ones that invoke delegate callbacks
1476 synchronously - but not in the general case.
1478 So, changed to passing the policy explicitly.
1481 * loader/FrameLoader.cpp:
1482 (WebCore::FrameLoader::FrameLoader):
1483 (WebCore::FrameLoader::urlSelected):
1484 (WebCore::FrameLoader::loadURLIntoChildFrame):
1485 (WebCore::FrameLoader::loadFrameRequest):
1486 (WebCore::FrameLoader::loadURL):
1487 (WebCore::FrameLoader::load):
1488 (WebCore::FrameLoader::loadPostRequest):
1489 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1490 * loader/FrameLoader.h:
1491 (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
1492 * loader/FrameLoaderTypes.h:
1493 * loader/NavigationScheduler.cpp:
1494 * page/ContextMenuController.cpp:
1495 (WebCore::openNewWindow):
1496 (WebCore::ContextMenuController::contextMenuItemSelected):
1498 2015-02-14 David Kilzer <ddkilzer@apple.com>
1500 REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386
1501 <rdar://problem/19838127>
1503 * Configurations/WebCore.unexp: Add missing symbol.
1505 2015-02-13 Chris Dumez <cdumez@apple.com>
1507 RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual
1508 https://bugs.webkit.org/show_bug.cgi?id=141572
1509 <rdar://problem/19759818>
1511 Reviewed by Simon Fraser.
1513 Do not unnecessarily update the marker's style in RenderListItem::styleDidChange()
1514 if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary
1517 This was causing high cpu usage on
1518 http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there
1519 is an animation that changes the style every second (but the diff is equal) and the
1520 RenderListItem keeps resetting its marker's margin, which triggers a layout and the
1521 RenderListMarker re-computes its margin during layout and updates its style again.
1523 With this change, CPU usage on the page goes from 150% to 20%. There is only a style
1524 recalc happening every second, no more relayouts and repaints.
1526 Test: fast/repaint/list-item-equal-style-change-no-repaint.html
1528 * rendering/RenderListItem.cpp:
1529 (WebCore::RenderListItem::styleDidChange):
1531 2015-02-13 Timothy Horton <timothy_horton@apple.com>
1533 Make WebCore::IOSurface have single ownership instead of refcounting
1534 https://bugs.webkit.org/show_bug.cgi?id=141578
1536 Reviewed by Anders Carlsson.
1538 In the interests of making it harder to misuse and to make it more like
1539 ImageBuffer, our IOSurface wrapper should have single ownership.
1541 This will also allow future changes which depend on temporarily
1542 consuming an IOSurface to more easily enforce correct usage.
1545 * platform/graphics/cg/IOSurfacePool.cpp:
1546 (WebCore::IOSurfacePool::takeSurface):
1547 (WebCore::IOSurfacePool::addSurface):
1548 (WebCore::IOSurfacePool::insertSurfaceIntoPool):
1549 (WebCore::IOSurfacePool::tryEvictInUseSurface):
1550 (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
1551 (WebCore::IOSurfacePool::collectInUseSurfaces):
1552 * platform/graphics/cg/IOSurfacePool.h:
1553 * platform/graphics/cocoa/IOSurface.h:
1554 * platform/graphics/cocoa/IOSurface.mm:
1555 (IOSurface::create):
1556 (IOSurface::createFromSendRight):
1557 (IOSurface::createFromSurface):
1558 (IOSurface::createFromImage):
1559 Make IOSurface::create()s return a unique_ptr, and adjust everywhere.
1561 2015-02-12 Enrica Casucci <enrica@apple.com>
1563 Additional emoji group support.
1564 https://bugs.webkit.org/show_bug.cgi?id=141539
1565 rdar://problem/19727527
1567 Reviewed by Sam Weinig.
1569 Adding some new emoji ligatures.
1570 Updated existing test to include the new sequences.
1572 * platform/text/TextBreakIterator.cpp:
1573 (WebCore::cursorMovementIterator):
1574 * rendering/RenderText.cpp:
1575 (WebCore::isEmojiGroupCandidate):
1577 2015-02-13 Alex Christensen <achristensen@webkit.org>
1579 Really stop using export files.
1580 https://bugs.webkit.org/show_bug.cgi?id=141521
1582 Reviewed by Mark Rowe.
1584 * Configurations/WebCore.xcconfig:
1585 Don't use exported symbols files.
1586 * Configurations/WebCore.unexp:
1587 Added list of symbols not to export (needed by Xcode 5.0.2).
1589 2015-02-13 Zalan Bujtas <zalan@apple.com>
1591 Simplify ASSERT in lastRubyRun().
1592 https://bugs.webkit.org/show_bug.cgi?id=141574
1594 Reviewed by Daniel Bates.
1596 r180064 made some of the conditions in the ASSERT redundant.
1598 Covered by existing tests.
1600 * rendering/RenderRuby.cpp:
1601 (WebCore::lastRubyRun):
1603 2015-02-13 Brent Fulgham <bfulgham@apple.com>
1605 [Mac, iOS] Adjust pagination behavior for Mail.app printing use
1606 https://bugs.webkit.org/show_bug.cgi?id=141569
1607 <rdar://problem/14912763>
1609 Reviewed by Anders Carlsson.
1611 * page/Settings.in: Add new pagination setting flag.
1612 * rendering/RenderBlockFlow.cpp:
1613 (WebCore::messageContainerName): Added.
1614 (WebCore::needsPaginationQuirk): Added.
1615 (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content
1616 div to a new page when using this special printing mode.
1618 2015-02-13 Daniel Bates <dabates@apple.com>
1620 [iOS] DumpRenderTree.app fails to link due to undefined classes
1621 <rdar://problem/19831228>
1623 Following r179945, DumpRenderTree.app fails to link due to undefined symbols:
1625 Undefined symbols for architecture x86_64:
1626 "_OBJC_CLASS_$_WebEvent", referenced from:
1627 objc-class-ref in libDumpRenderTree.a(EventSendingController.o)
1628 "_OBJC_CLASS_$_WebUndefined", referenced from:
1629 objc-class-ref in libDumpRenderTree.a(ObjCController.o)
1631 We need to export the classes WebScriptObject and WebEvent.
1633 * bindings/objc/WebScriptObject.h:
1634 * platform/ios/WebEvent.h:
1636 2015-02-13 Andreas Kling <akling@apple.com>
1638 CachedResource::clearLoader() should self-destruct if nothing else retains the CachedResource.
1639 <https://webkit.org/b/141568>
1640 <rdar://problem/19800310>
1642 Reviewed by Antti Koivisto.
1644 Anything that may cause CachedResource::canDelete() to return true must also make sure
1645 to call CachedResource::deleteIfPossible(), or we risk leaking the CachedResource.
1646 This is because CachedResource employs an extremely convoluted lifetime mechanism that
1647 depends on its presence in a number of collections, as well as internal counters and
1650 This is a speculative fix for a potential CachedResource leak that I'm not sure exists
1651 in practice, but let's be good citizens here.
1653 * loader/cache/CachedResource.cpp:
1654 (WebCore::CachedResource::clearLoader):
1656 2015-02-13 Jer Noble <jer.noble@apple.com>
1658 [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357
1659 https://bugs.webkit.org/show_bug.cgi?id=141566
1660 rdar://problem/19826075
1662 Reviewed by Andreas Kling.
1664 Null check m_mediaSource before dereferencing.
1666 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1667 (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1669 2015-02-13 Zalan Bujtas <zalan@apple.com>
1671 REGRESSION (r174761): Invalid cast in WebCore::lastRubyRun / WebCore::RenderRubyAsBlock::addChild
1672 https://bugs.webkit.org/show_bug.cgi?id=137929
1673 rdar://problem/18723492
1675 Reviewed by Chris Dumez.
1677 Ensure that the child renderer is a RenderRubyRun.
1679 Test: fast/ruby/crash-with-before-after-on-ruby.html
1681 * rendering/RenderRuby.cpp:
1682 (WebCore::lastRubyRun):
1684 2015-02-13 Simon Fraser <simon.fraser@apple.com>
1686 Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn()
1687 https://bugs.webkit.org/show_bug.cgi?id=141551
1689 Reviewed by Zalan Bujtas.
1691 It's possible for a layout to dirty the parent frame's state, via the calls to
1692 ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when
1693 iframes toggle their compositing mode.
1695 That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to
1696 leave all the frames in a clean state. Later on, we could enter hit testing,
1697 which calls document().updateLayout() on each frame's document. Document::updateLayout()
1698 does layout on all ancestor documents, so in the middle of hit testing, we could
1699 layout a subframe (dirtying an ancestor frame), then layout another frame, which
1700 would forcing that ancestor to be laid out while we're hit testing it, thus
1701 corrupting the RenderLayer tree while it's being iterated over.
1703 Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second
1704 layout after laying out subframes, which most of the time will be a no-op.
1706 Also add a stronger assertion, that this frame and all subframes are clean
1707 at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the
1710 Various existing frames tests hit the new assertion if the code change is removed,
1711 so this is covered by existing tests.
1713 * page/FrameView.cpp:
1714 (WebCore::FrameView::needsStyleRecalcOrLayout):
1715 (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
1717 * rendering/RenderWidget.cpp:
1718 (WebCore::RenderWidget::willBeDestroyed):
1720 2015-02-12 Simon Fraser <simon.fraser@apple.com>
1722 determinePrimarySnapshottedPlugIn() should only traverse visible Frames
1723 https://bugs.webkit.org/show_bug.cgi?id=141547
1724 Part of rdar://problem/18445733.
1726 Reviewed by Anders Carlsson.
1728 There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive()
1729 updates layout in all frames, but it uses the widget tree, so only hits frames
1730 that are parented via renderers (i.e. not display:none frames or their descendants).
1732 Moving towards a future where we remove Widgets, fix by adding a FrameTree
1733 traversal function that only finds rendered frames (those with an ownerRenderer).
1737 * page/FrameTree.cpp:
1738 (WebCore::FrameTree::firstRenderedChild):
1739 (WebCore::FrameTree::nextRenderedSibling):
1740 (WebCore::FrameTree::traverseNextRendered):
1743 * page/FrameView.cpp:
1744 (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
1746 2015-02-13 Alexey Proskuryakov <ap@apple.com>
1748 TimerBase::m_heapInsertionOrder calculation is racy
1749 https://bugs.webkit.org/show_bug.cgi?id=141554
1751 Reviewed by Anders Carlsson.
1753 Use an atomic increment.
1755 * platform/Timer.cpp: (WebCore::TimerBase::setNextFireTime):
1757 2015-02-13 Andreas Kling <akling@apple.com>
1759 [iOS] Refine GC behavior in response to process suspension and memory pressure.
1760 <https://webkit.org/b/141543>
1761 <rdar://problem/19738024>
1763 Reviewed by Geoffrey Garen.
1765 Do an immediate full garbage collection when the web process is about to
1766 be suspended (when another tab is moving to the foreground on iOS.)
1767 This ensures that we make a best effort to reduce the process footprint
1768 before we lose the ability to execute code.
1770 When receiving a memory pressure warning, tell the garbage collector to
1771 accelerate its next collection (by calling garbageCollectSoon().)
1772 This gives us some confidence that a collection will happen within a
1773 reasonable timeframe, but doesn't risk dooming us to a loop of endless
1774 garbage collections.
1776 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1777 (WebCore::MemoryPressureHandler::platformReleaseMemory):
1779 2015-02-13 Antti Koivisto <antti@apple.com>
1781 Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages
1782 https://bugs.webkit.org/show_bug.cgi?id=141561
1784 Reviewed by Simon Fraser.
1786 One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering
1787 style resolver. Try to catch these in release builds.
1789 * css/StyleResolver.cpp:
1790 (WebCore::StyleResolver::~StyleResolver):
1791 (WebCore::StyleResolver::styleForElement):
1792 (WebCore::StyleResolver::styleForKeyframe):
1793 (WebCore::StyleResolver::styleForPage):
1794 (WebCore::StyleResolver::loadPendingImages):
1795 * css/StyleResolver.h:
1797 2015-02-13 ChangSeok Oh <changseok.oh@collabora.com>
1799 Div having contentEditable and display:grid cannot be edited if it is empty.
1800 https://bugs.webkit.org/show_bug.cgi?id=141465
1802 Reviewed by Ryosuke Niwa.
1804 This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate
1805 for visible position as like RenderFlexibleBox. The only different situation between them is
1806 that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have
1807 a minimum height of a single line if it is editable as well as RenderFlexibleBox does.
1809 Test: fast/events/key-events-in-editable-gridbox.html
1812 (WebCore::Position::isCandidate):
1813 (WebCore::Position::isRenderedCharacter):
1814 * rendering/RenderGrid.cpp:
1815 (WebCore::RenderGrid::layoutGridItems):
1817 2015-02-12 Zalan Bujtas <zalan@apple.com>
1819 REGRESSION (r176262): Invalid cast in WebCore`WebCore::RootInlineBox::selectionTop
1820 https://bugs.webkit.org/show_bug.cgi?id=138992
1822 Reviewed by Dave Hyatt.
1824 RenderRubyText requires the ancestor chain to be (RenderRubyAsInline | RenderRubyAsBlock) -> RenderRubyRun -> RenderRubyText.
1825 This patch ensures that we create RenderRubyText for an <rt> element only when
1826 the expected ancestor chain is guaranteed.
1828 Test: fast/ruby/crash-when-ruby-is-set-to-inline-block.html
1830 * rendering/RenderElement.cpp:
1831 (WebCore::RenderElement::createFor): treat inline-block <ruby> as block.
1832 * rendering/RenderObject.h:
1833 (WebCore::RenderObject::isRubyInline):
1834 (WebCore::RenderObject::isRubyBlock):
1835 (WebCore::RenderObject::isRuby): Deleted.
1836 * rendering/RenderRuby.cpp:
1837 (WebCore::isAnonymousRubyInlineBlock):
1838 * rendering/RenderRuby.h: add support for is<RenderRubyAsBlock>(renderer) and for is<RenderRubyAsInline>(renderer)
1839 The isRuby() method does not follow the is*() -> maps to one class pattern.
1841 * rendering/RenderRubyRun.cpp:
1842 (WebCore::RenderRubyRun::addChild):
1843 (WebCore::RenderRubyRun::staticCreateRubyRun):
1845 2015-02-13 Csaba Osztrogonac <ossy@webkit.org>
1847 Fix the gperf related build issue on the WinCairo bot
1848 https://bugs.webkit.org/show_bug.cgi?id=141507
1850 Reviewed by Alex Christensen.
1852 * platform/ColorData.gperf: Modified property svn:eol-style.
1854 2015-02-13 Csaba Osztrogonác <ossy@webkit.org>
1856 Unreviewed, remove empty directories.
1858 * loader/icon/wince: Removed.
1859 * platform/graphics/wince: Removed.
1860 * storage/wince: Removed.
1862 2015-02-12 Timothy Horton <timothy_horton@apple.com>
1864 Crashes under detectItemAroundHitTestResult when DataDetectors is not available
1865 https://bugs.webkit.org/show_bug.cgi?id=141549
1866 <rdar://problem/19180955>
1868 Reviewed by Dan Bernstein.
1870 * editing/mac/DataDetection.mm:
1871 (WebCore::DataDetection::detectItemAroundHitTestResult):
1872 Bail out from data detection if either of the relevant frameworks aren't loaded.
1874 2015-02-12 Dean Jackson <dino@apple.com>
1876 [iOS Media] Audio should hide timeline scrubber until playback starts
1877 https://bugs.webkit.org/show_bug.cgi?id=141542
1878 <rdar://problem/19820685>
1880 Reviewed by Eric Carlson.
1882 We regressed from the system behaviour in iOS 7, where the timeline
1883 scrubber for an audio element is not shown until the user starts
1886 * Modules/mediacontrols/mediaControlsiOS.css:
1887 (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
1888 (audio::-webkit-media-controls-status-display): Add the style for the status display.
1889 * Modules/mediacontrols/mediaControlsiOS.js:
1890 (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
1891 (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
1892 (ControllerIOS.prototype.setPlaying): Unhide the timeline.
1894 2015-02-12 Chris Dumez <cdumez@apple.com>
1896 Drop the quirks-mode exception for CSS MIME types
1897 https://bugs.webkit.org/show_bug.cgi?id=141501
1899 Reviewed by Alexey Proskuryakov.
1901 Drop the quirks-mode exception for CSS MIME types.
1902 This matches Firefox's behavior.
1904 This patch is based on the following Blink revision:
1905 http://src.chromium.org/viewvc/blink?view=revision&revision=189669
1908 - http/tests/misc/css-accept-any-type.html
1909 - http/tests/security/cross-origin-css.html
1911 * css/StyleSheetContents.cpp:
1912 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1913 * dom/ProcessingInstruction.cpp:
1914 (WebCore::ProcessingInstruction::setCSSStyleSheet):
1915 * inspector/InspectorPageAgent.cpp:
1916 (WebCore::InspectorPageAgent::cachedResourceContent):
1917 * loader/cache/CachedCSSStyleSheet.cpp:
1918 (WebCore::CachedCSSStyleSheet::sheetText):
1919 (WebCore::CachedCSSStyleSheet::canUseSheet):
1920 * loader/cache/CachedCSSStyleSheet.h:
1922 2015-02-12 Beth Dakin <bdakin@apple.com>
1924 REGRESSION: Should not send wheel events with a delta of 0
1925 https://bugs.webkit.org/show_bug.cgi?id=141537
1927 rdar://problem/18903118
1929 Reviewed by Simon Fraser.
1931 This code should not have been removed entirely to accommodate rubber-banding, it
1932 just needs to return false instead of true in order to allow the MayBegin and
1933 Ended phases to be handled by the ElasticityController.
1935 (WebCore::Element::dispatchWheelEvent):
1937 2015-02-12 Dean Jackson <dino@apple.com>
1939 [iOS Media] Implement 3-style media timeline (buffered, played, unavailable)
1940 https://bugs.webkit.org/show_bug.cgi?id=141526
1941 <rdar://problem/19603337>
1943 Reviewed by Eric Carlson and Antoine Quint.
1945 Implement a 3-style media scrubber for iOS. This draws white for
1946 the region that has been played (before the playhead), black
1947 for the region that is buffered, and is hollow for the rest.
1949 * Modules/mediacontrols/mediaControlsApple.js:
1950 (Controller.prototype.updateProgress): Update progress is now completely
1951 shared between OS X and iOS. This calls the implementation specific
1952 drawTimelineBackground.
1953 (Controller.prototype.drawTimelineBackground): Move the OS X code to here.
1954 * Modules/mediacontrols/mediaControlsiOS.css:
1955 (audio::-webkit-media-controls-timeline): New styles for the timeline. Updated thumb image, etc.
1956 (video::-webkit-media-controls-timeline::-webkit-slider-runnable-track):
1957 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1958 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active):
1959 (video::-webkit-media-controls-time-remaining-display):
1960 * Modules/mediacontrols/mediaControlsiOS.js:
1961 (ControllerIOS): Create a globally unique canvas context name in the constructor.
1962 (ControllerIOS.prototype.createControls): Set the background of the timeline to a canvas.
1963 (ControllerIOS.prototype.addRoundedRect): Helper function.
1964 (ControllerIOS.prototype.drawTimelineBackground): Draw the 3-style content.
1965 (ControllerIOS.prototype.updateProgress): Deleted.
1967 2015-02-12 Daniel Bates <dabates@apple.com>
1969 Fix some Mac linker warnings
1970 https://bugs.webkit.org/show_bug.cgi?id=141522
1972 Reviewed by Alex Christensen.
1974 Following <https://trac.webkit.org/changeset/179945>, the linker warns about the following hidden WebCore symbols:
1976 ld: warning: cannot export hidden symbol __ZN7WebCore20LogNotYetImplementedE from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/Logging.o
1977 ld: warning: cannot export hidden symbol _wkCreateURLPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
1978 ld: warning: cannot export hidden symbol _wkCreateURLNPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
1980 * WebCore.exp.in: Remove symbols for functions wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
1981 * platform/Logging.h: Export WTFLogChannel for LogNotYetImplemented, which is referenced from
1982 notImplementedLoggingChannel() in file NotImplemented.cpp. We make use of the associated
1983 header, NotImplemented.h, in both WebKit and WebKit2.
1984 * platform/mac/WebCoreSystemInterface.mm: Remove declarations for functions
1985 wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName that
1986 were inadvertently not removed in r25494.
1988 2015-02-12 Joseph Pecoraro <pecoraro@apple.com>
1990 Web Inspector: Crash inspecting styles of element with mutated stylesheet
1991 https://bugs.webkit.org/show_bug.cgi?id=141451
1993 Reviewed by Timothy Hatcher.
1995 Test: inspector/css/stylesheet-with-mutations.html
1997 * css/CSSStyleSheet.h:
1998 * css/CSSStyleSheet.cpp:
1999 (WebCore::CSSStyleSheet::CSSStyleSheet):
2000 (WebCore::CSSStyleSheet::didMutateRules):
2001 Keep a flag on the CSSStyleSheet to know when it has had a rule
2002 mutation from the contents.
2004 * inspector/InspectorStyleSheet.h:
2005 * inspector/InspectorStyleSheet.cpp:
2006 (WebCore::InspectorStyleSheet::reparseStyleSheet):
2007 When completely replacing the stylesheet's contents, we will have
2008 destroyed any previous rules, so clear the has mutations flag.
2010 (WebCore::selectorsFromSource):
2011 Previously there was a mismatch between the rules the parsed
2012 SourceData had, and the actual CSSSelectors we were iterating.
2013 We use the SourceData so we can get the exact user authored
2014 text instead of generated longhands from actualy selector objects.
2015 Add an ASSERT and bail to catch and more gracefully handle
2016 any possible mismatches in the future.
2018 (WebCore::InspectorStyleSheet::styleSheetMutated):
2019 (WebCore::InspectorStyleSheet::ensureParsedDataReady):
2020 When a CSSStyleSheet has been mutated beyond the inspector's
2021 knowledge right now, fall back to readonly generated selectors.
2022 We should better handle this in the future:
2023 <https://webkit.org/b/141450> Web Inspector: Better support for CSSOM StyleSheet mutations (insertRule/deleteRule)
2025 2015-02-12 Commit Queue <commit-queue@webkit.org>
2027 Unreviewed, rolling out r179987.
2028 https://bugs.webkit.org/show_bug.cgi?id=141525
2030 caused debug tests to fail (Requested by alexchristensen on
2035 "[CSS Grid Layout] Invalid initialization of track sizes with
2036 non spanning grid items"
2037 https://bugs.webkit.org/show_bug.cgi?id=140763
2038 http://trac.webkit.org/changeset/179987
2040 2015-02-12 Brian J. Burg <burg@cs.washington.edu>
2042 REGRESSION(r178060): empty arguments are passed when logging to system console
2043 https://bugs.webkit.org/show_bug.cgi?id=141511
2045 Reviewed by Timothy Hatcher.
2047 * page/PageConsoleClient.cpp:
2048 (WebCore::PageConsoleClient::messageWithTypeAndLevel): Change premature move to copyRef.
2050 2015-02-12 Alex Christensen <achristensen@webkit.org>
2052 [Win] Unreviewed debug build fix after r179980.
2054 * svg/SVGSVGElement.cpp:
2055 (WebCore::SVGSVGElement::currentViewportSize):
2056 Explicitly call constructor.
2058 2015-01-23 Sergio Villar Senin <svillar@igalia.com>
2060 [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
2061 https://bugs.webkit.org/show_bug.cgi?id=140763
2063 Reviewed by Antti Koivisto.
2065 Content sized tracks with non-spanning grid items were not
2066 properly sized because the growth limit was sometimes infinity
2067 (-1) after calling resolveContentBasedTrackSizingFunctions() when
2068 it should not. This patch adds an special initialization phase for
2069 non-spanning grid items as the new track sizing algorithm
2072 Granted, that was handled in the old algorithm in
2073 distributeSpaceToTracks() as a special case. The problem is that
2074 it regressed after the optimization added in r173868 because that
2075 method is no longer called when the space to distribute is 0.
2077 That's why we could fix this by allowing calls to
2078 distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
2079 it with an explicit initialization our implementation becomes
2080 closer to the new algorithm and the initialization is now explicit
2081 in the code instead of a side effect of calling
2082 distributeSpaceToTracks() with no space to be distributed. It also
2083 brings a slight performance improvement as we save sorts and hash
2086 I also took the change to add caching to several GridTrackSize
2087 methods that were hot on the profiler (each one accounted for ~1%
2088 of the total time, now they account for ~0.3% each).
2090 Test: fast/css-grid-layout/grid-initialize-span-one-items.html
2092 * rendering/RenderGrid.cpp:
2093 (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
2094 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2095 Exclude non spanning grid items from the calls to
2096 resolveContentBasedTrackSizingFunctionsForItems().
2097 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
2098 New method to resolve track sizes only using non-spanning grid
2100 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2101 Ensure that it isn't called for non-spanning grid items.
2102 * rendering/RenderGrid.h:
2103 * rendering/style/GridTrackSize.h:
2104 (WebCore::GridTrackSize::GridTrackSize): Cache return values.
2105 (WebCore::GridTrackSize::setLength): Ditto.
2106 (WebCore::GridTrackSize::setMinMax): Ditto.
2107 (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
2108 that caches the return values for hasXXXTrackBreadth() methods.
2109 (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
2110 the cached return value.
2111 (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
2112 (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
2113 (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
2114 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
2115 (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
2116 (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
2118 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2121 2015-02-12 Zan Dobersek <zdobersek@igalia.com>
2123 Remove the USE(ACCELERATED_COMPOSITING) guard from the
2124 MediaPlayerPrivateGStreamerBase destructor.
2126 The guard was removed in r163079. It was still defined through CMake
2127 for the EFL and GTK ports when the guarded code was introduced in
2128 r172828. In r171741 the macro was finally removed for the GTK and EFL
2129 ports as well, but the guards for the affected code weren't updated
2130 so TextureMapperPlatformLayer::Client::platformLayerWillBeDestroyed()
2131 wasn't being called anymore.
2133 Rubber-stamped by Philippe Normand.
2135 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2136 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2138 2015-02-11 Darin Adler <darin@apple.com>
2140 Streamline and simplify SVGSVGElement and related classes
2141 https://bugs.webkit.org/show_bug.cgi?id=141463
2143 Reviewed by Antti Koivisto.
2145 * dom/Document.cpp: Removed unneeded include of SVGSVGElement.h.
2146 * loader/FrameLoader.cpp: Ditto.
2147 * rendering/RenderBoxModelObject.cpp: Ditto.
2148 * rendering/svg/RenderSVGForeignObject.cpp: Ditto.
2149 * svg/SVGImageElement.cpp: Ditto.
2150 * svg/SVGMarkerElement.cpp: Ditto.
2151 * svg/SVGPathElement.cpp: Ditto.
2152 * svg/SVGPatternElement.cpp: Ditto.
2153 * svg/SVGTransform.cpp: Ditto.
2155 * page/FrameView.cpp:
2156 (WebCore::FrameView::scrollToAnchor): Updated to call the SVGSVGElement function
2157 named scrollToAnchor (was setupInitialView). Also refactored to avoid repeating
2158 the expression frame().document() so often.
2160 * platform/graphics/FloatSize.h: Added operator/.
2162 * svg/SVGDocument.cpp:
2163 (WebCore::SVGDocument::rootElement): Rearranged to use early return.
2164 (WebCore::SVGDocument::zoomAndPanEnabled): Ditto.
2165 (WebCore::SVGDocument::startPan): Ditto. Also used FloatPoint math instead
2166 of breaking things apart into x and y.
2167 (WebCore::SVGDocument::updatePan): Ditto.
2169 * svg/SVGDocument.h: Removed some unneeded includes and forward declarations.
2170 Moved function bodies out of the class to make it more readable. Renamed
2171 m_translate to m_panningOffset and made it a FloatSize instead of FloatPoint.
2173 * svg/SVGDocumentExtensions.cpp:
2174 (WebCore::SVGDocumentExtensions::startAnimations): Use a modern for loop
2175 and update since timeContainer() now returns a reference.
2177 * svg/SVGSVGElement.cpp: Removed many unneeded includes.
2178 (WebCore::SVGSVGElement::SVGSVGElement): Moved initialization of scalars to
2179 the class definition. Updated since m_timerContainer is a Ref (later should
2180 change it to be a std::unique_ptr or just directly contained in SVGSVGElement).
2181 (WebCore::SVGSVGElement::~SVGSVGElement): Removed comment that doesn't say much,
2182 but is worded in a confusing way.
2183 (WebCore::SVGSVGElement::contentScriptType): Use NeverDestroyed instead of
2184 DEPRECATED_DEFINE_STATIC_LOCAL.
2185 (WebCore::SVGSVGElement::contentStyleType): Ditto.
2186 (WebCore::SVGSVGElement::viewport): Streamlined a bit.
2187 (WebCore::SVGSVGElement::pixelUnitToMillimeterX): Ditto.
2188 (WebCore::SVGSVGElement::pixelUnitToMillimeterY): Ditto.
2189 (WebCore::SVGSVGElement::currentView): Changed to return a reference.
2190 (WebCore::SVGSVGElement::frameForCurrentScale): Added. Helper for the two
2192 (WebCore::SVGSVGElement::currentScale): Updated to use frameForCurrentScale.
2193 (WebCore::SVGSVGElement::setCurrentScale): Ditto.
2194 (WebCore::SVGSVGElement::setCurrentTranslate): Optimized the case where there
2195 is no change to the translation. Also changed the data member's name to
2196 m_currentTranslate to more directly match the DOM API naming.
2197 (WebCore::SVGSVGElement::parseAttribute): Simplified the parsing a bit, and
2198 changed to pass a reference to SVGZoomAndPan::parseAttribute.
2199 (WebCore::SVGSVGElement::svgAttributeChanged): Tweaked formatting and removed
2200 code that converts the renderer pointer to a RenderObject* unnecessarily.
2201 (WebCore::SVGSVGElement::suspendRedraw): Removed FIXME about implementing this,
2202 since we don't really plan to do that.
2203 (WebCore::SVGSVGElement::unsuspendRedraw): Ditto.
2204 (WebCore::SVGSVGElement::unsuspendRedrawAll): Ditto.
2205 (WebCore::SVGSVGElement::forceRedraw): Ditto.
2206 (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): Changed return
2207 type to Ref, and pass in a function instead of an enumeration value.
2208 (WebCore::SVGSVGElement::getIntersectionList): Updated for above.
2209 (WebCore::SVGSVGElement::getEnclosureList): Ditto.
2210 (WebCore::SVGSVGElement::checkIntersection): Use && instead of early return
2212 (WebCore::SVGSVGElement::checkEnclosure): Ditto.
2213 (WebCore::SVGSVGElement::createSVGLength): Use initialization list syntax
2214 for greater brevity.
2215 (WebCore::SVGSVGElement::createSVGAngle): Ditto.
2216 (WebCore::SVGSVGElement::createSVGPoint): Ditto.
2217 (WebCore::SVGSVGElement::createSVGMatrix): Ditto.
2218 (WebCore::SVGSVGElement::createSVGRect): Ditto.
2219 (WebCore::SVGSVGElement::createSVGTransform): Removed unneeded explicit
2220 constructor invocation.
2221 (WebCore::SVGSVGElement::createSVGTransformFromMatrix): Removed unneeded cast.
2222 (WebCore::SVGSVGElement::insertedInto): Updated since timeContainer() now
2223 returns a reference.
2224 (WebCore::SVGSVGElement::setCurrentTime): Use isfinite instead of isnan, so
2225 we won't store infinity as the current time.
2226 (WebCore::SVGSVGElement::currentViewBoxRect): Renamed locals and changed
2227 to use initializer lists for brevity.
2228 (WebCore::SVGSVGElement::currentViewportSize): Streamlined code by using
2229 initializer lists, using local variables only for things used more than once,
2230 and using the / operator defined above.
2231 (WebCore::SVGSVGElement::viewBoxToViewTransform): Use the concatenate function
2232 in a way that is more straightforward, rather than doing it with a temporary.
2233 (WebCore::SVGSVGElement::scrollToAnchor): Renamed this from
2235 (WebCore::SVGSVGElement::inheritViewAttributes): Changed this to work with
2236 references rather than pointers.
2237 (WebCore::SVGSVGElement::getElementById): Use getAllElementsById as the
2238 FIXME comment suggested for better efficiency when there are a lot of descendants
2239 of the <svg> element at the cost of making it less efficient if there are
2240 a lot of elements all with the desired ID, but not inside the <svg> element.
2241 (WebCore::SVGSVGElement::isValid): Moved here from the header.
2243 * svg/SVGSVGElement.h: Removed unneeded forward declarations. Moved the
2244 animated properties to the top of the file, then other DOM, the other
2245 public members. Changed return types to references and Ref. Moved
2246 function bodies out of the class definition. Made createSVGNumber inline.
2248 * svg/SVGViewElement.cpp: Removed unneeded includes.
2249 (WebCore::SVGViewElement::isSupportedAttribute): Deleted.
2250 (WebCore::SVGViewElement::parseAttribute): Changed to not rely on
2251 isSupportedAttribute. Eventually I will do this in all the SVG classes.
2253 * svg/SVGViewSpec.cpp: Removed unneeded include of SVGSVGElement.h.
2254 (WebCore::SVGViewSpec::parseViewSpec): Updated for change in the name
2255 of the parse function in the SVGZoomAndPan class.
2257 * svg/SVGZoomAndPan.cpp:
2258 (WebCore::SVGZoomAndPan::isKnownAttribute): Deleted.
2259 (WebCore::SVGZoomAndPan::addSupportedAttributes): Deleted.
2260 (WebCore::SVGZoomAndPan::parse): Renamed from parseZoomAndPan since
2261 this is a member of the SVGZoomAndPan class and also has an argument
2262 of SVGZoomAndPanType.
2263 (WebCore::SVGZoomAndPan::parseAttributeValue): Added. Helper so the
2264 template function is not so big. Also write it in a simpler way.
2265 (WebCore::SVGZoomAndPan::ref): Deleted.
2266 (WebCore::SVGZoomAndPan::deref): Deleted.
2267 (WebCore::SVGZoomAndPan::setZoomAndPan): Deleted.
2269 * svg/SVGZoomAndPan.h: Removed unneeded includes. Reformatted the enum.
2270 Moved function bodies out of the class definition. Removed many unneeded
2273 * svg/animation/SVGSMILElement.cpp:
2274 (WebCore::SVGSMILElement::insertedInto): Updated since timeContainer
2275 now returns a reference rather than a pointer.
2277 2015-02-11 Darin Adler <darin@apple.com>
2279 SVGUseElement follow-up improvements
2280 https://bugs.webkit.org/show_bug.cgi?id=141382
2282 Reviewed by Antti Koivisto.
2284 * loader/cache/CachedSVGDocumentClient.h: Removed unneeded forward declaration.
2286 * page/EventHandler.cpp: Removed unneeded include of SVGUseElement.h.
2287 * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
2289 * svg/SVGDocumentExtensions.cpp:
2290 (WebCore::SVGDocumentExtensions::clearTargetDependencies): Removed too-specific
2291 check that assumed that SVG elements in shadow trees are always for <use> elements.
2292 This amounted to an unneeded optimization that could be removed with no bad effect.
2294 * svg/SVGElement.cpp:
2295 (WebCore::SVGElement::correspondingElement): Removed the assertions so this could
2296 be used more freely outside of cases where the shadow tree state is fully consistent.
2297 It's fine to have this just be a mechanical getter; there's nothing super-tricky
2298 here that needs to be caught by the assertion.
2299 (WebCore::SVGElement::title): Removed unneeded special handling for titles inside
2302 * svg/SVGGElement.cpp:
2303 (WebCore::SVGGElement::create): Added an overload that doesn't require explicitly
2304 passing in the tag name.
2305 * svg/SVGGElement.h: Ditto.
2306 * svg/SVGSVGElement.cpp:
2307 (WebCore::SVGSVGElement::create): Ditto.
2308 * svg/SVGSVGElement.h: Ditto.
2310 * svg/SVGUseElement.cpp: Removed a lot of unneeded includes.
2311 (WebCore::SVGUseElement::SVGUseElement): Removed code to initialize some booleans.
2312 We do that in the class definition now.
2313 (WebCore::SVGUseElement::create): Removed the code that calls the
2314 ensureUserAgentShadowRoot function unconditionally. That's properly done when
2315 needed; no need to do it here.
2316 (WebCore::SVGUseElement::~SVGUseElement): Removed unneeded code to destroy the
2317 shadow tree (that happens automatically) and simplified the code to stop loading
2318 the external document.
2319 (WebCore::SVGUseElement::isSupportedAttribute): Deleted.
2320 (WebCore::SVGUseElement::parseAttribute): Simplified this. Removed assumptions
2321 about the intersection of various sets of attributes, and also removed the
2322 isSupportedAttribute function. This seems to serve no purpose here, or in any
2323 other SVG element class. I plan to remove it everywhere over time.
2324 (WebCore::isWellFormedDocument): Deleted.
2325 (WebCore::SVGUseElement::insertedInto): Simplified code by removing all the
2326 special cases during initial parsing, and did the invalidation here rather than
2327 deferring it to didNotifySubtreeInsertions. Added a call to the new function,
2328 updateExternalDocument, since that won't do anything when the element is not
2330 (WebCore::SVGUseElement::didNotifySubtreeInsertions): Deleted.
2331 (WebCore::SVGUseElement::removedFrom): Added code to call clearShadowTree and
2332 updateExternalDocument. Both are efficient when doing nothing, and both are
2333 appropriate since the element is no longer in a document.
2334 (WebCore::SVGUseElement::referencedDocument): Deleted. No longer needed.
2335 (WebCore::SVGUseElement::externalDocument): Streamlined the logic here, removing
2336 multiple unneeded checks.
2337 (WebCore::SVGUseElement::transferSizeAttributesToTargetClone): Renamed since
2338 "target clone" is clear enough within this class, without explicitly stating
2339 "shadow tree". All the clones are in the shadow tree.
2340 (WebCore::SVGUseElement::svgAttributeChanged): Removed unneeded code calling
2341 isSupportedAttribute. Changed the code that detects changes in href to just
2342 call updateExternalDocument (for the document URL) and invalidateShadowTree
2343 (for the fragment). Also updated the transferSizeAttributesToTargetClone logic
2344 to only trigger on width and height and updated names.
2345 (WebCore::SVGUseElement::willAttachRenderers): Updated for the new name of
2346 m_shouldRebuildShadowTree and added a call through to the base class.
2347 (WebCore::createAllowedElementSet): Added. A more efficient way to implement
2348 the initialization of the set for isDisallowedElement.
2349 (WebCore::isDisallowedElement): Simplified this by using the function above,
2350 and also overloaded for both SVGElement and Element for a tiny efficiency boost.
2351 (WebCore::SVGUseElement::clearShadowTree): Renamed form clearResourceReferences.
2352 This is a much more straightforward name. Also deleted the code that sets the
2353 m_needsShadowTreeRecreation flag to false. That should be done by the build
2355 (WebCore::SVGUseElement::buildPendingResource): Made this just invalidate the
2356 shadow tree now instead of explicitly building it.
2357 (WebCore::SVGUseElement::updateShadowTree): Moved the code to create a shadow
2358 tree here from buildPendingResource. ALso changed the logic so that we
2359 always blow away the old shadow tree. Moved the comment about rebuilding things
2360 every time here. Updated the code to use the findTarget and cloneTarget functions,
2361 eliminating the buildShadowTree function entirely. Moved the call to
2362 transferSizeAttributesToShadowTreeTargetClone inside cloneTarget. Also updated
2363 for the name change for m_shouldRebuildShadowTree.
2364 (WebCore::SVGUseElement::targetClone): Renamed from shadowTreeTargetClone.
2365 No need to emphasize "shadow tree" since that's where all clones are.
2366 (WebCore::isDirectReference): Streamlined a bit using "using namespace".
2367 (WebCore::SVGUseElement::toClipPath): Rewrote to use early return and updated
2368 for name changes. Also used ASCIILiteral.
2369 (WebCore::SVGUseElement::rendererClipChild): Changed local variable names.
2370 (WebCore::removeDisallowedElementsFromSubtree): Wrote the iteration in a
2371 slightly more idiomatic style.
2372 (WebCore::SVGUseElement::findTarget): Added. This new function implements
2373 the rule for finding a valid target for a use element. This replaces logic
2374 that was duplicated in two different places and it also includes all the
2375 rules that were formerly in the isValidTarget function. Also, this implements
2376 a correct check for a cycle that handles cases the code in isValidTarget did not.
2377 (WebCore::SVGUseElement::isValidTarget): Deleted.
2378 (WebCore::SVGUseElement::cloneTarget): Added. Helper function used both when
2379 cloning the target of the top level <use> elements and for other <use> elements
2380 inside the shadow tree.
2381 (WebCore::cloneDataAndChildren): Added. Helper function that allows both the
2382 <use> and <symbol> element expanding functions to be shorter and share more code.
2383 (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed unneeded checks
2384 of cachedDocumentIsStillLoading. Used the new findTarget function, which handles
2385 finding the target cross-document correctly. Removed the incorrect use of
2386 referencedDocument when creating new elements and finding targets. Refactored
2387 to use the new cloneDataAndChildren function and also moved the code that removes
2388 the special attributes here, replacing the transferAttributesToShadowTreeReplacement
2389 function. Made a few other simplifications.
2390 (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto, just like the
2391 <use> changes only simpler.
2392 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Made this const.
2393 Removed unneeded assertions.
2394 (WebCore::SVGUseElement::invalidateShadowTree): Updated for name change.
2395 (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed assertion.
2396 (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Deleted.
2397 (WebCore::SVGUseElement::selfHasRelativeLengths): Tweaked names.
2398 (WebCore::SVGUseElement::notifyFinished): Removed the inDocument check, since
2399 this function will only be called for elements that are in a document.
2400 (WebCore::SVGUseElement::cachedDocumentIsStillLoading): Deleted.
2401 (WebCore::SVGUseElement::finishParsingChildren): Removed the code that calls
2402 buildPendingResource here. Shadow tree updating is driven solely by renderer
2404 (WebCore::SVGUseElement::updateExternalDocument): Replaced setCachedDocument
2405 with this. This function knows how to load a different document if the URL
2406 has changed, or leave it alone if not, and also stop the load if it should.
2407 (WebCore::SVGUseElement::isValid): Moved this here from the header, since it's
2408 always being called virtually.
2409 (WebCore::SVGUseElement::haveLoadedRequiredResources): Ditto.
2410 (WebCore::SVGUseElement::setHaveFiredLoadEvent): Ditto.
2411 (WebCore::SVGUseElement::haveFiredLoadEvent): Ditto.
2412 (WebCore::SVGUseElement::svgLoadEventTimer): Ditto.
2414 * svg/SVGUseElement.h: Removed unneeded include. Moved the animated properties
2415 to the top of the class because they are public DOM API and so are logical to
2416 list first. I'd like to do that for other classes too over time. Changed to
2417 derive privately from CachedSVGDocumentClient. Made the function
2418 invalidateDependentShadowTrees private. Removed didNotifySubtreeInsertions,
2419 isSupportedAttribute, clearResourceReferences, buildShadowTree,
2420 transferAttributesToShadowTreeReplacement, isParserInserted, and
2421 m_wasInsertedByParser. Added updateExternalDocument, cloneTarget, targetClone,
2422 updateShadowTree, and clearShadowTree. Also did a couple other renames,
2423 including renaming m_cachedDocument to m_externalDocument.
2425 * svg/svgtags.in: Removed constructorNeedsCreatedByParser from the <use>
2426 element since we don't have to handle constructing by the parser specially.
2428 2015-02-11 Dhi Aurrahman <diorahman@rockybars.com>
2430 CSS selector JIT compilation support for :lang()
2431 https://bugs.webkit.org/show_bug.cgi?id=140818
2433 Reviewed by Benjamin Poulain.
2435 Add the JIT support for :lang(), to ensure :lang() no longer force the engine to
2438 Test: fast/selectors/lang-chained-multiple.html
2440 * cssjit/SelectorCompiler.cpp:
2441 (WebCore::SelectorCompiler::addPseudoClassType):
2442 Get rid of the FunctionType::CannotCompile
2443 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2444 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2446 2015-02-11 Alex Christensen <achristensen@webkit.org>
2448 Fix more weak external symbol errors.
2450 * bindings/scripts/CodeGeneratorJS.pm:
2452 * page/make_settings.pl:
2453 (printGetterAndSetter):
2454 Remove some WEBCORE_EXPORT macros.
2456 2015-02-11 Alex Christensen <achristensen@webkit.org>
2458 Do not export functions defined in headers.
2459 This prevents weak external symbol errors in some configurations.
2462 (WebCore::Range::startContainer):
2463 (WebCore::Range::startOffset):
2464 (WebCore::Range::endContainer):
2465 (WebCore::Range::endOffset):
2466 * inspector/InspectorController.h:
2468 (WebCore::Settings::setMediaKeysStorageDirectory):
2469 * page/make_settings.pl:
2470 (printGetterAndSetter):
2471 * platform/network/cocoa/ProtectionSpaceCocoa.h:
2472 (WebCore::ProtectionSpace::encodingRequiresPlatformData):
2473 * platform/text/TextEncoding.h:
2474 (WebCore::TextEncoding::decode):
2475 Removed WEBCORE_EXPORT macros.
2477 2015-02-11 Chris Dumez <cdumez@apple.com>
2479 [WK2] Add logging to validate the network cache efficacy (Part 2)
2480 https://bugs.webkit.org/show_bug.cgi?id=141345
2481 <rdar://problem/19632080>
2483 Reviewed by Sam Weinig.
2485 Add a few more diagnostic logging keys for the network cache efficacy
2488 2015-02-11 Sam Weinig <sam@webkit.org>
2490 REGRESSION(r179166): Crash when accessing document.dir on a document with no elements
2491 <rdar://problem/19804351>
2492 https://bugs.webkit.org/show_bug.cgi?id=141480
2494 Reviewed by Chris Dumez.
2496 Test: fast/dom/document-dir-empty-document-crash.html
2498 * html/HTMLDocument.cpp:
2499 (WebCore::HTMLDocument::dir):
2500 Don't unnecessarily dereference the documentElement. is<HTMLHtmlElement>() will handle null just fine.
2502 2015-02-11 Mark Rowe <mrowe@apple.com>
2504 <https://webkit.org/b/141492> extract-localizable-strings.pl shouldn't update the target file if the contents haven't changed
2506 Avoid updating the target file if the contents haven't changed. This prevents Xcode from copying the identical
2507 file into the framework and resigning it, which avoids the resulting relinking of all targets that depend on
2510 Reviewed by Dan Bernstein.
2512 * extract-localizable-strings.pl: Write our output to a temporary file. If the output differs from the
2513 existing contents of the target file, move the temporary file over the target file. Otherwise, delete
2516 2015-02-11 Chris Dumez <cdumez@apple.com>
2518 Turn recent assertions into release assertions to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
2519 https://bugs.webkit.org/show_bug.cgi?id=141484
2520 <rdar://problem/13811738>
2522 Reviewed by Andy Estes.
2524 Turn recent assertions into release assertions to help track down crash in
2525 DocumentLoader::stopLoadingForPolicyChange(). This should increase the
2526 likelyhood of tripping them so that we better understand why this happens.
2528 * loader/DocumentLoader.cpp:
2529 (WebCore::DocumentLoader::~DocumentLoader):
2530 (WebCore::DocumentLoader::detachFromFrame):
2532 2015-02-11 Jer Noble <jer.noble@apple.com>
2534 [MSE] SampleMap::addRange() returns an inverted iterator_range, possibly causing a crash when that iterator_range is traversed.
2535 https://bugs.webkit.org/show_bug.cgi?id=141479
2536 rdar://problem/19067597
2538 Reviewed by Chris Dumez.
2540 When looking backwards through a presentationOrder map to find samples, we then reverse our iterators
2541 and put them in an iterator_range to return to the caller. But in addition to reversing the iterators
2542 themselves, we also need to put them in the iterator_range in reverse order, so that when the caller
2543 iterates from iterator_range.first -> iterator_range.second, they don't end up off the end of the
2544 the underlying storage.
2546 * Modules/mediasource/SampleMap.cpp:
2547 (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
2549 2015-02-11 Simon Fraser <simon.fraser@apple.com>
2551 Improve the showFrameTree() output slightly
2552 https://bugs.webkit.org/show_bug.cgi?id=141482
2554 Reviewed by Zalan Bujtas.
2556 Have showFrameTree() show the Frame's RenderView so it can be correlated with
2557 layer dumps, and show styleRecalc and needsLayout state.
2559 * page/FrameTree.cpp:
2561 * page/FrameView.cpp:
2562 (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Add an explanatory
2563 comment about why we don't walk the Frame tree.
2565 2015-02-11 Alex Christensen <achristensen@webkit.org>
2567 Stop using WebCore.exp.in on Mac and iOS.
2568 https://bugs.webkit.org/show_bug.cgi?id=141413
2570 Reviewed by Dan Bates.
2572 * Configurations/Base.xcconfig:
2573 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
2574 * platform/PlatformExportMacros.h:
2575 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
2577 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
2579 Div having contentEditable and display:flex cannot be edited if it is empty.
2580 https://bugs.webkit.org/show_bug.cgi?id=141218
2582 Reviewed by Ryosuke Niwa.
2584 RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
2585 in an editable area is recalculated whenever an inner value of div is changed. If the inner value
2586 is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
2587 is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
2588 in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
2589 having "display : flex" goes weird and VisibleSelection is empty accordingly.
2591 Test: fast/events/key-events-in-editable-flexbox.html
2594 (WebCore::Position::isCandidate):
2596 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
2598 Activate ReliefLogger of a memory pressure handler for linux system.
2599 https://bugs.webkit.org/show_bug.cgi?id=123611
2601 Reviewed by Anders Carlsson.
2603 Put more logs for the time when a system goes under memory pressure or viceversa.
2605 No new tests since no engine behavior changed.
2607 * platform/linux/MemoryPressureHandlerLinux.cpp:
2608 (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): Wait a memory pressure event
2609 from cgroup in a seperated thread. Once a pressure event happens, respondToMemoryPressure()
2610 would be called to get back some resources.
2611 (WebCore::MemoryPressureHandler::install): Install memoryPressureHandler module
2614 2015-02-11 Alex Christensen <achristensen@webkit.org>
2616 Final preparations to switch to WEBCORE_EXPORT.
2618 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2619 Export the vtable and a function.
2621 2015-02-11 Sam Weinig <sam@webkit.org>
2623 performance.now can crash if accessed from a window that has navigated
2624 <rdar://problem/16892506>
2625 https://bugs.webkit.org/show_bug.cgi?id=141478
2627 Reviewed by Alexey Proskuryakov.
2629 Test: fast/performance/performance-now-crash-on-navigated-window.html
2631 * page/Performance.cpp:
2632 (WebCore::Performance::now):
2633 Check for a null frame, which can happen when the window has been navigated.
2635 2015-02-10 Alexey Proskuryakov <ap@apple.com>
2637 URL::setUser and URL::setPass don't percent encode
2638 https://bugs.webkit.org/show_bug.cgi?id=141453
2639 rdar://problem/14844503&16551802&19623145
2641 Reviewed by Darin Adler.
2643 Tests: fast/url/url-credentials-escaping.html
2644 http/tests/xmlhttprequest/basic-auth-credentials-escaping.html
2646 Start adding some code that performs escaping in a way that matches the URL Standard.
2647 Right now, it's only used where we failed to do any escaping at all, and over time,
2648 we'll be moving towards a new implementation.
2651 (WebCore::URLUtils<T>::username):
2652 (WebCore::URLUtils<T>::password):
2654 (WebCore::isSchemeFirstChar):
2655 (WebCore::URL::user):
2656 (WebCore::URL::pass):
2657 (WebCore::URL::encodedUser):
2658 (WebCore::URL::encodedPass):
2659 (WebCore::URL::setUser):
2660 (WebCore::URL::setPass):
2661 (WebCore::encodeWithURLEscapeSequences):
2664 2015-02-11 Alex Christensen <achristensen@webkit.org>
2666 Add a few more WEBCORE_EXPORT macros for debug and iOS builds.
2668 * page/EventHandler.h:
2669 * page/ios/WebEventRegion.h:
2670 * platform/sql/SQLiteDatabaseTracker.h:
2672 2015-02-11 Darin Adler <darin@apple.com>
2674 REGRESSION(r179476): It broke the !ENABLE(PICTURE_SIZES) build
2675 https://bugs.webkit.org/show_bug.cgi?id=141327
2677 Reviewed by Csaba Osztrogonác.
2679 * html/parser/HTMLPreloadScanner.cpp:
2680 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2681 Put #if around use of m_sizesAttribute.
2683 2015-02-11 Commit Queue <commit-queue@webkit.org>
2685 Unreviewed, rolling out r179921.
2686 https://bugs.webkit.org/show_bug.cgi?id=141473
2688 caused about 30 test failures on yosemite and mavericks
2689 (Requested by alexchristensen on #webkit).
2693 "Div having contentEditable and display:flex cannot be edited
2695 https://bugs.webkit.org/show_bug.cgi?id=141218
2696 http://trac.webkit.org/changeset/179921
2698 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
2700 Div having contentEditable and display:flex cannot be edited if it is empty.
2701 https://bugs.webkit.org/show_bug.cgi?id=141218
2703 Reviewed by Ryosuke Niwa.
2705 RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
2706 in an editable area is recalculated whenever an inner value of div is changed. If the inner value
2707 is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
2708 is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
2709 in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
2710 having "display : flex" goes weird and VisibleSelection is empty accordingly.
2712 Test: fast/events/key-events-in-editable-flexbox.html
2715 (WebCore::Position::isCandidate):
2717 2015-02-11 Commit Queue <commit-queue@webkit.org>
2719 Unreviewed, rolling out r179910.
2720 https://bugs.webkit.org/show_bug.cgi?id=141464
2722 Caused assertions on debug bots (Requested by ap on #webkit).
2726 "[WK2] Add logging to validate the network cache efficacy
2728 https://bugs.webkit.org/show_bug.cgi?id=141345
2729 http://trac.webkit.org/changeset/179910
2731 2015-02-10 Chris Dumez <cdumez@apple.com>
2733 Optimize MutableStyleProperties::removePropertiesInSet()
2734 https://bugs.webkit.org/show_bug.cgi?id=141460
2736 Reviewed by Andreas Kling.
2738 Optimize MutableStyleProperties::removePropertiesInSet() by doing an
2739 in-place removal of the vector properties, using the new and efficient
2740 Vector::removalAllMatching().
2742 I see a ~11% speed-up on CSS/CSSPropertySetterGetter.html performance
2745 This change was inspired by the following Blink revision:
2746 https://src.chromium.org/viewvc/blink?view=rev&revision=189387
2748 Test: PerformanceTests/CSS/CSSPropertySetterGetter.html
2750 * css/StyleProperties.cpp:
2751 (WebCore::MutableStyleProperties::removePropertiesInSet):
2753 2015-02-10 Alex Christensen <achristensen@webkit.org>
2755 [Win] Fix debug build after r179807.
2756 https://bugs.webkit.org/show_bug.cgi?id=141461
2758 Reviewed by Benjamin Poulain.
2760 * dom/TypedElementDescendantIterator.h:
2761 Explicitly call Iterator constructor to reduce complexity when iterating descendantsOfType.
2763 2015-02-10 Chris Dumez <cdumez@apple.com>
2765 [WK2] Add logging to validate the network cache efficacy (Part 2)
2766 https://bugs.webkit.org/show_bug.cgi?id=141345
2768 Reviewed by Antti Koivisto.
2770 Add a few more diagnostic logging keys for the network cache efficacy
2773 2015-02-10 Commit Queue <commit-queue@webkit.org>
2775 Unreviewed, rolling out r179896.
2776 https://bugs.webkit.org/show_bug.cgi?id=141452
2778 broke linking debug builds (Requested by thorton on #webkit).
2782 "Stop using WebCore.exp.in on Mac and iOS."
2783 https://bugs.webkit.org/show_bug.cgi?id=141413
2784 http://trac.webkit.org/changeset/179896
2786 2015-02-10 Alex Christensen <achristensen@webkit.org>
2788 Fix bindings tests after r179886.
2790 * bindings/scripts/test/ObjC/DOMFloat64Array.h:
2791 * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2792 * bindings/scripts/test/ObjC/DOMTestCallback.h:
2793 * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
2794 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2795 * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
2796 * bindings/scripts/test/ObjC/DOMTestException.h:
2797 * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
2798 * bindings/scripts/test/ObjC/DOMTestInterface.h:
2799 * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
2800 * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
2801 * bindings/scripts/test/ObjC/DOMTestNode.h:
2802 * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
2803 * bindings/scripts/test/ObjC/DOMTestObj.h:
2804 * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
2805 * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2806 * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2807 * bindings/scripts/test/ObjC/DOMattribute.h:
2808 * bindings/scripts/test/ObjC/DOMreadonly.h:
2810 2015-02-10 Alex Christensen <achristensen@webkit.org>
2812 Stop using WebCore.exp.in on Mac and iOS.
2813 https://bugs.webkit.org/show_bug.cgi?id=141413
2815 Reviewed by Dan Bates.
2817 * Configurations/Base.xcconfig:
2818 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
2819 * platform/PlatformExportMacros.h:
2820 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
2822 2015-02-10 Chris Dumez <cdumez@apple.com>
2824 Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
2825 https://bugs.webkit.org/show_bug.cgi?id=141447
2826 <rdar://problem/13811738>
2828 Reviewed by Alexey Proskuryakov.
2830 Add another assertion to help track down crash in
2831 DocumentLoader::stopLoadingForPolicyChange().
2833 The trace seems to hint that frameLoader() returns null when
2834 stopLoadingForPolicyChange() is called. frameLoader() can only return
2835 null after DocumentLoader::detachFromFrame() has been called.
2836 Also, stopLoadingForPolicyChange() here is called from the
2837 DocumentLoader::continueAfterContentPolicy() policy callback which
2838 requires m_waitingForContentPolicy to be true. Therefore, we should
2839 assert that m_waitingForContentPolicy is false when m_frame is cleared
2840 in DocumentLoader::detachFromFrame().
2842 * loader/DocumentLoader.cpp:
2843 (WebCore::DocumentLoader::detachFromFrame):
2845 2015-02-10 Alex Christensen <achristensen@webkit.org>
2847 Stop using WebCore.exp.in on Mac and iOS.
2848 https://bugs.webkit.org/show_bug.cgi?id=141413
2850 Reviewed by Dan Bates.
2852 * Configurations/Base.xcconfig:
2853 Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
2854 * platform/PlatformExportMacros.h:
2855 Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
2857 2015-02-10 Alex Christensen <achristensen@webkit.org>
2859 Add more WEBCORE_EXPORT macros for iOS.
2860 https://bugs.webkit.org/show_bug.cgi?id=141430
2862 Reviewed by Tim Horton.
2864 * bindings/objc/WebScriptObject.h:
2865 * bindings/scripts/CodeGeneratorObjC.pm:
2869 * editing/FrameSelection.h:
2870 * html/HTMLFormControlElement.h:
2871 * html/HTMLMediaSession.h:
2874 * platform/ScrollView.h:
2875 * platform/ios/PasteboardIOS.mm:
2876 * platform/ios/wak/WAKAppKitStubs.h:
2877 * platform/ios/wak/WAKClipView.h:
2878 * platform/ios/wak/WAKScrollView.h:
2879 * platform/ios/wak/WAKView.h:
2880 * platform/ios/wak/WAKWindow.h:
2881 * platform/ios/wak/WAKWindow.mm:
2882 * platform/ios/wak/WKContentObservation.h:
2883 * platform/ios/wak/WKGraphics.h:
2884 * platform/ios/wak/WebCoreThread.h:
2885 * platform/ios/wak/WebCoreThread.mm:
2886 * platform/ios/wak/WebCoreThreadRun.h:
2887 * platform/ios/wak/WebCoreThreadSystemInterface.h:
2888 * platform/network/ios/QuickLook.h:
2889 * platform/text/TextBreakIterator.h:
2891 2015-02-09 David Hyatt <hyatt@apple.com>
2893 text-underline-position: under is broken
2894 https://bugs.webkit.org/show_bug.cgi?id=141400
2895 <rdar://problem/18569583>
2897 Reviewed by Simon Fraser.
2899 Added fast/text/text-underline-position-under.html
2901 * rendering/InlineFlowBox.cpp:
2902 (WebCore::InlineFlowBox::computeMaxLogicalBottom):
2903 (WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
2904 * rendering/InlineFlowBox.h:
2905 Switch to using the bottom to compute the offset. Using the top is incorrect, since
2906 the heights of boxes can vary.
2908 Fix a bug where the y() of the box was being used instead of the logical value, making the result
2909 wrong for vertical text.
2911 * rendering/RootInlineBox.cpp:
2912 (WebCore::RootInlineBox::maxLogicalBottom):
2913 (WebCore::RootInlineBox::maxLogicalTop): Deleted.
2914 Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
2915 since the old code just ignored the root's placement.
2917 * rendering/RootInlineBox.h:
2918 * style/InlineTextBoxStyle.cpp:
2919 (WebCore::computeUnderlineOffset):
2920 Call the bottom function now instead of the top.
2922 2015-02-10 Chris Dumez <cdumez@apple.com>
2924 Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
2925 https://bugs.webkit.org/show_bug.cgi?id=141441
2926 <rdar://problem/13811738>
2928 Reviewed by Alexey Proskuryakov.
2930 Add assertion to help track down a crash in
2931 WebCore::DocumentLoader::stopLoadingForPolicyChange().
2933 * loader/DocumentLoader.cpp:
2934 (WebCore::DocumentLoader::~DocumentLoader):
2935 Make sure the DocumentLoader is not waiting for a content policy
2936 response when it is destroyed. If this were to happen, then the
2937 lambda function passed to PolicyChecker::checkContentPolicy()
2938 would outlive the DocumentLoader. This is an issue because
2939 that lambda function captures [this], which is the DocumentLoader.
2940 This would cause DocumentLoader::continueAfterContentPolicy() to
2941 be called after the DocumentLoader has been destroyed, which would
2944 2015-02-07 Zalan Bujtas <zalan@apple.com>
2946 REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
2947 https://bugs.webkit.org/show_bug.cgi?id=133462
2949 Reviewed by David Hyatt.
2951 RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
2952 Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
2953 we detach the inline tree first and destroy them after. The detached root boxes can't access
2954 the flowthread containing block and we end up with dangling pointers in this map.
2955 Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.
2957 Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html
2959 * rendering/RenderBlock.cpp:
2960 (WebCore::RenderBlock::collapseAnonymousBoxChild):
2962 2015-02-10 Julien Isorce <j.isorce@samsung.com>
2964 Render: properly update body's background image
2965 https://bugs.webkit.org/show_bug.cgi?id=140183
2967 When HTML and BODY renderers are both composited the
2968 skipBodyBackground condition should also take into account
2969 if the HTML's layer can draw its contents.
2971 Reviewed by Darin Adler.
2973 Test: animations/animation-background-image.html
2975 * rendering/RenderBox.cpp:
2976 (WebCore::skipBodyBackground): Do not skip
2977 if document's layer cannot draw its content.
2978 Previously both body and html did not paint the background
2979 when they are both composited.
2981 * rendering/RenderLayerBacking.cpp:
2982 (WebCore::RenderLayerBacking::contentChanged): Also redisplay
2985 2015-02-10 Eric Carlson <eric.carlson@apple.com>
2987 [iOS] don't get out of sync when interrupt/resume calls are not balanced
2988 https://bugs.webkit.org/show_bug.cgi?id=141310
2990 Reviewed by Jer Noble.
2992 No new tests, updated media/video-interruption-with-resume-allowing-play.html.
2994 * platform/audio/MediaSession.cpp:
2995 (WebCore::MediaSession::beginInterruption): Count interruptions.
2996 (WebCore::MediaSession::endInterruption): Ignore calls when m_interruptionCount is already zero.
2997 * platform/audio/MediaSession.h:
2999 2015-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
3001 [GTK] GMutexLocker build issue
3002 https://bugs.webkit.org/show_bug.cgi?id=141381
3004 Reviewed by Žan Doberšek.
3006 Use always WTF::GMutexLocker because newer glib versions have a
3007 GMutexLocker in the public API.
3009 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
3010 (WebCore::AudioSourceProviderGStreamer::provideInput):
3011 (WebCore::AudioSourceProviderGStreamer::handleAudioBuffer):
3012 (WebCore::AudioSourceProviderGStreamer::clearAdapters):
3013 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3014 (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
3015 (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3016 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3017 (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3018 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3019 (webkitVideoSinkTimeoutCallback):
3020 (webkitVideoSinkRender):
3021 (unlockSampleMutex):
3022 (webkitVideoSinkUnlockStop):
3023 (webkitVideoSinkStart):
3024 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3025 (webKitWebSrcGetProperty):
3027 (webKitWebSrcStart):
3028 (webKitWebSrcChangeState):
3029 (webKitWebSrcQueryWithParent):
3030 (webKitWebSrcGetUri):
3031 (webKitWebSrcSetUri):
3032 (webKitWebSrcNeedDataMainCb):
3033 (webKitWebSrcNeedDataCb):
3034 (webKitWebSrcEnoughDataMainCb):
3035 (webKitWebSrcEnoughDataCb):
3036 (webKitWebSrcSeekDataCb):
3037 (webKitWebSrcSetMediaPlayer):
3038 (StreamingClient::createReadBuffer):
3039 (StreamingClient::handleResponseReceived):
3040 (StreamingClient::handleDataReceived):
3041 (StreamingClient::handleNotifyFinished):
3042 (ResourceHandleStreamingClient::wasBlocked):
3043 (ResourceHandleStreamingClient::cannotShowURL):
3045 2015-02-09 Alex Christensen <achristensen@webkit.org>
3047 Update WEBCORE_EXPORT to prepare to start using it.
3048 https://bugs.webkit.org/show_bug.cgi?id=141409
3050 Reviewed by Tim Horton.
3052 * bindings/js/JSDOMGlobalObject.h:
3053 * bindings/objc/DOMInternal.h:
3054 * bindings/objc/ExceptionHandlers.mm:
3055 * bindings/objc/WebScriptObjectPrivate.h:
3056 * bindings/scripts/CodeGeneratorJS.pm:
3058 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3059 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3060 * bindings/scripts/test/JS/JSTestEventConstructor.h:
3061 * bindings/scripts/test/JS/JSTestEventTarget.h:
3062 * bindings/scripts/test/JS/JSTestException.h:
3063 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3064 * bindings/scripts/test/JS/JSTestInterface.h:
3065 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3066 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3067 * bindings/scripts/test/JS/JSTestNondeterministic.h:
3068 * bindings/scripts/test/JS/JSTestObj.h:
3069 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3070 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3071 * bindings/scripts/test/JS/JSTestTypedefs.h:
3072 * bindings/scripts/test/JS/JSattribute.h:
3073 * bindings/scripts/test/JS/JSreadonly.h:
3074 * css/StyleProperties.h:
3075 * dom/DeviceMotionData.h:
3078 * dom/ScriptExecutionContext.h:
3080 * editing/htmlediting.h:
3081 * html/HTMLInputElement.h:
3082 * html/TimeRanges.h:
3083 * loader/FrameLoader.h:
3084 * loader/cache/CacheValidation.h:
3085 * loader/cache/MemoryCache.h:
3086 * loader/icon/IconDatabase.h:
3087 * page/DatabaseProvider.h:
3088 * page/DiagnosticLoggingKeys.h:
3089 * page/EventHandler.h:
3090 * page/FrameSnapshotting.h:
3092 * page/PageConsoleClient.h:
3093 * page/PageOverlay.h:
3094 * platform/CrossThreadCopier.h:
3095 * platform/FileSystem.h:
3096 * platform/PlatformSpeechSynthesizer.h:
3097 * platform/RemoteCommandListener.h:
3098 * platform/RuntimeApplicationChecks.h:
3099 * platform/graphics/Font.h:
3100 * platform/graphics/FontCache.h:
3101 * platform/graphics/FontGlyphs.h:
3102 * platform/graphics/FontRanges.h:
3103 * platform/graphics/GeometryUtilities.h:
3104 * platform/graphics/GlyphPage.h:
3105 * platform/graphics/Region.h:
3106 * platform/graphics/ca/PlatformCALayer.h:
3107 * platform/graphics/ca/TileController.h:
3108 * platform/graphics/transforms/TransformationMatrix.h:
3109 * platform/mac/WebCoreFullScreenWarningView.h:
3110 * platform/network/BlobDataFileReference.h:
3111 * platform/network/ResourceRequestBase.h:
3112 * platform/network/ResourceResponseBase.h:
3113 * platform/network/create-http-header-name-table:
3114 * platform/network/mac/WebCoreURLResponse.h:
3115 * platform/sql/SQLiteDatabaseTracker.h:
3116 * platform/sql/SQLiteStatement.h:
3117 * rendering/HitTestLocation.h:
3118 * rendering/HitTestResult.h:
3119 * storage/StorageEventDispatcher.h:
3120 Added WEBCORE_EXPORT macros.
3122 2015-02-09 Chris Dumez <cdumez@apple.com>
3124 Check for self-assignment in Length::operator=(const Length&)
3125 https://bugs.webkit.org/show_bug.cgi?id=141402
3127 Reviewed by Andreas Kling.
3129 Check for self-assignment in Length::operator=(const Length&) as
3130 calling memcpy() with the same source and destination addresses has
3133 * platform/Length.h:
3134 (WebCore::Length::operator=):
3136 2015-02-09 Roger Fong <roger_fong@apple.com>
3138 WebGL: Update 1.0.2 conformance layout tests and address new failure.
3139 https://bugs.webkit.org/show_bug.cgi?id=141408.
3140 <rdar://problem/19773236>
3142 Reviewed by Dean Jackson.
3144 Tests covered by updated 1.0.2 conformance tests.
3146 * html/canvas/WebGLRenderingContextBase.cpp:
3147 Return null string instead of empty string if parameter validation fails.
3148 (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
3149 (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
3150 (WebCore::WebGLRenderingContextBase::getShaderSource):
3152 2015-02-09 Timothy Horton <timothy_horton@apple.com>
3154 Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
3155 https://bugs.webkit.org/show_bug.cgi?id=141353
3157 Reviewed by Anders Carlsson.
3159 No new tests, because there's no behavior change.
3161 * platform/graphics/DisplayRefreshMonitorManager.cpp:
3162 (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
3163 (WebCore::DisplayRefreshMonitorManager::unregisterClient):
3164 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
3165 * platform/graphics/DisplayRefreshMonitorManager.h:
3166 Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
3167 from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
3168 display, so there's usually only one DisplayRefreshMonitor. Linear search
3169 on the Vector will be faster than the hash lookup in all conceivable cases.
3170 This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
3171 where we don't know enough about PlatformDisplayID to safely hash it.
3173 2015-02-09 Jer Noble <jer.noble@apple.com>
3175 [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
3176 https://bugs.webkit.org/show_bug.cgi?id=141399
3178 Reviewed by Eric Carlson.
3180 Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
3181 the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
3182 the requested value even if time is not progressing.
3184 We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
3185 be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
3186 very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
3187 estimation, means we should probably turn it off for iOS and Yosemite.
3189 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3190 (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
3191 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3192 (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
3194 2015-02-07 Roger Fong <roger_fong@apple.com>
3196 WebGL 2: Texture call format, internal format, and type validation.
3197 https://bugs.webkit.org/show_bug.cgi?id=141318.
3198 <rdar://problem/19733828>
3200 Reviewed by Brent Fulgham.
3202 Tests will be covered by WebGL2 conformance tests.
3204 * html/canvas/WebGL2RenderingContext.cpp:
3205 (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Add missing ExceptionCode argument.
3206 (WebCore::WebGL2RenderingContext::copyTexImage2D): Validate texture formats based on GLES3 spec.
3207 (WebCore::WebGL2RenderingContext::texSubImage2DBase): Validate using internal format from texture target.
3208 (WebCore::WebGL2RenderingContext::texSubImage2DImpl): Validate using internal format from texture target.
3209 (WebCore::WebGL2RenderingContext::texSubImage2D): Validate using internal format from texture target.
3210 (WebCore::WebGL2RenderingContext::validateTexFuncParameters): Do extra validation for copyTexImage2D.
3211 (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Validate internal format, format and type combination.
3212 (WebCore::WebGL2RenderingContext::validateTexFuncData): Validate new data types.
3213 This method now accepts an internal format argument.
3214 (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
3215 Helper method to convert internal format to base internal format.
3216 * html/canvas/WebGL2RenderingContext.h:
3218 * html/canvas/WebGLRenderingContext.cpp:
3219 (WebCore::WebGLRenderingContext::copyTexImage2D): Moved from WebGLRenderingContextBase.
3220 (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
3221 (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
3222 (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
3223 (WebCore::WebGLRenderingContext::validateTexFuncParameters): Ditto.
3224 (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Ditto.
3225 (WebCore::WebGLRenderingContext::validateTexFuncData): Ditto.
3226 * html/canvas/WebGLRenderingContext.h:
3228 * html/canvas/WebGLRenderingContextBase.cpp:
3229 (WebCore::WebGLRenderingContextBase::texImage2DBase):
3230 (WebCore::WebGLRenderingContextBase::validateTexFunc):
3231 (WebCore::WebGLRenderingContextBase::texImage2D):
3232 (WebCore::WebGLRenderingContextBase::copyTexImage2D): Deleted.
3233 (WebCore::WebGLRenderingContextBase::texSubImage2DBase): Deleted.
3234 (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
3235 (WebCore::WebGLRenderingContextBase::texSubImage2D): Deleted.
3236 (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Deleted.
3237 (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Deleted.
3238 (WebCore::WebGLRenderingContextBase::validateTexFuncData): Deleted.
3239 * html/canvas/WebGLRenderingContextBase.h: Modify validation type enums to differentiate between CopyImage, TexImage and TexSubImage calls.
3240 (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Moved from WebGLRenderingContextBase.
3241 (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Ditto.
3242 (WebCore::clip1D): Ditto.
3243 (WebCore::clip2D): Ditto.
3244 * platform/graphics/GraphicsContext3D.h: Rename a typo'ed enum.
3246 2015-02-09 Commit Queue <commit-queue@webkit.org>
3248 Unreviewed, rolling out r179494.
3249 https://bugs.webkit.org/show_bug.cgi?id=141395
3251 Caused slowdown in a WebKit client test scenario (Requested by
3256 "[Cocoa] Make decoded image data purgeable ASAP."
3257 https://bugs.webkit.org/show_bug.cgi?id=140298
3258 http://trac.webkit.org/changeset/179494
3260 2015-02-09 Jer Noble <jer.noble@apple.com>
3262 [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
3263 https://bugs.webkit.org/show_bug.cgi?id=140955
3265 Reviewed by Eric Carlson.
3267 Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
3268 webaudio/audiobuffersource-negative-playbackrate.html
3270 Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
3271 start() to set the initial playback position at the end of the play range if the rate of playback
3274 * Modules/webaudio/AudioBufferSourceNode.cpp:
3275 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
3276 (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
3277 for clarity. Add a non-interpolated and interpolated render step for negative playback.
3278 (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
3279 (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
3280 (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
3282 2015-02-09 Darin Adler <darin@apple.com>
3284 Try to fix build on platforms that use SVG "all in one" file (Windows).
3286 * svg/SVGAElement.cpp: Don't do "using namespace HTMLNames;" outside of
3287 function boundaries, because that will be inherited by other files.
3288 (WebCore::SVGAElement::isURLAttribute): Use XLinkNames directly here
3289 instead of using HTMLNames implicitly.
3291 * svg/SVGElement.cpp: Don't do "using namespace HTMLNames;" outside of
3292 function boundaries, because that will be inherited by other files.
3293 (WebCore::populateAttributeNameToCSSPropertyIDMap): Instead do it in here.
3294 (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): And here.
3295 (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): And here.
3296 (WebCore::SVGElement::parseAttribute): And use HTMLNames directly here
3297 instead of implicitly.
3299 2015-02-09 Eric Carlson <eric.carlson@apple.com>
3301 [iOS] exit from fullscreen when player view controller calls delegate
3302 https://bugs.webkit.org/show_bug.cgi?id=141350
3304 Reviewed by Jer Noble.
3306 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3307 (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): New, ask delegate
3308 to exit from fullscreen.
3310 2015-02-06 Sergio Villar Senin <svillar@igalia.com>
3312 ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
3313 https://bugs.webkit.org/show_bug.cgi?id=141328
3315 Reviewed by Darin Adler.
3318 GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition()
3319 was trying to place an item with span, it was completely ignoring
3320 the resolvedInitialPosition returned by
3321 GridResolvedPosition::resolveGridPositionAgainstOppositePosition()
3322 and only using the finalResolvedPosition. This works with an
3323 unlimited grid which can indefinitely grow. But if the item spans
3324 over the grid track limits, then it might happen that the final
3325 resolved position is placed before the initial resolved position,
3326 something that is forbidden.
3328 The solution is to directly use the GridSpan returned by
3329 GridResolvedPosition::resolveGridPositionAgainstOppositePosition(), if the item
3330 does not surpass the track limits then the returned initialResolvedPosition
3331 is identical to the provided one, otherwise it's properly corrected to respect
3334 * rendering/style/GridResolvedPosition.cpp:
3335 (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
3337 2015-01-22 Sergio Villar Senin <svillar@igalia.com>
3339 [CSS Grid Layout] Tracks' growth limits must be >= base sizes
3340 https://bugs.webkit.org/show_bug.cgi?id=140540
3342 Reviewed by Antti Koivisto.
3344 The track sizing algorithm is supposed to avoid those situations
3345 but they easily (specially when we mix absolute lengths and
3346 intrinsic lengths in min and max track sizing functions) and
3347 frequently appear. In those cases the outcome from the algorithm
3348 is wrong, tracks are not correctly sized.
3350 In order to fulfill the restriction, m_usedBreadth and
3351 m_maxBreadth are now private members of GridTrack and the class
3352 now provides a couple of methods to modify them respecting the
3353 growthLimit >= baseSize precondition.
3355 Apart from that, the members and methods of GridTrack were also
3356 renamed to match the ones used in the recent algorithm rewrite:
3357 usedBreadth became baseSize and maxBreadth is now growthLimit.
3359 Although the algorithm was not modified at all, this change
3360 detected and fixed several invalid results (tracks and/or grids
3361 bigger than expected).
3363 * rendering/RenderGrid.cpp:
3364 (WebCore::GridTrack::GridTrack): Renamed fields and methods. Added
3366 (WebCore::GridTrack::baseSize): Renamed from usedBreadth.
3367 (WebCore::GridTrack::growthLimit): Renamed from maxBreadth.
3368 (WebCore::GridTrack::setBaseSize):
3369 (WebCore::GridTrack::setGrowthLimit):
3370 (WebCore::GridTrack::growBaseSize): Renamed from growUsedBreadth.
3371 (WebCore::GridTrack::growGrowthLimit): Renamed from growMaxBreadth.
3372 (WebCore::GridTrack::growthLimitIsInfinite): New helper method.
3373 (WebCore::GridTrack::growthLimitIfNotInfinite): Renamed from
3374 maxBreadthIfNotInfinite.
3375 (WebCore::GridTrack::isGrowthLimitBiggerThanBaseSize): New helper
3376 method to verify ASSERTs are true.
3377 (WebCore::GridTrack::ensureGrowthLimitIsBiggerThanBaseSize): Ditto.
3378 (WebCore::GridTrackForNormalization::GridTrackForNormalization):
3379 (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3380 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3381 (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3382 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3383 (WebCore::sortByGridTrackGrowthPotential):
3384 (WebCore::RenderGrid::distributeSpaceToTracks):
3385 (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
3386 (WebCore::RenderGrid::layoutGridItems):
3387 (WebCore::RenderGrid::gridAreaBreadthForChild):
3388 (WebCore::RenderGrid::populateGridPositions):
3389 (WebCore::GridTrack::growUsedBreadth): Renamed to growBaseSize.
3390 (WebCore::GridTrack::usedBreadth): Renamed to baseSize.
3391 (WebCore::GridTrack::growMaxBreadth): Renamed to growGrowthLimit.
3392 (WebCore::GridTrack::maxBreadthIfNotInfinite): Renamed to
3393 growthLimitIfNotInfinite.
3394 * rendering/RenderGrid.h:
3396 2015-02-08 Chris Fleizach <cfleizach@apple.com>
3398 AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
3399 https://bugs.webkit.org/show_bug.cgi?id=140485
3401 Reviewed by Anders Carlsson.
3403 If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver
3404 to hang. A simple solution is perform the actual work after a short delay, which will ensure the call
3405 returns without hanging.
3407 Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html
3409 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3410 (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3411 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):