1 2014-05-27 Myles C. Maxfield <mmaxfield@apple.com>
3 Lists styled with SVG fonts are not rendered as expected
4 https://bugs.webkit.org/show_bug.cgi?id=133198
6 Reviewed by Simon Fraser.
8 There were a couple places in RenderListMarker and RenderMenuList that were
9 implicitly creating TextRuns by passing a String to a function which
10 expected a TextRun. Because TextRun has a constructor which takes a single
11 String and isn't marked explicit, TextRuns were being created without
12 any of the associated code that initializes the TextRun (such as creating
13 a RenderingContext if necessary).
15 There is currently one more client of this code that needs to be fixed.
16 This is in RenderThemeIOS::adjustMenuListButtonStyle(). However, fixing
17 this will be a somewhat large change, and is out of scope for this patch.
18 I will submit a follow-up patch that fixes this permanently. Once this is
19 fixed, I can mark TextRun's constructors as explicit.
21 Test: svg/custom/list-items-with-svg-font-family.html
23 * platform/graphics/TextRun.h:
24 (WebCore::TextRun::TextRun): Mark constructors as explicit.
25 * rendering/RenderListMarker.cpp:
26 (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
27 RenderBlock::constructTextRun.
28 (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
29 * rendering/RenderMenuList.cpp:
30 (RenderMenuList::updateOptionsWidth): Ditto.
31 * rendering/RenderThemeIOS.mm:
32 (WebCore::adjustInputElementButtonStyle): Instead of crashing, mark
33 form controls rendered with SVG fonts as having 0 width. This isn't
34 perfect, but fixing this is out of scope for this patch.
36 2014-06-04 Andreas Kling <akling@apple.com>
38 WebKit should adopt journal_mode=wal for all SQLite databases.
39 <https://webkit.org/b/133496>
40 <rdar://problem/15600186>
42 We already had code to enable write-ahead logging, but it didn't work
43 since calling SQLiteStatement::step() without first calling prepare()
46 Converted it to use into a simple executeCommand() instead.
48 Reviewed by Brady Eidson.
50 * platform/sql/SQLiteDatabase.cpp:
51 (WebCore::SQLiteDatabase::open):
53 2014-06-04 Radu Stavila <stavila@adobe.com>
55 REGRESSION: [CSS Regions] Regions with overflow:auto generate scrollbars even if the content flows into the following regions and as such, should not be scrolled
56 https://bugs.webkit.org/show_bug.cgi?id=133481
58 Reviewed by Antti Koivisto.
60 When enlarging the layout overflow of a scrollable region, the portion of the content that flows
61 in the region must be taken into consideration. If the content continues to flow into the next
62 region, the layout overflow of the current region must not be enlarged.
64 Test: fast/regions/scrollable-first-region.html
66 * rendering/RenderFlowThread.cpp:
67 (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
69 2014-06-03 Benjamin Poulain <benjamin@webkit.org>
71 Fix some corner cases of :hover and :active in quirks mode
72 https://bugs.webkit.org/show_bug.cgi?id=133493
74 Reviewed by Andreas Kling.
76 Previously, the quirks mode of :hover and :active were evaluated from the SelectorFragment
77 in fragmentOnlyMatchesLinksInQuirksMode(). There were two problems with that approach:
78 1) The FragmentGenerator optimizes out some filter when they always match or can never match.
79 Those fragment should still qualify :hover and :active, but they were lost
80 for fragmentOnlyMatchesLinksInQuirksMode().
81 2) Explicitely listing every attribute of SelectorFragment in fragmentOnlyMatchesLinksInQuirksMode()
82 was extremly fragile. When :not() and :-webkit-any() were added, we forgot to update the quirks
85 This patch moves the quirks mode exception code from the code generator to the Fragment generator.
86 The useless filters are no longer ignored for the quirks, and we don't need to update the quirks mode detection
87 with every change of SelectorFragment.
89 It is inefficient and ugly, but that is how that quirks is defined. It is only a problem for compilation,
90 execution time remains unchanged.
92 * cssjit/SelectorCompiler.cpp:
93 (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
94 (WebCore::SelectorCompiler::addPseudoClassType):
95 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
96 (WebCore::SelectorCompiler::pseudoClassOnlyMatchesLinksInQuirksMode):
97 (WebCore::SelectorCompiler::constructFragments):
98 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
99 (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode): Deleted.
101 2014-06-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
103 Need to check invalid scheme in navigator content utils
104 https://bugs.webkit.org/show_bug.cgi?id=133296
106 Reviewed by Darin Adler.
108 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
109 (WebCore::verifyProtocolHandlerScheme): Just fix a wrong typo.
111 2014-06-03 Timothy Horton <timothy_horton@apple.com>
113 WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
114 https://bugs.webkit.org/show_bug.cgi?id=133472
115 <rdar://problem/15686848>
117 Reviewed by Simon Fraser.
121 2014-06-03 Yoav Weiss <yoav@yoav.ws>
123 Refactor the srcset parser into its own file
124 https://bugs.webkit.org/show_bug.cgi?id=133480
126 Reviewed by Andreas Kling.
128 No new tests, since this patch doesn't change the parser's behavior.
130 This patch moves the srcset parser into its own file,
131 in order to prepare the code for alignment with recent spec changes.
134 * html/HTMLImageElement.cpp:
135 * html/parser/HTMLParserIdioms.cpp:
136 (WebCore::compareByScaleFactor): Deleted.
137 (WebCore::parseDescriptors): Deleted.
138 (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
139 (WebCore::bestFitSourceForImageAttributes): Deleted.
140 * html/parser/HTMLParserIdioms.h:
141 (WebCore::ImageWithScale::ImageWithScale): Deleted.
142 (WebCore::ImageWithScale::imageURL): Deleted.
143 (WebCore::ImageWithScale::scaleFactor): Deleted.
144 * html/parser/HTMLPreloadScanner.cpp:
145 * html/parser/HTMLSrcsetParser.cpp: Added.
146 (WebCore::compareByScaleFactor):
147 (WebCore::parseDescriptors):
148 (WebCore::parseImagesWithScaleFromSrcsetAttribute):
149 (WebCore::bestFitSourceForImageAttributes):
150 * html/parser/HTMLSrcsetParser.h: Added.
151 (WebCore::ImageWithScale::ImageWithScale):
152 (WebCore::ImageWithScale::imageURL):
153 (WebCore::ImageWithScale::scaleFactor):
155 2014-06-03 Mario Sanchez Prada <mario.prada@samsung.com>
157 [ATK] accessibility/textarea-selected-text-range.html is failing
158 https://bugs.webkit.org/show_bug.cgi?id=133479
160 Reviewed by Chris Fleizach.
162 Implement atk_text_set_caret_offset() in terms of
163 atk_text_set_selection() for zero-length selections.
165 No new tests needed, the following test should just start
166 passing again now: accessibility/textarea-selected-text-range.html.
168 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
169 (webkitAccessibleTextSetCaretOffset): Reimplemented this function
170 in terms of webkitAccessibleTextSetSelection().
172 2014-06-03 Alex Christensen <achristensen@webkit.org>
174 Corrected arm64 assertion in css jit.
176 Rubber stamped by Benjamin Poulain.
178 * cssjit/StackAllocator.h:
179 (WebCore::StackAllocator::pop):
180 Changed assertion from incorrectly matching x86_64 to using the correct minimum offset,
181 taking into account that a stackUnitInBytes is used for two registers on arm64
182 except the last stack unit, which could only be used for one register if there are
183 an odd number of registers.
185 2014-06-03 Benjamin Poulain <bpoulain@apple.com>
187 [iOS] Start ignoring common bogus viewport parameters
188 https://bugs.webkit.org/show_bug.cgi?id=133466
189 <rdar://problem/16203396>
191 Reviewed by Sam Weinig.
193 Incorrect viewports are spreading really quickly lately. We have to start ignoring
194 some combinations of arguments as they are almost always used incorrectly, causing
195 a poor user experience on those websites.
197 * dom/ViewportArguments.cpp:
198 (WebCore::finalizeViewportArguments):
200 2014-06-03 Yusuke Suzuki <utatane.tea@gmail.com>
202 CSS JIT: add support for the "any" pseudo class
203 https://bugs.webkit.org/show_bug.cgi?id=133473
205 Reviewed by Benjamin Poulain.
207 Add support for the :any pseudo class.
209 Test: fast/selectors/pseudo-class-any.html
211 * cssjit/SelectorCompiler.cpp:
212 (WebCore::SelectorCompiler::addPseudoClassType):
213 (WebCore::SelectorCompiler::minimumRegisterRequirements):
214 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
215 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesAnyPseudoClass):
217 2014-06-02 Jer Noble <jer.noble@apple.com>
219 Update PlatformTimeRanges to use MediaTime rather than doubles for time values.
220 https://bugs.webkit.org/show_bug.cgi?id=133454
222 Reviewed by Eric Carlson.
224 PlatformTimeRanges will now use MediaTime, so operations at the platform level won't
225 lose precision when converting to and from doubles and rational time values like CMTime.
227 * Modules/mediasource/SourceBuffer.cpp:
228 (WebCore::currentTimeFudgeFactor):
229 (WebCore::SourceBuffer::hasCurrentTime):
230 (WebCore::SourceBuffer::hasFutureTime):
231 (WebCore::SourceBuffer::canPlayThrough):
232 * html/HTMLMediaElement.cpp:
233 (WebCore::HTMLMediaElement::parseAttribute):
234 * html/TimeRanges.cpp:
235 (WebCore::TimeRanges::TimeRanges):
236 (WebCore::TimeRanges::start):
237 (WebCore::TimeRanges::end):
238 (WebCore::TimeRanges::add):
239 (WebCore::TimeRanges::contain):
240 (WebCore::TimeRanges::find):
241 (WebCore::TimeRanges::nearest):
242 (WebCore::TimeRanges::totalDuration):
243 * platform/graphics/MediaPlayerPrivate.h:
244 (WebCore::MediaPlayerPrivateInterface::seekable):
245 * platform/graphics/PlatformTimeRanges.cpp:
246 (WebCore::PlatformTimeRanges::create):
247 (WebCore::PlatformTimeRanges::PlatformTimeRanges):
248 (WebCore::PlatformTimeRanges::invert):
249 (WebCore::PlatformTimeRanges::start):
250 (WebCore::PlatformTimeRanges::end):
251 (WebCore::PlatformTimeRanges::add):
252 (WebCore::PlatformTimeRanges::contain):
253 (WebCore::PlatformTimeRanges::find):
254 (WebCore::PlatformTimeRanges::nearest):
255 (WebCore::PlatformTimeRanges::totalDuration):
256 * platform/graphics/PlatformTimeRanges.h:
257 (WebCore::PlatformTimeRanges::Range::Range):
258 (WebCore::PlatformTimeRanges::Range::isPointInRange):
259 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
260 (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
261 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
262 (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
263 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
264 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
265 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
266 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
267 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Deleted.
268 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
269 (WebCore::MediaPlayerPrivateQTKit::buffered):
270 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
271 (WebCore::MediaPlayerPrivateGStreamer::buffered):
272 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
273 (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
275 2014-06-03 Benjamin Poulain <bpoulain@apple.com>
277 [iOS][WK2] Align the highlight rects with device pixels
278 https://bugs.webkit.org/show_bug.cgi?id=133464
280 Reviewed by Enrica Casucci.
282 Add utility functions to pixel align points and rects.
285 * platform/graphics/FloatPoint.h:
286 (WebCore::flooredToDevicePixels):
287 (WebCore::ceiledToDevicePixels):
288 * platform/graphics/FloatRect.cpp:
289 (WebCore::enclosingRectExtendedToDevicePixels):
290 * platform/graphics/FloatRect.h:
292 2014-06-03 Timothy Horton <timothy_horton@apple.com>
294 Prepopulated tiles may never be unparented from TileGrids with aggressive tile retention on
295 https://bugs.webkit.org/show_bug.cgi?id=133471
297 Reviewed by Simon Fraser.
299 * platform/graphics/ca/mac/TileController.h:
300 * platform/graphics/ca/mac/TileGrid.h:
301 (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
302 * platform/graphics/ca/mac/TileGrid.mm:
303 (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
304 (WebCore::TileGrid::cohortRemovalTimerFired):
305 Factor timeUntilExpiration() out of cohortRemovalTimerFired().
307 (WebCore::TileGrid::revalidateTiles):
308 Ensure that secondary tiles that never touch the primary coverage rect
309 are still unparented eventually (after 2 seconds, the same lifetime we use
310 for cohorts in non-aggressive retention).
311 Schedule another revalidateTiles if we left parented secondary tiles behind.
313 2014-06-03 Timothy Horton <timothy_horton@apple.com>
315 TileGrid::prepopulateRect populates the wrong tiles if scale != 1
316 https://bugs.webkit.org/show_bug.cgi?id=133470
318 Reviewed by Simon Fraser.
320 * page/FrameView.cpp:
321 (WebCore::FrameView::requestScrollPositionUpdate):
322 * platform/graphics/ca/mac/TileGrid.mm:
323 (WebCore::TileGrid::prepopulateRect):
324 (WebCore::TileGrid::revalidateTiles):
325 prepopulateRect takes rects in "content" coordinates, but when later passed to
326 ensureTilesForRect, they're expected to be in the same coordinate space as the layer's
327 visible rect, and are scaled up. So, apply the inverse scale to counter that.
329 2014-06-03 Timothy Horton <timothy_horton@apple.com>
331 Minor TileCoverageMap refinements
332 https://bugs.webkit.org/show_bug.cgi?id=133468
334 Reviewed by Simon Fraser.
336 * platform/graphics/ca/mac/TileController.mm:
337 (WebCore::TileController::setContentsScale):
338 * platform/graphics/ca/mac/TileCoverageMap.h:
339 * platform/graphics/ca/mac/TileCoverageMap.mm:
340 (WebCore::TileCoverageMap::TileCoverageMap):
341 (WebCore::TileCoverageMap::setDeviceScaleFactor):
342 Keep the TileCoverageMap's contentsScale at the device scale factor, so that it
343 looks sharp on non-1x displays.
345 (WebCore::TileCoverageMap::update):
346 Decrease the height available for the TileCoverageMap by the topContentInset;
347 it's already being vertically offset by the topContentInset, but the height was
348 not adjusted, so it would run off the bottom of the window.
350 * platform/graphics/ca/mac/TileGrid.mm:
351 (WebCore::TileGrid::drawTileMapContents):
352 If using aggressive tile retention (and thus not coloring tiles based on age),
353 dim tiles that aren't in the visible cohort.
355 2014-06-03 Timothy Horton <timothy_horton@apple.com>
357 Fix a typo, TileGrid::updateTilerLayerProperties
358 https://bugs.webkit.org/show_bug.cgi?id=133474
360 Reviewed by Anders Carlsson.
362 * platform/graphics/ca/mac/TileController.mm:
363 (WebCore::TileController::setAcceleratesDrawing):
364 (WebCore::TileController::setTilesOpaque):
365 (WebCore::TileController::setTileDebugBorderWidth):
366 (WebCore::TileController::setTileDebugBorderColor):
367 * platform/graphics/ca/mac/TileGrid.h:
368 * platform/graphics/ca/mac/TileGrid.mm:
369 (WebCore::TileGrid::updateTileLayerProperties):
370 (WebCore::TileGrid::updateTilerLayerProperties):
371 s/updateTilerLayerProperties/updateTileLayerProperties/g
373 2014-06-03 Carlos Garcia Campos <cgarcia@igalia.com>
375 [SOUP] ResourceLoadTiming.responseStart is always 0
376 https://bugs.webkit.org/show_bug.cgi?id=133469
378 Reviewed by Sergio Villar Senin.
380 * platform/network/soup/ResourceHandleSoup.cpp:
381 (WebCore::sendRequestCallback): Record the responseStart time.
383 2014-06-02 David Kilzer <ddkilzer@apple.com>
385 [iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error: use of undeclared identifier '_CFURLConnectionCopyTimingData'
386 <http://webkit.org/b/133445>
387 <rdar://problem/17090035>
389 Reviewed by Alexey Proskuryakov.
391 * platform/network/mac/ResourceHandleMac.mm: Attempt to fix the
392 build by including a private header and local declaration.
394 2014-05-31 Anders Carlsson <andersca@apple.com>
396 Change DeferrableOneShotTimer to use std::function instead of being a class template
397 https://bugs.webkit.org/show_bug.cgi?id=133423
399 Reviewed by Antti Koivisto.
401 Also, add a new constructor to DeferrableOneShotTimer that takes an std::function. Change the callback
402 to not pass a DeferrableOneShotTimer& anymore. Change the delay parameter to use std::chrono::milliseconds.
404 * css/CSSImageGeneratorValue.cpp:
405 (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
406 (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
407 * css/CSSImageGeneratorValue.h:
408 * html/HTMLPlugInImageElement.cpp:
409 (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
410 * html/HTMLPlugInImageElement.h:
411 * loader/cache/CachedResource.cpp:
412 (WebCore::deadDecodedDataDeletionIntervalForResourceType):
413 (WebCore::CachedResource::destroyDecodedDataIfNeeded):
414 (WebCore::CachedResource::decodedDataDeletionTimerFired):
415 * loader/cache/CachedResource.h:
416 * loader/cache/MemoryCache.cpp:
417 (WebCore::MemoryCache::MemoryCache):
418 * loader/cache/MemoryCache.h:
419 (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
420 (WebCore::MemoryCache::deadDecodedDataDeletionInterval):
422 (WebCore::Timer::Timer):
423 (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
424 * platform/graphics/cg/SubimageCacheWithTimer.cpp:
425 (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
426 * platform/graphics/cg/SubimageCacheWithTimer.h:
428 2014-06-02 Benjamin Poulain <benjamin@webkit.org>
430 Make pseudo element matching for style resolution more JIT friendly
431 https://bugs.webkit.org/show_bug.cgi?id=133441
433 Reviewed by Antti Koivisto.
435 Sharing pseudo elements is a complicated mess shared between the SelectorChecker
436 and the RuleCollector.
438 For compiling pseudo element matching, it would be best if all the complexity could
439 be moved to compile time instead of runtime. It is also preferable to keep the compiler
440 independant of the RuleCollector implementation's detail.
442 This patch is a first step toward that goal. The main objective here is to make
443 "dynamicPseudo" completely internal to the SelectorChecker.
444 This is mostly a mechanical change, it is likely PseudoElement matching could be simplified
445 further but that is not attempted here.
447 Test: fast/css/style-sharing-empty-rule-modification.html
449 * css/ElementRuleCollector.cpp:
450 (WebCore::ElementRuleCollector::ruleMatches):
451 The condition regarding pseudo element matching has been moved into SelectorChecker::match().
453 This creates an extra cost for querySelector(), but that should be fine since the vast majority
454 of selectors are JIT compiled and never use SelectorChecker in the first place.
456 (WebCore::ElementRuleCollector::collectMatchingRulesForList):
457 The loop is changed such that the tree marking (Style::setHasPseudoStyle) could be moved
460 The conditions about the security origin for getMatchedCSSRules() and the empty style rules
461 are moved prior to the call to ElementRuleCollector::ruleMatches(). This ensure we keep the same
462 behavior of not adding the pseudo style for empty rules (this could also help with tree marking
463 in general but empty rules are probably uncommon).
465 There is one behavior change from making this loop simpler: the SharingRules and StyleInvalidation
466 modes now update their ruleRange. It is useless but it is simpler.
468 * css/ElementRuleCollector.h:
469 * css/SelectorChecker.cpp:
470 (WebCore::SelectorChecker::matchRecursively):
471 The tree marking has been moved here.
473 * css/SelectorChecker.h:
474 (WebCore::SelectorChecker::match):
475 The pseudo element matching has been moved here.
477 * css/StyleResolver.h:
478 (WebCore::checkRegionSelector):
479 * dom/SelectorQuery.cpp:
480 (WebCore::SelectorDataList::selectorMatches):
482 2014-06-02 Jeremy Jones <jeremyj@apple.com>
484 Send external playback properties to fullscreen.
485 https://bugs.webkit.org/show_bug.cgi?id=133366
487 Reviewed by Simon Fraser.
489 Refactor property updates in WebVideoFullscreenModelMediaElement and update
490 setExternalPlayback on webkitcurrentplaybacktargetiswirelesschangedEvent.
492 * WebCore.exp.in: Add export for setExternalPlayback.
493 * platform/ios/WebVideoFullscreenInterface.h: add setExternalPlayback
494 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: add setExternalPlayback
495 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
496 (-[WebAVPlayerController isPlayingOnExternalScreen]): added
497 (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): added
498 (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): added
499 (WebVideoFullscreenInterfaceAVKit::enterFullscreen): added
500 * platform/ios/WebVideoFullscreenModelMediaElement.h: add updateForEventName
501 * platform/ios/WebVideoFullscreenModelMediaElement.mm:
502 (WebVideoFullscreenModelMediaElement::setMediaElement): refactor property changes into updateForEventName()
503 (WebVideoFullscreenModelMediaElement::handleEvent): refactor property changes into updateForEventName()
504 (WebVideoFullscreenModelMediaElement::updateForEventName): remove duplicate code, implement for setExternalPlayback
506 2014-06-02 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
508 WebCore build fix for webreplay
509 https://bugs.webkit.org/show_bug.cgi?id=133401
511 Reviewed by Darin Adler.
513 * replay/MemoizedDOMResult.cpp:
514 (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
515 Add a default nullptr return in order to avoid a gcc warning.
516 The warning is because of a non-void method that has a case which doesn't return.
517 * replay/ReplayController.cpp:
518 (WebCore::ReplayController::setForceDeterministicSettings):
519 Guard the ScrollingCoordinator with the appropriate #ifdef.
520 * replay/SerializationMethods.cpp:
521 Guard the KeypressCommand with COCOA as it is only present there.
523 2014-06-02 Jer Noble <jer.noble@apple.com>
525 Further unreviewed GTK build fix after r169536.
527 Update the m_duration contructor in MediaSourceGStreamer.
529 * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
530 (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
532 2014-06-02 Jer Noble <jer.noble@apple.com>
534 Unreviewed GTK build fix after r169536.
536 Update MediaSourceGStreamer to match new duration parameters.
538 * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
539 (WebCore::MediaSourceGStreamer::setDuration): Ditto.
540 * platform/graphics/gstreamer/MediaSourceGStreamer.h:
541 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
543 2014-06-02 Jer Noble <jer.noble@apple.com>
545 [MSE][Mac] Media does not generate 'ended' event when playing to duration.
546 https://bugs.webkit.org/show_bug.cgi?id=133452
548 Reviewed by Eric Carlson.
550 Add a boundaryTimeObserver to the AVSampleBufferRenderSynchronizer to detect when
551 playback crosses the duration boundary, and pause in that event. Also refuse to begin
552 playback if the currentTime is beyond the duration. Also, pause playback if duration
553 becomes less than currentTime.
555 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
556 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
557 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
558 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
559 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
560 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
561 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
563 Update MediaSource::duration() and ::setDuration() to take and give MediaTimes rather than doubles:
564 * Modules/mediasource/MediaSource.cpp:
565 (WebCore::MediaSource::duration): double -> MediaTime.
566 (WebCore::MediaSource::setDuration): Ditto.
567 (WebCore::MediaSource::streamEndedWithError): Ditto.
568 * platform/graphics/MediaSourcePrivate.h: Ditto.
569 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
570 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
571 (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Ditto.
572 (WebCore::MediaSourcePrivateAVFObjC::duration): Ditto.
573 (WebCore::MediaSourcePrivateAVFObjC::setDuration): Ditto.
574 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
575 (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Ditto.
576 (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Ditto.
577 (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
578 (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
579 (WebCore::MockMediaPlayerMediaSource::updateDuration): Ditto.
580 * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
581 * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
582 (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Ditto.
583 (WebCore::MockMediaSourcePrivate::duration): Ditto.
584 (WebCore::MockMediaSourcePrivate::setDuration): Ditto.
585 * platform/mock/mediasource/MockMediaSourcePrivate.h:
587 2014-06-02 Zalan Bujtas <zalan@apple.com>
589 Rename ImagePaintingContext to ImagePaintingOptions.
590 https://bugs.webkit.org/show_bug.cgi?id=133451
592 Reviewed by Simon Fraser.
594 No change in functionality.
597 * html/HTMLCanvasElement.cpp:
598 (WebCore::HTMLCanvasElement::paint):
599 * html/canvas/CanvasRenderingContext2D.cpp:
600 (WebCore::CanvasRenderingContext2D::drawImage):
601 * platform/graphics/GraphicsContext.cpp:
602 (WebCore::GraphicsContext::drawImage):
603 (WebCore::GraphicsContext::drawTiledImage):
604 (WebCore::GraphicsContext::drawImageBuffer):
605 * platform/graphics/GraphicsContext.h:
606 (WebCore::ImagePaintingOptions::ImagePaintingOptions):
607 (WebCore::ImagePaintingContext::ImagePaintingContext): Deleted.
608 * rendering/RenderBoxModelObject.cpp:
609 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
610 * rendering/RenderEmbeddedObject.cpp:
611 (WebCore::RenderEmbeddedObject::paintSnapshotImage):
612 * rendering/RenderImage.cpp:
613 (WebCore::RenderImage::paintIntoRect):
614 * rendering/RenderSnapshottedPlugIn.cpp:
615 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
617 2014-05-31 Brent Fulgham <bfulgham@apple.com>
619 REGRESSION (r154622): Borders disappear when hovering over cells in table
620 https://bugs.webkit.org/show_bug.cgi?id=133057
621 <rdar://problem/15922359>
623 Reviewed by Tim Horton.
625 * rendering/RenderTableCell.cpp:
626 (WebCore::RenderTableCell::paintCollapsedBorders): Revert recent
627 non-edge collapsed border optimization due to drawing
630 2014-06-02 Zalan Bujtas <zalan@apple.com>
632 Provide better encapsulation for image related painting properties.
633 https://bugs.webkit.org/show_bug.cgi?id=133434
635 Reviewed by Darin Adler.
637 Image related drawing property list keeps growing for the functions below and results in
638 multiple overloadings with seemingly random default parameters.
640 GraphicsContext::drawImage()
641 GraphicsContext::drawTiledImage()
642 GraphicsContext::drawImageBuffer()
644 This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
645 introducing a new property does not result in yet another overloaded function.
647 No change in functionality.
650 * html/HTMLCanvasElement.cpp:
651 (WebCore::HTMLCanvasElement::paint):
652 * html/canvas/CanvasRenderingContext2D.cpp:
653 (WebCore::CanvasRenderingContext2D::drawImage):
654 (WebCore::CanvasRenderingContext2D::compositeBuffer):
655 * platform/graphics/GraphicsContext.cpp:
656 (WebCore::GraphicsContext::drawImage):
657 (WebCore::GraphicsContext::drawTiledImage):
658 (WebCore::GraphicsContext::drawImageBuffer):
659 * platform/graphics/GraphicsContext.h:
660 (WebCore::ImagePaintingContext::ImagePaintingContext):
661 * platform/graphics/ShadowBlur.cpp:
662 (WebCore::ShadowBlur::endShadowLayer):
663 * platform/graphics/cairo/ImageBufferCairo.cpp:
664 (WebCore::ImageBuffer::draw):
665 * platform/graphics/filters/FEComposite.cpp:
666 (WebCore::FEComposite::platformApplySoftware):
667 * rendering/FilterEffectRenderer.cpp:
668 (WebCore::FilterEffectRendererHelper::applyFilterEffect):
669 * rendering/RenderBoxModelObject.cpp:
670 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
671 * rendering/RenderEmbeddedObject.cpp:
672 (WebCore::RenderEmbeddedObject::paintSnapshotImage):
673 * rendering/RenderImage.cpp:
674 (WebCore::RenderImage::paintReplaced):
675 (WebCore::RenderImage::paintIntoRect):
676 * rendering/RenderSnapshottedPlugIn.cpp:
677 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
679 2014-06-02 Commit Queue <commit-queue@webkit.org>
681 Unreviewed, rolling out r169529.
682 https://bugs.webkit.org/show_bug.cgi?id=133447
684 caused assert in drawImage() (Requested by zalan on #webkit).
688 "Provide better encapsulation for image related painting
690 https://bugs.webkit.org/show_bug.cgi?id=133434
691 http://trac.webkit.org/changeset/169529
693 2014-06-02 Zalan Bujtas <zalan@apple.com>
695 Provide better encapsulation for image related painting properties.
696 https://bugs.webkit.org/show_bug.cgi?id=133434
698 Reviewed by Darin Adler.
700 Image related drawing property list keeps growing for the functions below and results in
701 multiple overloadings with seemingly random default parameters.
703 GraphicsContext::drawImage()
704 GraphicsContext::drawTiledImage()
705 GraphicsContext::drawImageBuffer()
707 This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
708 introducing a new property does not result in yet another overloaded function.
710 No change in functionality.
713 * html/HTMLCanvasElement.cpp:
714 (WebCore::HTMLCanvasElement::paint):
715 * html/canvas/CanvasRenderingContext2D.cpp:
716 (WebCore::CanvasRenderingContext2D::drawImage):
717 (WebCore::CanvasRenderingContext2D::compositeBuffer):
718 * platform/graphics/GraphicsContext.cpp:
719 (WebCore::GraphicsContext::drawImage):
720 (WebCore::GraphicsContext::drawTiledImage):
721 (WebCore::GraphicsContext::drawImageBuffer):
722 * platform/graphics/GraphicsContext.h:
723 (WebCore::ImagePaintingContext::ImagePaintingContext):
724 * platform/graphics/ShadowBlur.cpp:
725 (WebCore::ShadowBlur::endShadowLayer):
726 * platform/graphics/cairo/ImageBufferCairo.cpp:
727 (WebCore::ImageBuffer::draw):
728 * platform/graphics/filters/FEComposite.cpp:
729 (WebCore::FEComposite::platformApplySoftware):
730 * rendering/FilterEffectRenderer.cpp:
731 (WebCore::FilterEffectRendererHelper::applyFilterEffect):
732 * rendering/RenderBoxModelObject.cpp:
733 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
734 * rendering/RenderEmbeddedObject.cpp:
735 (WebCore::RenderEmbeddedObject::paintSnapshotImage):
736 * rendering/RenderImage.cpp:
737 (WebCore::RenderImage::paintReplaced):
738 (WebCore::RenderImage::paintIntoRect):
739 * rendering/RenderSnapshottedPlugIn.cpp:
740 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
742 2014-06-02 Kiran <kiran.guduru@samsung.com>
744 Add mock DTMFSender support.
745 https://bugs.webkit.org/show_bug.cgi?id=133298
747 Reviewed by Eric Carlson.
749 Implemented mock implementation for RTCPeerConnectionHandler. Now creating
750 RTCDTMFSenderHandlerMock and returning while creating DTMFSender instead of
753 Test: fast/mediastream/RTCPeerConnection-dtmf.html.
756 * platform/mock/RTCDTMFSenderHandlerMock.cpp: Added.
757 (WebCore::RTCDTMFSenderHandlerMock::RTCDTMFSenderHandlerMock):
758 (WebCore::RTCDTMFSenderHandlerMock::setClient):
759 (WebCore::RTCDTMFSenderHandlerMock::insertDTMF):
760 * platform/mock/RTCDTMFSenderHandlerMock.h: Added.
761 * platform/mock/RTCPeerConnectionHandlerMock.cpp:
762 (WebCore::RTCPeerConnectionHandlerMock::createDTMFSender):
764 2014-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com>
766 [GTK] media controls should prevent 'click' events from reaching the page
767 https://bugs.webkit.org/show_bug.cgi?id=133402
769 Reviewed by Eric Carlson.
771 When handling events, we events we need to return true in order
772 that the superclass gets the value and prevents the execution of
773 the default event handler in the page.
775 Test: media/media-controls-cancel-events.html
777 * Modules/mediacontrols/mediaControlsGtk.js:
778 (ControllerGtk.prototype.handleMuteButtonMouseOver):
779 (ControllerGtk.prototype.handleVolumeBoxMouseOut):
780 (ControllerGtk.prototype.handleCaptionButtonClicked):
781 (ControllerGtk.prototype.handleCaptionButtonMouseOver):
782 (ControllerGtk.prototype.handleCaptionButtonShowMenu):
783 (ControllerGtk.prototype.handleCaptionButtonMouseOut):
784 (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
785 prevent forwarding the event execution.
787 2014-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
789 CSS JIT: add support for the "not" pseudo class
790 https://bugs.webkit.org/show_bug.cgi?id=133314
792 Reviewed by Benjamin Poulain.
794 Add :not pseudo class support to CSS JIT. Current implementation
795 doesn't support visitedMatchType. So when link pseudo class appears in
796 :not sub fragment, fallback to the non-JIT implementation.
798 Tests: fast/selectors/not-active-hover-quirks.html
799 fast/selectors/not-active-hover-strict.html
800 fast/selectors/pseudo-class-not.html
802 * cssjit/SelectorCompiler.cpp:
803 (WebCore::SelectorCompiler::addPseudoClassType):
804 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
805 (WebCore::SelectorCompiler::constructFragments):
806 (WebCore::SelectorCompiler::minimumRegisterRequirements):
807 (WebCore::SelectorCompiler::computeBacktrackingInformation):
808 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
809 (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
810 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
811 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
812 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
813 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
814 (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): Deleted.
816 2014-06-01 Jer Noble <jer.noble@apple.com>
818 [MSE] Appends of overlapping sample data do not clear existing samples properly.
819 https://bugs.webkit.org/show_bug.cgi?id=133435
821 Reviewed by Darin Adler.
823 Test: media/media-source/media-source-overlapping-append.html
825 The MSE spec has a spec error in how it removes overlapping frames. The intention seems to be
826 to check for overlapping samples only when the incoming sample increases the highest presentation time
827 field. But due to a mismatch in the range of a sample, defined as [start, end), and the check, which
828 treats the end as inclusive, the overlapping check is almost never run.
830 Add the sample comparison logic to match [start, end) ranges, and rename the existing check to differentiate
832 * Modules/mediasource/SampleMap.cpp:
833 (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()):
834 (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
835 (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
836 (WebCore::SampleMap::findSamplesWithinPresentationRange):
837 * Modules/mediasource/SampleMap.h:
839 Update the overlapping check to occur whenever the highest presentation time increases, and update the
840 logic within that check to catch all overlapping frames.
841 * Modules/mediasource/SourceBuffer.cpp:
842 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
843 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
844 (WebCore::SourceBuffer::bufferedSamplesForTrackID):
845 * Modules/mediasource/SourceBuffer.h:
848 Add a dump method to MediaSample so that samples can be easily converted to a string for testing.
849 * platform/MediaSample.h:
850 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
851 (WebCore::MediaSampleAVFObjC::presentationSize):
852 (WebCore::MediaSampleAVFObjC::dump):
854 Update the Mock MSE implementation to pass along a "generation" field, to aid in testing.
855 * platform/mock/mediasource/MockBox.cpp:
856 (WebCore::MockSampleBox::MockSampleBox):
857 * platform/mock/mediasource/MockBox.h:
858 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
859 (WebCore::MockMediaSample::dump):
861 Add a method to internals to dump the buffered samples to string.
862 * Modules/mediasource/SourceBuffer.cpp:
863 (WebCore::SourceBuffer::bufferedSamplesForTrackID):
864 * Modules/mediasource/SourceBuffer.h:
865 * testing/Internals.cpp:
866 (WebCore::Internals::bufferedSamplesForTrackID):
867 * testing/Internals.h:
868 * testing/Internals.idl:
870 2014-06-01 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
872 getBBox() returns (0,0) when width or height is zero.
873 https://bugs.webkit.org/show_bug.cgi?id=93290
875 Reviewed by Philip Rogers.
877 The SVG spec states that a width or height of zero for rects, circles and
878 ellipses is valid but disables rendering of that shape.
879 In this case, getBBox() should return the actual bounding box of the element.
880 Previously, WebKit always returned (0,0,0,0) rather than the
881 correct bounding box. This patch fixes that.
883 Rects and ellipses both now follow the same behaviour where
884 the fall-back code path is only used when the shape will render (e.g. not
885 when a dimension <= 0).
887 This necessitates calling calculateRadiiAndCenter for ellipses even
888 when the calculated values will be discarded in the fall back code path.
889 But calculateRadiiAndCenter is cheap and this avoids making changes
890 elsewhere to stop CG drawing a zero width (or height) ellipse.
892 Tests: svg/custom/getBBox-js-circle-zerodimension.html
893 svg/custom/getBBox-js-ellipse-zerodimension.html
894 svg/custom/getBBox-js-rect-zerodimension.html
896 * rendering/svg/RenderSVGEllipse.cpp:
897 (WebCore::RenderSVGEllipse::updateShapeFromElement):
898 Only follow fall-back code path when shape renders.
899 width||height==0 is not an error case so calculate bounding box.
901 * rendering/svg/RenderSVGRect.cpp:
902 (WebCore::RenderSVGRect::updateShapeFromElement):
903 Only follow fall-back code path when shape renders.
904 rx||ry==0 is not an error case so calculate bounding box.
906 2014-06-01 Simon Fraser <simon.fraser@apple.com>
908 Don't scroll to non-integral scroll offsets
909 https://bugs.webkit.org/show_bug.cgi?id=133436
910 <rdar://problem/17088336>
912 Reviewed by Darin Adler.
914 With the gradual migration of scroll offsets to floating point, we ended
915 up with a fully floating point code path been event scroll deltas and
916 setting scroll positions in the scrolling tree.
918 With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
919 come in with non-integral values, and that caused the scroll offset to be non-integral,
920 resulting in fuzzy layer contents. So round the scroll position.
922 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
923 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
925 2014-05-31 Anders Carlsson <andersca@apple.com>
927 Add a LazyNeverDestroyed class template and use it
928 https://bugs.webkit.org/show_bug.cgi?id=133425
930 Reviewed by Darin Adler.
932 * Modules/webdatabase/DatabaseBackendBase.cpp:
933 (WebCore::guidMutex):
934 * crypto/CryptoAlgorithmRegistry.cpp:
935 (WebCore::registryMutex):
936 * inspector/WorkerDebuggerAgent.cpp:
937 * loader/CrossOriginAccessControl.cpp:
938 (WebCore::isOnAccessControlResponseHeaderWhitelist):
939 * platform/network/NetworkStateNotifier.cpp:
940 (WebCore::networkStateNotifier):
941 * workers/DefaultSharedWorkerRepository.cpp:
942 (WebCore::DefaultSharedWorkerRepository::instance):
943 * workers/DefaultSharedWorkerRepository.h:
944 * workers/WorkerThread.cpp:
945 (WebCore::threadSetMutex):
946 * xml/XMLHttpRequest.cpp:
947 (WebCore::staticData):
949 2014-06-01 Zalan Bujtas <zalan@apple.com>
951 Subpixel rendering: Selection gap produces a pixel line overlap on inline boxes.
952 https://bugs.webkit.org/show_bug.cgi?id=133429
954 Reviewed by Simon Fraser.
956 Do not floor logical right/left values when selection gap is calculated for RenderBlocks.
957 It produces overlapping line/gap because the floored value is intersecting/too far from the
958 non-floored content selection rect.
960 Tests: fast/inline/hidpi-selection-gap-and-inline-selection-have-gap-rtl.html
961 fast/inline/hidpi-selection-gap-overlaps-inline-selection.html
963 * rendering/RenderBlock.cpp:
964 (WebCore::RenderBlock::logicalLeftSelectionGap):
965 (WebCore::RenderBlock::logicalRightSelectionGap):
967 2014-05-31 Timothy Horton <timothy_horton@apple.com>
969 REGRESSION (r169412): Garbage pixels when vertical rubber-banding on http://yvoschaap.com/pmarca/
970 https://bugs.webkit.org/show_bug.cgi?id=133418
971 <rdar://problem/17065494>
973 Reviewed by Sam Weinig.
976 * platform/graphics/FloatPoint.h:
977 (WebCore::toFloatPoint):
978 * platform/graphics/Image.cpp:
979 (WebCore::Image::drawTiled):
980 The manual tiling code previously adjusted the initial
981 tiling source rect so that if the pattern was out of phase,
982 the first row and column would paint only the necessary part
983 of the tile. However, it did not also adjust the destination rect,
984 so the tile was painted in entirely the wrong place.
985 Additional testing (by enabling manual tiling mode for all patterned
986 images and running all of the layout tests) exposed another bug
987 where the last row and column would paint too much, which
988 was resolved by clipping to the outer image's destination rect.
990 2014-05-31 Benjamin Poulain <benjamin@webkit.org>
992 CSS JIT cleanup: move two utility functions out of the properties-matcher section
993 https://bugs.webkit.org/show_bug.cgi?id=133427
995 Reviewed by Andreas Kling.
997 Just move the code, no other modification.
999 * cssjit/SelectorCompiler.cpp:
1000 (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
1001 (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
1003 2014-05-31 Darin Adler <darin@apple.com>
1005 Viewport percentage tests that resize the viewport are flaky
1006 https://bugs.webkit.org/show_bug.cgi?id=133351
1008 Reviewed by Anders Carlsson.
1010 * page/FrameView.cpp:
1011 (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
1012 The resize event will be sent as a side effect of layout instead.
1013 (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
1014 since this is what propagates the new geometry in so the JavaScript code can detect it. Also
1015 simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
1016 the code enqueues an event for an unknown time in the future. Removed the unneeded code that
1017 passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
1020 2014-05-31 Anders Carlsson <andersca@apple.com>
1022 Don't use std::mutex::try_lock to check if we own a mutex
1023 https://bugs.webkit.org/show_bug.cgi?id=133421
1025 Reviewed by Dan Bernstein.
1027 According the C++ standard, calling try_lock on a mutex that's already owned by the current thread
1028 is undefined behavior, so don't do that.
1030 * Modules/webdatabase/DatabaseBackendBase.cpp:
1031 (WebCore::guidToVersionMap):
1032 (WebCore::updateGuidVersionMap):
1033 (WebCore::guidToDatabaseMap):
1034 (WebCore::guidForOriginAndName):
1036 2014-05-30 Enrica Casucci <enrica@apple.com>
1038 REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
1039 https://bugs.webkit.org/show_bug.cgi?id=133413
1040 <rdar://problem/16948333>
1042 Reviewed by Benjamin Poulain.
1044 Adding utility functions and their exports.
1047 * editing/TextIterator.cpp:
1048 (WebCore::plainTextReplacingNoBreakSpace):
1049 * editing/TextIterator.h:
1050 * editing/VisibleUnits.cpp:
1051 (WebCore::charactersAroundPosition):
1052 (WebCore::characterBeforePosition): Deleted.
1053 * editing/VisibleUnits.h:
1055 2014-05-30 Zalan Bujtas <zalan@apple.com>
1057 Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage*
1058 https://bugs.webkit.org/show_bug.cgi?id=133407
1060 Reviewed by Darin Adler.
1062 Add helper class to set/reset image interpolation quality value.
1064 No change in functionality.
1066 * platform/graphics/GraphicsContext.cpp:
1067 (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
1068 (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
1069 (WebCore::GraphicsContext::drawImage):
1070 (WebCore::GraphicsContext::drawTiledImage):
1071 (WebCore::GraphicsContext::drawImageBuffer):
1073 2014-05-30 Myles C. Maxfield <mmaxfield@apple.com>
1075 Support -apple-system-font on OS X
1076 https://bugs.webkit.org/show_bug.cgi?id=133382
1078 Addressing post-review comments.
1080 * platform/mac/WebFontCache.mm:
1081 (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
1083 2014-05-30 Prashant Hiremath <hiremathprashants@gmail.com>
1085 Remove repetitive header in HTMLInputElement.cpp
1086 https://bugs.webkit.org/show_bug.cgi?id=133376
1088 Reviewed by Anders Carlsson.
1090 It is just removal repeative headers hence no test needed.
1092 * html/HTMLInputElement.cpp:
1094 2014-05-30 Zalan Bujtas <zalan@apple.com>
1096 Remove redundant GraphicsContext::drawImage() function.
1097 https://bugs.webkit.org/show_bug.cgi?id=133347
1099 Reviewed by Simon Fraser.
1101 There are 2 GraphicsContext::drawImage functions with very similar parameter list. This looks
1102 to be a source of confusion and results in passing unneeded parameters.
1104 No change in functionality.
1106 * html/canvas/CanvasRenderingContext2D.cpp:
1107 (WebCore::CanvasRenderingContext2D::drawImage):
1108 (WebCore::drawImageToContext):
1109 * platform/graphics/GraphicsContext.cpp:
1110 (WebCore::GraphicsContext::drawImage):
1111 * platform/graphics/GraphicsContext.h:
1112 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1113 (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1114 * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1115 (WebCore::BitmapTextureImageBuffer::updateContents):
1116 * rendering/RenderBoxModelObject.cpp:
1117 (WebCore::RenderBoxModelObject::paintNinePieceImage):
1119 2014-05-29 Alex Christensen <achristensen@webkit.org>
1121 Prepare css jit for arm64 and other architectures.
1122 https://bugs.webkit.org/show_bug.cgi?id=133394
1124 Reviewed by Benjamin Poulain.
1126 * cssjit/FunctionCall.h:
1127 (WebCore::FunctionCall::swapArguments):
1128 * cssjit/RegisterAllocator.h:
1129 Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
1130 * cssjit/SelectorCompiler.cpp:
1131 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1132 Added assertion to make sure there are enough registers.
1134 2014-05-29 Benjamin Poulain <benjamin@webkit.org>
1136 CSS JIT: add support for the pseudo classes :hover and :active
1137 https://bugs.webkit.org/show_bug.cgi?id=133295
1139 Reviewed by Andreas Kling.
1141 This patch adds compilation support for :hover and :active. The code generation of both of them is trivial,
1142 most of the patch is improving the infrastructure and safety.
1144 The document compatibility mode is moved to its own typed enum. This ensure the values are exclusives and
1145 the native type is known (unsigned char here). The values are changes to binary flags to take advantage of
1146 test-and-branch on ARM64 (not used explicitely, it is automatically generated by the MacroAssembler).
1148 The other important refactoring is the code updating the flags on RenderStyle::NonInheritedFlags.
1149 The code was duplicated in some places so it is move into its own function addFlagToElementStyleFromContext().
1151 The generators themself are very simple. First we check the quirks-mode exceptions, that is generally excluded
1152 at compile time because the conditions are almost never met, even in strict mode.
1153 Then we have two cases: style resolution and query selector. Almost everything is just function calls.
1155 * cssjit/SelectorCompiler.cpp:
1156 (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1157 (WebCore::SelectorCompiler::addPseudoClassType):
1158 (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagToElementStyleFromContext):
1159 (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
1160 (WebCore::SelectorCompiler::getDocument):
1161 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
1162 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1163 (WebCore::SelectorCompiler::elementIsActive):
1164 (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
1165 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1166 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1167 (WebCore::SelectorCompiler::elementIsHovered):
1168 (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
1169 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1170 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1171 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1172 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1174 (WebCore::Document::Document):
1175 (WebCore::Document::setCompatibilityMode):
1176 (WebCore::Document::implicitOpen):
1177 (WebCore::Document::cloneDataFromDocument):
1179 (WebCore::Document::compatibilityModeMemoryOffset):
1180 (WebCore::Document::inQuirksMode):
1181 (WebCore::Document::inLimitedQuirksMode):
1182 (WebCore::Document::inNoQuirksMode):
1183 (WebCore::Document::compatibilityMode): Deleted.
1184 * html/ImageDocument.cpp:
1185 (WebCore::ImageDocument::ImageDocument):
1186 * html/MediaDocument.cpp:
1187 (WebCore::MediaDocument::MediaDocument):
1188 * html/PluginDocument.cpp:
1189 (WebCore::PluginDocument::PluginDocument):
1190 * html/TextDocument.cpp:
1191 (WebCore::TextDocument::TextDocument):
1192 * html/parser/HTMLConstructionSite.cpp:
1193 (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
1194 (WebCore::HTMLConstructionSite::setCompatibilityMode):
1195 (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
1196 (WebCore::HTMLConstructionSite::insertDoctype):
1197 * html/parser/HTMLConstructionSite.h:
1198 * loader/DocumentWriter.cpp:
1199 (WebCore::DocumentWriter::replaceDocument):
1200 * loader/SinkDocument.cpp:
1201 (WebCore::SinkDocument::SinkDocument):
1202 * page/ios/FrameIOS.mm:
1203 (WebCore::Frame::initWithSimpleHTMLDocument):
1204 * rendering/style/RenderStyle.h:
1206 2014-05-28 Jon Honeycutt <jhoneycutt@apple.com>
1208 Roll r168668 back in.
1210 <https://bugs.webkit.org/show_bug.cgi?id=132621>
1212 Reviewed by Brent Fulgham.
1214 Tests: fast/events/beforeload-assertion.html
1215 fast/events/beforeload-iframe-crash.html
1216 fast/events/beforeload-input-time-crash.html
1220 (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1222 * html/HTMLAppletElement.cpp:
1223 (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
1224 * html/HTMLEmbedElement.cpp:
1225 (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
1226 * html/HTMLObjectElement.cpp:
1227 (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
1228 * page/FrameView.cpp:
1229 (WebCore::FrameView::FrameView):
1230 (WebCore::FrameView::reset):
1231 (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
1232 (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
1233 (WebCore::FrameView::performPostLayoutTasks):
1235 * testing/Internals.cpp:
1236 (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
1237 * testing/Internals.h:
1238 * testing/Internals.idl:
1240 2014-05-29 Myles C. Maxfield <mmaxfield@apple.com>
1242 Support -apple-system-font on OS X
1243 https://bugs.webkit.org/show_bug.cgi?id=133382
1245 Reviewed by Simon Fraser.
1247 Guard on both family names: "-apple-system-font" and "-webkit-system-font"
1249 Test: platform/mac/fast/text/systemFont.html
1251 * platform/mac/WebFontCache.mm:
1252 (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
1254 2014-05-29 Alexey Proskuryakov <ap@apple.com>
1256 Loading <object> from WebArchive crashes
1257 https://bugs.webkit.org/show_bug.cgi?id=133386
1258 <rdar://problem/13345509>
1260 Reviewed by Brady Eidson.
1262 Test: webarchive/loading/object.html
1264 This (a) fixes the crash, and (b) avoids the crash.
1266 * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy):
1267 Some types of substitute data - such as WebArchive - don't contain HTTP result codes,
1268 so let's not drop to <object> fallback content when status is 0.
1269 And if the load somehow failed anyway, don't crash by trying to deliver substitute data
1270 to a finished loader.
1272 2014-05-29 Alex Christensen <achristensen@webkit.org>
1274 [iOS WebGL] Fix depth buffer clearing issue.
1275 https://bugs.webkit.org/show_bug.cgi?id=133388
1277 Reviewed by Dean Jackson.
1279 No new tests, but this fixes webgl/1.0.1/conformance/canvas/buffer-preserve-test.html.
1281 * platform/graphics/mac/WebGLLayer.mm:
1282 (-[WebGLLayer display]):
1283 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1284 (WebCore::GraphicsContext3D::prepareTexture):
1285 Moved marking the layer as composited from the mac-only prepareTexture to
1286 the end of [WebGLLayer display] which is called by mac and iOS.
1288 2014-05-29 Jeremy Jones <jeremyj@apple.com>
1290 Perserve caption selection in fullscreen.
1291 https://bugs.webkit.org/show_bug.cgi?id=133350
1293 Reviewed by Eric Carlson.
1295 Use the logic from the inline player to calculate the selected caption index.
1297 * html/HTMLMediaElement.h:
1298 (WebCore::HTMLMediaElement::mediaControlsHost):
1299 Expose mediaControlsHost() for use by WebVideoFullscreenModelMediaElement.
1301 * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1302 (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
1303 Use logic from buildCaptionsMenu from mediaControlsApple.js.
1305 2014-05-29 Jeremy Jones <jeremyj@apple.com>
1307 Use correct version of requiresFullscreenForVideoPlayback().
1308 https://bugs.webkit.org/show_bug.cgi?id=133331
1310 Reviewed by Eric Carlson.
1312 Test: media/video-fullscreeen-only-controls.html
1314 Update the last place not yet using m_mediaSession->requiresFullscreenForVideoPlayback.
1316 * html/HTMLMediaElement.cpp:
1317 (WebCore::HTMLMediaElement::parseAttribute):
1318 switch to media session version for requriesFullscreenForVideoPlayback.
1320 2014-05-29 Carlos Garcia Campos <cgarcia@igalia.com>
1322 [GTK] Add support for HiDPI icons
1323 https://bugs.webkit.org/show_bug.cgi?id=133377
1325 Reviewed by Martin Robinson.
1327 Use the GTK+ missing icon at 16 or 32 size depending on the device
1330 * platform/graphics/gtk/ImageGtk.cpp:
1331 (WebCore::loadMissingImageIconFromTheme):
1332 (WebCore::Image::loadPlatformResource):
1334 2014-05-29 Owen Taylor <otaylor@redhat.com>
1336 [GTK] Add HighDPI support for non-accelerated compositing contents
1337 https://bugs.webkit.org/show_bug.cgi?id=131562
1339 Reviewed by Anders Carlsson.
1341 No new tests. This will be tested once we have the proper dependencies in the WebKit testing
1344 * platform/cairo/WidgetBackingStore.h:
1345 (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
1346 * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
1347 * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
1348 * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
1349 * platform/graphics/cairo/CairoUtilities.h:
1350 * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
1351 * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
1352 * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
1354 2014-05-28 Brent Fulgham <bfulgham@apple.com>
1356 Captions during HLS playback flash/are difficult to readily
1357 https://bugs.webkit.org/show_bug.cgi?id=133365
1358 <rdar://problem/16584132>
1360 Reviewed by Eric Carlson.
1362 Correct two problems:
1363 1. Add new logic to handle cues that are identical to existing cues, except
1364 that they cover a slightly later moment in playback. For example, a cue
1365 encoding device might emit a cue at 24 fps, with many of the cues containing
1366 the same content but covering only 1/24th of a second.
1368 Rather than hiding and displaying our cues at the cue encoding rate, we should
1369 simply continue to display the same cue as long as the content is unchanged.
1370 2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
1371 VTTCue isEqual logic. This was done to avoid a false failure due to the cue
1372 type being 'generic' rather than 'vtt', but incorrectly treated cues with
1373 non-matching text as equal.
1375 * html/track/DataCue.cpp:
1376 (WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
1377 doesn't check that the 'type' of the cue is identical.
1378 (WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
1379 (WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
1380 * html/track/DataCue.h:
1381 * html/track/TextTrack.cpp:
1382 (WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
1384 * html/track/TextTrackCue.cpp:
1385 (WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
1386 that used to live in 'isEqual'.
1387 (WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
1388 (WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
1390 * html/track/TextTrackCue.h:
1391 * html/track/TextTrackCueGeneric.cpp:
1392 (WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
1393 code that used to live in 'isEqual'.
1394 (WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
1395 (WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
1397 * html/track/TextTrackCueGeneric.h:
1398 * html/track/VTTCue.cpp:
1399 (WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
1400 used to live in 'isEqual'.
1401 (WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
1402 (WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
1403 * html/track/VTTCue.h:
1405 2014-05-28 Oliver Hunt <oliver@apple.com>
1407 Whoops, update bindings tests results.
1409 2014-05-28 Oliver Hunt <oliver@apple.com>
1411 Make DOM properties exposed as instance properties use the base object instead of |this|
1412 https://bugs.webkit.org/show_bug.cgi?id=133353
1414 Reviewed by Geoffrey Garen.
1416 Make the bindings generator emit code that uses the base object for
1417 a property, rather than the this object. This means that attributes
1418 that we need to be treated as instance properties will match their old
1419 instance-based behaviour.
1421 * bindings/scripts/CodeGeneratorJS.pm:
1422 (InterfaceRequiresAttributesOnInstanceForCompatibility):
1423 (InterfaceRequiresAttributesOnInstance):
1424 (GetCastingHelperForBaseObject):
1425 (GenerateImplementation):
1426 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1427 (WebCore::jsTestActiveDOMObjectExcitingAttr):
1428 * bindings/scripts/test/JS/JSTestException.cpp:
1429 (WebCore::jsTestExceptionName):
1430 * bindings/scripts/test/JS/JSTestInterface.cpp:
1431 (WebCore::jsTestInterfaceImplementsStr3):
1432 (WebCore::jsTestInterfaceSupplementalStr3):
1433 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1434 (WebCore::setJSTestInterfaceImplementsStr2):
1435 (WebCore::setJSTestInterfaceImplementsStr3):
1436 (WebCore::setJSTestInterfaceImplementsNode):
1437 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1438 (WebCore::setJSTestInterfaceSupplementalStr2):
1439 (WebCore::setJSTestInterfaceSupplementalStr3):
1440 (WebCore::setJSTestInterfaceSupplementalNode):
1441 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1442 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1443 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1444 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1445 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1446 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1447 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1448 (WebCore::jsTestTypedefsConstructorTestSubObj):
1449 (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1450 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1451 (WebCore::setJSTestTypedefsAttrWithGetterException):
1452 (WebCore::setJSTestTypedefsAttrWithSetterException):
1453 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1454 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1456 2014-05-28 Simon Fraser <simon.fraser@apple.com>
1458 [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
1459 https://bugs.webkit.org/show_bug.cgi?id=133352
1461 Reviewed by Tim Horton.
1463 When adjusting layers inside accelerated overflow-scroll, pass a delta
1464 down to descendant nodes. Fix behavior of sticky nodes inside fixed nodes
1465 inside overflow scroll (sticky should only be affected if the parent node
1466 is a scrolling node).
1468 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1469 (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange): Just remove
1471 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1472 (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): Remove .get()s.
1473 We never care about the cumulative delta here, because sticky nodes only respond to
1474 changes in their direct scrolling ancestors. Only adjust the layer if the parent
1475 is a scrolling node.
1477 2014-05-27 Chris Fleizach <cfleizach@apple.com>
1479 AX: WebKit does not recognize ARIA 1.1 tables
1480 https://bugs.webkit.org/show_bug.cgi?id=133163
1482 Reviewed by Darin Adler.
1484 The AXObjectCache code that determines which object to create based on the role needs to be token fallback aware.
1486 Test: accessibility/table-fallback-roles-expose-element-attributes.html
1488 * accessibility/AXObjectCache.cpp:
1489 (WebCore::nodeHasRole):
1491 2014-05-28 Radu Stavila <stavila@adobe.com>
1493 REGRESSION (r168046): Invalid layout in multicol
1494 https://bugs.webkit.org/show_bug.cgi?id=133322
1496 Reviewed by Antti Koivisto.
1498 In some situations, deleting the line boxes of a multicol element causes the line to region
1499 link to become invalid.
1501 Test: fast/multicol/newmulticol/multicol-inside-multicol.html
1503 * rendering/RenderFlowThread.cpp:
1504 (WebCore::RenderFlowThread::clearLinesToRegionMap):
1505 (WebCore::RenderFlowThread::deleteLines):
1506 (WebCore::RenderFlowThread::willBeDestroyed):
1507 * rendering/RenderFlowThread.h:
1509 2014-05-28 Ryuan Choi <ryuan.choi@samsung.com>
1511 Remove DocumentThreadableLoaderClient.h
1512 https://bugs.webkit.org/show_bug.cgi?id=133341
1514 Reviewed by Gyuyoung Kim.
1516 DocumentThreadableLoaderClient is not used anymore.
1519 * loader/DocumentThreadableLoader.cpp:
1520 (WebCore::DocumentThreadableLoader::redirectReceived):
1521 * loader/DocumentThreadableLoaderClient.h: Removed.
1522 * loader/ThreadableLoaderClient.h:
1523 (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient): Deleted.
1525 2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
1527 Unreviewed. Update GObject DOM bindings symbols file after r169017.
1529 * bindings/gobject/webkitdom.symbols: Add webkit_dom_navigator_get_hardware_concurrency.
1531 2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
1533 REGRESSION(r168868): [GTK] Element.offset* client* scroll* API changed
1534 https://bugs.webkit.org/show_bug.cgi?id=133313
1536 Reviewed by Philippe Normand.
1538 Keep old API that uses long also for GObject bindings.
1542 2014-05-27 Commit Queue <commit-queue@webkit.org>
1544 Unreviewed, rolling out r169400.
1545 https://bugs.webkit.org/show_bug.cgi?id=133338
1547 Broke the iOS build in
1548 LocalizedDateCache::calculateMaximumWidth() (Requested by smfr
1553 "SVG TextRuns do not always get RenderingContexts"
1554 https://bugs.webkit.org/show_bug.cgi?id=133198
1555 http://trac.webkit.org/changeset/169400
1557 2014-05-27 Timothy Horton <timothy_horton@apple.com>
1559 REGRESSION (Margin tiles): Background gradient on dom.spec.whatwg.org is very slow to render
1560 https://bugs.webkit.org/show_bug.cgi?id=133335
1561 <rdar://problem/17011392>
1563 Reviewed by Simon Fraser.
1565 * platform/graphics/Image.cpp:
1566 (WebCore::Image::drawTiled):
1567 Make cross-platform and use some iOS code which avoids patterned drawing when the pattern buffer
1568 would be very large. Instead, it calls draw() repeatedly over the pattern space, avoiding the allocation
1569 of a huge (in the case of bug 133335, nearly 2GB) buffer.
1571 2014-05-27 Simon Fraser <simon.fraser@apple.com>
1573 [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
1574 https://bugs.webkit.org/show_bug.cgi?id=133334
1575 <rdar://problem/16462535>
1577 Reviewed by Tim Horton.
1579 When the scroll position changes in an accelerated overflow-scroll element, we have
1580 to update child nodes in the scrolling tree for position:sticky. That requires a
1581 more generic ability to update the scrolling tree after some arbitrary zoom or
1582 scroll. To do this, we need to know the current fixed position rect, rather than
1583 having it passed in.
1585 So make the fixed position rect available from ScrollingTree, and make it possible
1586 to get the current scrollPosition() from any ScrollingTreeScrollingNode.
1588 Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
1589 and have it update descendant layers.
1591 Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
1592 constraints math, using the scroll position of the parent node if appropriate.
1594 * page/scrolling/ScrollingTree.h:
1595 * page/scrolling/ScrollingTreeScrollingNode.h:
1596 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1597 (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1598 * page/scrolling/ios/ScrollingTreeIOS.cpp:
1599 (WebCore::ScrollingTreeIOS::fixedPositionRect):
1600 * page/scrolling/ios/ScrollingTreeIOS.h:
1601 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1602 (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
1604 2014-05-27 Simon Fraser <simon.fraser@apple.com>
1606 Do some renaming in the scrolling tree
1607 https://bugs.webkit.org/show_bug.cgi?id=133333
1609 Reviewed by Tim Horton.
1611 Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
1612 since this goes deep and to indicate that it's about layer updating.
1614 Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
1615 this is the custom fixed-position rect that changes on zooming.
1617 * page/scrolling/ScrollingTree.cpp:
1618 (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
1619 * page/scrolling/ScrollingTree.h:
1620 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
1621 * page/scrolling/ScrollingTreeNode.h:
1622 * page/scrolling/ScrollingTreeScrollingNode.h:
1623 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
1624 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
1625 (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
1626 (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
1627 * page/scrolling/mac/ScrollingTreeFixedNode.h:
1628 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1629 (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
1630 (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange): Deleted.
1631 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1632 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1633 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
1634 * page/scrolling/mac/ScrollingTreeStickyNode.h:
1635 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1636 (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
1637 (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange): Deleted.
1639 2014-05-27 Simon Fraser <simon.fraser@apple.com>
1641 Instantiate a ScrollingTreeMac on Mac
1642 https://bugs.webkit.org/show_bug.cgi?id=133332
1644 Reviewed by Tim Horton.
1646 Mac previously instantiated a ThreadedScrollingTree, but this has no platform
1647 knowledge. To support future expansion, create a ScrollingTreeMac subclass and
1648 instantiate that on Mac.
1650 Also protect ScrollingCoordinatorMac in PLATFORM(MAC) #ifdefs and remove it from the
1651 EXCLUDED_SOURCE_FILE_NAMES list in the xcconfig file, following general trends.
1653 * Configurations/WebCore.xcconfig:
1654 * WebCore.xcodeproj/project.pbxproj:
1655 * page/scrolling/ThreadedScrollingTree.cpp:
1656 (WebCore::ThreadedScrollingTree::create): Deleted.
1657 * page/scrolling/ThreadedScrollingTree.h:
1658 * page/scrolling/mac/ScrollingCoordinatorMac.h:
1659 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1660 (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
1661 * page/scrolling/mac/ScrollingTreeMac.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
1662 (ScrollingTreeMac::create):
1663 (ScrollingTreeMac::ScrollingTreeMac):
1664 * page/scrolling/mac/ScrollingTreeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
1666 2014-05-27 Simon Fraser <simon.fraser@apple.com>
1668 Prepare for position:sticky support inside accelerated overflow-scroll with WK2
1669 https://bugs.webkit.org/show_bug.cgi?id=133329
1671 Reviewed by Tim Horton.
1673 RenderLayerCompositor::computeStickyViewportConstraints() was always using
1674 the viewport rect as the constraining rect for sticky position. This is not
1675 correct when inside overflow:scroll.
1677 Refactor code in RenderBoxModelObject to make getting the rect easy, and use
1678 it to compute the constraints.
1680 * rendering/RenderBoxModelObject.cpp:
1681 (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
1682 (WebCore::RenderBoxModelObject::stickyPositionOffset):
1683 * rendering/RenderBoxModelObject.h:
1684 * rendering/RenderLayerCompositor.cpp:
1685 (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1687 2014-05-27 Bem Jones-Bey <bjonesbe@adobe.com>
1689 vw/vh units used as font/line-height values don't scale with the viewport
1690 https://bugs.webkit.org/show_bug.cgi?id=87846
1692 Reviewed by Darin Adler.
1694 This patch moves the resolution of viewport units to style recalc
1695 time. Currently viewport units are left unresolved during style
1696 recalcs, which leads to many problems with viewport units. Moving the
1697 resolution will fix these problems, as well as reduce the plumbing
1700 This patch touches a lot of files since the valueForLength functions
1701 no longer need a RenderView. The interesting changes are in:
1703 - CSSToLengthConversionData -> CSSPrimitiveValue: for moving
1704 resolution to style recalc time.
1705 - Length / LengthFunctions: no longer needs to know about viewport
1707 - FrameView -> Document -> StyleResolver: for scheduling style recalcs
1710 Note that getComputedStyle will now return pixel values when viewport
1711 units are used. This behavior matches Firefox and the css3-cascade
1714 This is based on a Blink patch by timloh@chromium.org.
1716 Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
1717 css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
1718 css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
1719 css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
1720 css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html
1722 * WebCore.exp.in: Remove RenderView argument to floatValueForLength.
1723 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1724 (getAttributeSetForAccessibilityObject): Remove RenderView argument.
1725 * css/BasicShapeFunctions.cpp:
1726 (WebCore::convertToLength): Ditto.
1727 (WebCore::floatValueForCenterCoordinate): Ditto.
1728 * css/BasicShapeFunctions.h: Ditto.
1729 * css/CSSCalculationValue.cpp:
1730 (WebCore::unitCategory): Remove special handling for viewport units,
1731 as they get resolved to pixels.
1732 (WebCore::createCSS): Ditto.
1733 * css/CSSComputedStyleDeclaration.cpp:
1734 (WebCore::positionOffsetValue): Remove RendewView argument.
1735 (WebCore::getBorderRadiusCornerValues): Remove handling of viewport
1736 units, as they are already resolve to pixels here.
1737 (WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
1738 (WebCore::getBorderRadiusShorthandValue): Ditto.
1739 (WebCore::specifiedValueForGridTrackBreadth): Remove handling of
1740 viewport units, as they are already resolved to pixels here.
1741 (WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
1742 (WebCore::valueForGridTrackList): Ditto.
1743 (WebCore::lineHeightFromStyle): Ditto.
1744 (WebCore::ComputedStyleExtractor::propertyValue): Ditto.
1745 * css/CSSGradientValue.cpp:
1746 (WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
1747 CSSToLengthConversionData constructor.
1748 (WebCore::CSSRadialGradientValue::createGradient): Ditto.
1749 * css/CSSPrimitiveValue.cpp:
1750 (WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
1751 viewport units, as they get resolved to pixels.
1752 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
1753 (WebCore::CSSPrimitiveValue::init): Ditto.
1754 (WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
1756 (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
1757 handling of viewport units, since they get resolved to pixels.
1758 (WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
1759 * css/CSSPrimitiveValue.h:
1760 (WebCore::CSSPrimitiveValue::isLength): Remove special handling of
1761 viewport units, since they get resolved to pixels.
1762 * css/CSSPrimitiveValueMappings.h:
1763 (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
1764 * css/CSSToLengthConversionData.cpp:
1765 (WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
1766 conversion factor for viewport units to pixels. Note this does not
1767 set hasViewportUnits on the RenderStyle if computing the font
1768 size, because in the font size case, the RenderStyle is the
1769 parent's style, not the current renderer's style.
1770 (WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
1771 (WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
1772 (WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
1773 * css/CSSToLengthConversionData.h:
1774 (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
1775 RenderView parameter, and make RenderStyle non-const so that
1776 hasViewportUnits can be set on the Style..
1777 (WebCore::CSSToLengthConversionData::style): style is now non-const.
1778 (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
1779 RenderView argument.
1780 * css/CSSToStyleMap.cpp:
1781 (WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
1782 viewport units, as they are already resolved to pixels here.
1783 (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
1784 * css/DeprecatedStyleBuilder.cpp:
1785 (WebCore::ApplyPropertyLength::applyValue): Ditto.
1786 (WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
1787 (WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
1788 (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
1789 (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
1790 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
1791 (WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
1792 (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
1793 (WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
1794 * css/LengthFunctions.cpp:
1795 (WebCore::minimumIntValueForLength): Remove RenderView argument.
1796 (WebCore::intValueForLength): Remove RenderView argument and
1798 (WebCore::minimumValueForLength): Remove RenderView argument, and
1799 special handling of viewport units.
1800 (WebCore::valueForLength): Ditto.
1801 (WebCore::floatValueForLength): Ditto.
1802 (WebCore::floatSizeForLengthSize): Remove RenderView argument.
1803 * css/LengthFunctions.h: Ditto.
1804 * css/MediaQueryEvaluator.cpp:
1805 (WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
1806 CSSToLengthConversionData constuctor.
1807 * css/StyleResolver.cpp:
1808 (WebCore::StyleResolver::State::clear): Change to 0 arg constructor
1809 for CSSToLengthConversionData.
1810 (WebCore::StyleResolver::State::updateConversionData): In order to get
1811 the RenderView, we need to have a valid Element set on the state.
1812 Since this means that we need to set the conversion data in more
1813 places, move the contruction of conversion data into this helper
1815 (WebCore::StyleResolver::State::initElement): Make sure conversion
1817 (WebCore::StyleResolver::State::initForStyleResolve): Ditto.
1818 (WebCore::StyleResolver::State::setStyle): When the style is set, we
1819 need to make sure to update the conversion data.
1820 (WebCore::StyleResolver::styleForElement): If the style has viewport
1821 units, flage the document so that we can make sure to recalc the
1822 viewport unit values when the viewport is resized.
1823 (WebCore::StyleResolver::pseudoStyleForElement): Ditto.
1824 (WebCore::StyleResolver::updateFont): Make sure the font having
1825 viewport units updates the style.
1826 (WebCore::StyleResolver::convertToIntLength): Remove handling of
1827 viewport units, as they are resolved to pixels.
1828 (WebCore::StyleResolver::convertToFloatLength): Ditto.
1829 (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
1830 Invalidate the matched properties cache for styles with viewport
1831 units when the viewport is resized.
1832 (WebCore::createGridTrackBreadth): Remove handling of viewport units,
1833 as they are resolved to pixels.
1834 (WebCore::StyleResolver::applyProperty): Ditto.
1835 (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
1836 Rename to be less confusing, since it has nothing to do with
1838 (WebCore::StyleResolver::createFilterOperations): Remove handling of
1839 viewport units, as they are resolved to pixels.
1840 (WebCore::StyleResolver::affectedByViewportChange): Deleted.
1841 (WebCore::StyleResolver::viewportPercentageValue): Deleted.
1842 * css/StyleResolver.h:
1843 (WebCore::StyleResolver::State::State): C++11 cleanup: 0 -> nullptr.
1844 (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
1845 the font size is specified in viewport units.
1846 (WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
1847 (WebCore::StyleResolver::State::setStyle): Deleted.
1848 * css/TransformFunctions.cpp:
1849 (WebCore::convertToFloatLength): Remove handling of viewport units,
1850 since they are resolved to pixels.
1852 (WebCore::Document::Document): Add flag to determine if some style in
1853 the document has viewport units.
1854 (WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
1856 (WebCore::Document::updateViewportUnitsOnResize): Mark elements with
1857 viewport units for style recalc when the viewport size has
1860 (WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
1861 if some style in the document has viewport units.
1862 (WebCore::Document::hasStyleWithViewportUnits): Ditto.
1863 * html/HTMLAreaElement.cpp:
1864 (WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
1865 * page/FrameView.cpp:
1866 (WebCore::FrameView::layout): When the viewport is resized, call
1867 updateViewportUnitsOnResize on the document.
1868 * platform/Length.h:
1869 (WebCore::Length::isSpecified): Remove handling of viewport units,
1870 since they are now resolved to pixels.
1871 (WebCore::Length::viewportPercentageLength): Deleted.
1872 (WebCore::Length::isViewportPercentage): Deleted.
1873 * rendering/ClipPathOperation.h:
1874 (WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
1875 RenderView argument.
1876 (WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
1877 * rendering/RenderBlock.cpp:
1878 (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
1879 handling of viewport units, since they get updated by
1880 updateViewportUnitsOnResize when the viewport is resized.
1881 (WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
1882 (WebCore::RenderBlock::lineHeight): Ditto.
1883 * rendering/RenderBox.cpp:
1884 (WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
1885 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1886 Remove handling of viewport units, as they are resolved to pixels.
1887 (WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
1888 (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
1889 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
1890 (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
1891 * rendering/RenderBox.h:
1892 * rendering/RenderBoxModelObject.cpp:
1893 (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
1894 RenderView argument.
1895 (WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
1896 handling of viewport units, as they are resolved to pixels.
1897 (WebCore::computeBorderImageSide): Remove RenderView argument.
1898 (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
1899 (WebCore::RenderBoxModelObject::paintBorder): Ditto.
1900 (WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
1901 * rendering/RenderElement.cpp:
1902 (WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
1903 * rendering/RenderElement.h:
1904 (WebCore::RenderElement::valueForLength): Remove unused
1905 roundPercentages argument.
1906 (WebCore::RenderElement::minimumValueForLength): Remove unused
1907 RoundPercentages and RenderView arguments.
1908 * rendering/RenderGrid.cpp:
1909 (WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
1910 units as they are resolved to pixels.
1911 * rendering/RenderInline.cpp:
1912 (WebCore::computeMargin): Ditto.
1913 (WebCore::RenderInline::lineHeight): Remove RenderView argument.
1914 * rendering/RenderLayer.cpp:
1915 (WebCore::RenderLayer::setupClipPath): Ditto.
1916 * rendering/RenderLineBreak.cpp:
1917 (WebCore::RenderLineBreak::lineHeight): Ditto.
1918 * rendering/RenderScrollbarPart.cpp:
1919 (WebCore::calcScrollbarThicknessUsing): Ditto.
1920 (WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
1921 (WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
1922 * rendering/RenderTable.cpp:
1923 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1924 Remove handling of viewport units, since they are resolved to
1926 (WebCore::RenderTable::computePreferredLogicalWidths): Now that
1927 viewport unit values are resolved to pixels at style recalc time,
1928 no special checking is needed to handle them, so update the
1929 comment to reflect that.
1930 * rendering/RenderThemeIOS.mm:
1931 (WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
1932 CSSToLengthConversionData constructor.
1933 (WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
1934 * rendering/RenderThemeMac.mm:
1935 (WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
1936 RenderView argument.
1937 * rendering/RenderView.cpp:
1938 (WebCore::RenderView::layout): Remove handling of viewport units,
1939 since they are resolved to pixels.
1940 * rendering/RootInlineBox.cpp:
1941 (WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
1943 * rendering/shapes/Shape.cpp:
1944 (WebCore::Shape::createShape): Remove RenderView argument.
1945 * rendering/shapes/Shape.h:
1946 * rendering/shapes/ShapeOutsideInfo.cpp:
1947 (WebCore::ShapeOutsideInfo::computedShape): Ditto.
1948 * rendering/style/BasicShapes.cpp:
1949 (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
1950 (WebCore::BasicShapeCircle::path): Ditto.
1951 (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
1952 (WebCore::BasicShapeEllipse::path): Ditto.
1953 (WebCore::BasicShapePolygon::path): Ditto.
1954 (WebCore::floatSizeForLengthSize): Ditto.
1955 (WebCore::BasicShapeInset::path): Ditto.
1956 * rendering/style/BasicShapes.h:
1957 * rendering/style/RenderStyle.cpp:
1958 (WebCore::calcRadiiFor): Ditto.
1959 (WebCore::RenderStyle::getRoundedBorderFor): Ditto.
1960 (WebCore::RenderStyle::computedLineHeight): Remove handling of
1961 viewport units since they are resolved to pixels.
1962 * rendering/style/RenderStyle.h:
1963 (WebCore::RenderStyle::setHasViewportUnits): Set if this style has
1964 a property set with viewport units.
1965 (WebCore::RenderStyle::hasViewportUnits): Ditto.
1966 * rendering/svg/RenderSVGRoot.cpp:
1967 (WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
1968 (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
1969 (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
1970 * rendering/svg/SVGRenderingContext.cpp:
1971 (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.
1973 2014-05-27 Zoltan Horvath <zoltan@webkit.org>
1975 [CSS Shapes] serialization of the computed value should omit the default radii
1976 https://bugs.webkit.org/show_bug.cgi?id=132747
1978 Reviewed by Darin Adler.
1980 We should omit closest-side value, whereever is possible. Specification:
1981 http://www.w3.org/TR/2014/CR-css-shapes-1-20140320/#basic-shape-computed-values
1982 This change aligns the behavior to the specification.
1984 Added new test cases for the shape-outside parsing tests.
1986 * css/CSSBasicShapes.cpp:
1987 (WebCore::buildCircleString):
1988 (WebCore::CSSBasicShapeCircle::cssText):
1989 (WebCore::CSSBasicShapeEllipse::cssText):
1991 2014-05-27 Commit Queue <commit-queue@webkit.org>
1993 Unreviewed, rolling out r169399.
1994 https://bugs.webkit.org/show_bug.cgi?id=133326
1996 Causes assertion failures in tests. See
1997 http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r169399%20(5622)/results.html
1998 (Requested by mlam on #webkit).
2002 "Caret's screen position does not update during an overflow
2004 https://bugs.webkit.org/show_bug.cgi?id=133256
2005 http://trac.webkit.org/changeset/169399
2007 2014-05-27 Myles C. Maxfield <mmaxfield@apple.com>
2009 Lists styled with SVG fonts are not rendered as expected
2010 https://bugs.webkit.org/show_bug.cgi?id=133198
2012 Reviewed by Simon Fraser.
2014 There were a couple places in RenderListMarker and RenderMenuList that were
2015 implicitly creating TextRuns by passing a String to a function which
2016 expected a TextRun. Because TextRun has a constructor which takes a single
2017 String and isn't marked explicit, TextRuns were being created without
2018 any of the associated code that initializes the TextRun (such as creating
2019 a RenderingContext if necessary).
2021 This patch marks the aforementioned constructor as "explicit" to discourage
2022 such behavior in the future.
2024 Test: svg/custom/list-items-with-svg-font-family.html
2026 * platform/graphics/TextRun.h:
2027 (WebCore::TextRun::TextRun): Mark constructors as explicit.
2028 * rendering/RenderListMarker.cpp:
2029 (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
2030 RenderBlock::constructTextRun.
2031 (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
2032 * rendering/RenderMenuList.cpp:
2033 (RenderMenuList::updateOptionsWidth): Ditto.
2035 2014-05-23 Myles C. Maxfield <mmaxfield@apple.com>
2037 Caret's screen position does not update during an overflow scroll
2038 https://bugs.webkit.org/show_bug.cgi?id=133256
2040 Reviewed by Simon Fraser.
2042 During a scroll, we set a flag which caret position is gated on, but we never
2043 actually invalidate the caret's position. This patch does so.
2045 Test: editing/input/caret-position-during-scroll.html
2047 * editing/FrameSelection.h:
2048 * rendering/RenderLayer.cpp:
2049 (WebCore::RenderLayer::scrollTo):
2051 2014-05-27 Timothy Horton <timothy_horton@apple.com>
2053 Turn on the LayerPool for iOS
2054 https://bugs.webkit.org/show_bug.cgi?id=133299
2056 Reviewed by Antti Koivisto.
2058 * Configurations/WebCore.xcconfig:
2059 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2060 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2061 * platform/graphics/ca/mac/TileController.mm:
2062 (WebCore::TileController::createTileLayer):
2063 * platform/graphics/ca/mac/TileGrid.mm:
2064 (WebCore::TileGrid::removeTiles):
2065 Turn on the LayerPool for iOS.
2066 We've used this on Mac for a long time, and the WebKit1
2067 ("legacy") iOS TileCache also had a similar pool.
2068 This helps a good bit with flashiness while scrolling.
2070 2014-05-27 David Hyatt <hyatt@apple.com>
2072 REGRESSION: Audio volume scrubber does not show volume level thumb
2073 <rdar://problem/16902004>
2074 https://bugs.webkit.org/show_bug.cgi?id=133310
2076 Reviewed by Dean Jackson.
2078 This was just a silly mistake on my part with the setting of the pagination
2079 layers. Layers inside transforms are supposed to clear out their pagination
2080 status based off their ancestor containing block layers, and not off the
2081 enclosing pagination layer.
2083 Added fast/multicol/pagination/nested-transforms.html
2085 * rendering/RenderLayer.cpp:
2086 (WebCore::RenderLayer::updatePagination):
2088 2014-05-27 Eric Carlson <eric.carlson@apple.com>
2090 [Mac] media controls should prevent 'click' events from reaching the page
2091 https://bugs.webkit.org/show_bug.cgi?id=133268
2093 Reviewed by Jer Noble.
2095 Test: media/media-controls-cancel-events.html
2097 * Modules/mediacontrols/mediaControlsApple.js:
2098 (Controller.prototype.handleEvent): Allow event handler to cancel event default action.
2099 (Controller.prototype.handleRewindButtonClicked): Cancel event default.
2100 (Controller.prototype.handlePlayButtonClicked): Ditto.
2101 (Controller.prototype.handleMuteButtonClicked): Ditto.
2102 (Controller.prototype.handleMinButtonClicked): Ditto.
2103 (Controller.prototype.handleCaptionButtonClicked): Ditto.
2104 (Controller.prototype.handleFullscreenButtonClicked): Ditto.
2105 * Modules/mediacontrols/mediaControlsiOS.js:
2106 (ControllerIOS.prototype.handlePlayButtonTouchEnd): Ditto.
2107 (ControllerIOS.prototype.handlePlayButtonTouchCancel): Ditto.
2108 (ControllerIOS.prototype.handleFullscreenTouchEnd): Ditto.
2109 (ControllerIOS.prototype.handleFullscreenTouchCancel): Ditto.
2110 (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
2111 (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): Ditto.
2112 (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto.
2114 2014-05-27 Jon Lee <jonlee@apple.com>
2116 Fix Mavericks bots from r169383.
2117 https://bugs.webkit.org/show_bug.cgi?id=133311
2119 Reviewed by Eric Carlson.
2121 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Update #ifdef to check for ENABLE(MEDIA_SOURCE).
2122 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Ditto.
2124 2014-05-27 Radu Stavila <stavila@adobe.com>
2126 REGRESSION (r168046): Incorrect handling of multicol spanner
2127 https://bugs.webkit.org/show_bug.cgi?id=133249
2129 Reviewed by David Hyatt.
2131 When removing the child of an object, the removeChild method should return the next element
2132 following the one being deleted. This will ensure that proper iteration and destruction of
2133 an object's children is possible.
2135 No new tests added. This is because the test that triggers this issue also triggers
2136 another assertion, in RenderMultiColumnSet::requiresBalancing(). However, that is a totally
2137 separate problem and will be handled in a separate bug: https://bugs.webkit.org/show_bug.cgi?id=133309
2139 * rendering/RenderBlock.cpp:
2140 (WebCore::RenderBlock::removeChild):
2141 * rendering/RenderBlock.h:
2142 * rendering/RenderBlockFlow.cpp:
2143 (WebCore::RenderBlockFlow::removeChild):
2144 * rendering/RenderBlockFlow.h:
2145 * rendering/RenderButton.cpp:
2146 (WebCore::RenderButton::removeChild):
2147 * rendering/RenderButton.h:
2148 * rendering/RenderElement.cpp:
2149 (WebCore::RenderElement::removeChild):
2150 (WebCore::RenderElement::removeChildInternal):
2151 * rendering/RenderElement.h:
2152 * rendering/RenderMenuList.cpp:
2153 (RenderMenuList::removeChild):
2154 * rendering/RenderMenuList.h:
2155 * rendering/RenderMultiColumnFlowThread.cpp:
2156 (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2157 * rendering/RenderRuby.cpp:
2158 (WebCore::RenderRubyAsInline::removeChild):
2159 (WebCore::RenderRubyAsBlock::removeChild):
2160 * rendering/RenderRuby.h:
2161 * rendering/RenderRubyRun.cpp:
2162 (WebCore::RenderRubyRun::removeChild):
2163 * rendering/RenderRubyRun.h:
2164 * rendering/mathml/RenderMathMLScripts.cpp:
2165 (WebCore::RenderMathMLScripts::removeChildInternal):
2166 (WebCore::RenderMathMLScripts::removeChild):
2167 (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
2168 (WebCore::RenderMathMLScriptsWrapper::removeChild):
2169 * rendering/mathml/RenderMathMLScripts.h:
2170 * rendering/svg/RenderSVGContainer.cpp:
2171 (WebCore::RenderSVGContainer::removeChild):
2172 * rendering/svg/RenderSVGContainer.h:
2173 * rendering/svg/RenderSVGInline.cpp:
2174 (WebCore::RenderSVGInline::removeChild):
2175 * rendering/svg/RenderSVGInline.h:
2176 * rendering/svg/RenderSVGRoot.cpp:
2177 (WebCore::RenderSVGRoot::removeChild):
2178 * rendering/svg/RenderSVGRoot.h:
2179 * rendering/svg/RenderSVGText.cpp:
2180 (WebCore::RenderSVGText::removeChild):
2181 * rendering/svg/RenderSVGText.h:
2183 2014-05-27 Jon Lee <jonlee@apple.com>
2185 Update ENABLE(MEDIA_SOURCE) on Mac
2186 https://bugs.webkit.org/show_bug.cgi?id=133141
2188 Reviewed by Darin Adler.
2190 * Configurations/FeatureDefines.xcconfig:
2192 2014-05-27 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
2195 https://bugs.webkit.org/show_bug.cgi?id=132863
2197 Reviewed by Csaba Osztrogonác.
2199 * Configurations/FeatureDefines.xcconfig:
2200 * Modules/websockets/WebSocketChannel.cpp:
2201 (WebCore::WebSocketChannel::WebSocketChannel):
2202 (WebCore::WebSocketChannel::didFail):
2203 (WebCore::WebSocketChannel::processOutgoingFrameQueue):
2204 (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
2205 * Modules/websockets/WebSocketChannel.h:
2207 * WebCore.vcxproj/WebCore.vcxproj:
2208 * bindings/js/JSBlobCustom.cpp:
2209 (WebCore::JSBlobConstructor::constructJSBlob):
2210 * bindings/js/JSFileReaderCustom.cpp:
2211 * dom/DOMExceptions.in:
2212 * dom/EventTargetFactory.in:
2213 * dom/ScriptExecutionContext.cpp:
2214 (WebCore::ScriptExecutionContext::publicURLManager):
2215 * dom/ScriptExecutionContext.h:
2216 * fileapi/AsyncFileStream.cpp:
2217 * fileapi/AsyncFileStream.h:
2219 (WebCore::Blob::Blob):
2221 (WebCore::Blob::slice):
2223 * fileapi/FileError.h:
2224 * fileapi/FileError.idl:
2225 * fileapi/FileException.cpp:
2226 * fileapi/FileException.h:
2227 * fileapi/FileException.idl:
2228 * fileapi/FileReader.cpp:
2229 * fileapi/FileReader.h:
2230 * fileapi/FileReader.idl:
2231 * fileapi/FileReaderLoader.cpp:
2232 * fileapi/FileReaderLoader.h:
2233 * fileapi/FileReaderLoaderClient.h:
2234 * fileapi/FileReaderSync.cpp:
2235 * fileapi/FileReaderSync.h:
2236 * fileapi/FileReaderSync.idl:
2237 * fileapi/FileThread.cpp:
2238 * fileapi/FileThread.h:
2239 * fileapi/ThreadableBlobRegistry.cpp:
2240 (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Deleted.
2241 (WebCore::ThreadableBlobRegistry::registerBlobURL): Deleted.
2242 (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice): Deleted.
2243 (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Deleted.
2244 (WebCore::ThreadableBlobRegistry::blobSize): Deleted.
2245 (WebCore::ThreadableBlobRegistry::getCachedOrigin): Deleted.
2246 * fileapi/WebKitBlobBuilder.cpp:
2247 (WebCore::BlobBuilder::append):
2248 * fileapi/WebKitBlobBuilder.h:
2252 * html/PublicURLManager.cpp:
2253 * html/PublicURLManager.h:
2254 * loader/LoaderStrategy.cpp:
2255 (WebCore::LoaderStrategy::createBlobRegistry):
2256 * loader/LoaderStrategy.h:
2257 * page/DOMWindow.idl:
2258 * page/SecurityOrigin.cpp:
2259 (WebCore::SecurityOrigin::shouldUseInnerURL):
2260 (WebCore::getCachedOrigin):
2261 * platform/FileStream.cpp:
2262 * platform/FileStream.h:
2263 * platform/FileStreamClient.h:
2264 * platform/SchemeRegistry.cpp:
2265 (WebCore::canDisplayOnlyIfCanRequestSchemes):
2266 * platform/network/BlobRegistry.cpp:
2267 * platform/network/BlobRegistryImpl.cpp:
2268 * platform/network/BlobResourceHandle.cpp:
2269 * platform/network/BlobResourceHandle.h:
2270 * platform/network/FormData.cpp:
2271 (WebCore::FormData::deepCopy):
2272 (WebCore::FormData::appendFile):
2273 (WebCore::FormData::appendBlob):
2274 (WebCore::FormData::appendKeyValuePairItems):
2275 (WebCore::FormData::resolveBlobReferences):
2276 (WebCore::encodeElement):
2277 (WebCore::decodeElement):
2278 * platform/network/FormData.h:
2279 (WebCore::FormDataElement::FormDataElement):
2280 (WebCore::operator==):
2281 * platform/network/cf/FormDataStreamCFNet.cpp:
2282 (WebCore::closeCurrentStream):
2283 (WebCore::advanceCurrentStream):
2284 (WebCore::formCreate):
2285 (WebCore::formRead):
2286 (WebCore::setHTTPBody):
2287 * platform/network/curl/ResourceHandleManager.cpp:
2288 (WebCore::getFormElementsCount):
2289 * platform/network/soup/ResourceHandleSoup.cpp:
2290 (WebCore::addEncodedBlobToSoupMessageBody):
2291 (WebCore::addFormElementsToSoupMessage):
2292 * workers/WorkerGlobalScope.idl:
2293 * xml/XMLHttpRequest.cpp:
2294 (WebCore::XMLHttpRequest::send):
2295 (WebCore::XMLHttpRequest::createRequest):
2297 2014-05-27 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
2299 Allow building CMake based ports with WEB_REPLAY
2300 https://bugs.webkit.org/show_bug.cgi?id=133154
2302 Reviewed by Csaba Osztrogonác.
2306 2014-05-27 Adrian Perez de Castro <aperez@igalia.com>
2308 [GStreamer] Add missing <wtf/MathExtras.h> header
2309 https://bugs.webkit.org/show_bug.cgi?id=133236
2311 Reviewed by Philippe Normand.
2313 In some configurations, not including <wtf/MathExtras.h> will cause
2314 errors about undefined functions. In particular, this happens in
2315 Linux with glibc 2.19 and compiling with Clang. Having the header
2316 included is the correct thing to do anyway.
2318 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2319 Include <wtf/MathExtras.h>
2321 2014-05-27 Manuel Rego Casasnovas <rego@igalia.com>
2323 Setting up OrderIterator shouldn't require an extra Vector
2324 https://bugs.webkit.org/show_bug.cgi?id=119061
2326 Reviewed by Darin Adler.
2328 From Blink r153971 by <jchaffraix@chromium.org>
2330 This patches reuse the OrderIterator's Vector. It provides a helper class OrderIteratorPopulator, used for
2331 manipulating the Vector directly. Which allows to consolidate the code into a single implementation across
2334 No new tests, already covered by current tests.
2336 * rendering/OrderIterator.cpp:
2337 (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Reset OrderIterator and call
2338 removeDuplicatedOrderValues().
2339 (WebCore::OrderIteratorPopulator::removeDuplicatedOrderValues): Sorts the Vector and removes the duplicated
2341 (WebCore::OrderIteratorPopulator::collectChild): Collect order value information from child.
2342 (WebCore::OrderIterator::setOrderValues): Deleted.
2343 * rendering/OrderIterator.h:
2344 (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Add helper class to manipulate OrderValues Vector.
2345 * rendering/RenderFlexibleBox.cpp:
2346 (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
2347 (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
2348 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
2349 * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
2350 * rendering/RenderGrid.cpp:
2351 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
2353 2014-05-26 Tim Horton <timothy_horton@apple.com>
2355 [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
2356 https://bugs.webkit.org/show_bug.cgi?id=133020
2357 <rdar://problem/16521736>
2359 Reviewed by Simon Fraser.
2362 * platform/graphics/cg/IOSurfacePool.cpp:
2363 (WebCore::IOSurfacePool::willAddSurface):
2364 * platform/graphics/cocoa/IOSurface.h:
2365 * platform/graphics/cocoa/IOSurface.mm:
2366 (IOSurface::releaseGraphicsContext):
2367 Rename clearGraphicsContext to releaseGraphicsContext for clarity.
2369 2014-05-26 Philip Rogers <pdr@google.com>
2371 Remove special case for transparent SVG root layers
2372 https://bugs.webkit.org/show_bug.cgi?id=116856
2374 Reviewed by Dirk Schulze.
2376 This patch removes a special case from RenderLayer for root SVG layers
2377 with opacity. Instead of checking whether a composited layer exists in
2378 SVGRenderingContext::prepareToRenderSVGContent we now exclude the root
2379 SVG renderobject from the opacity checks in prepareToRenderSVGContent.
2381 This is a merge of https://src.chromium.org/viewvc/blink?view=rev&revision=174102
2382 by Philip Rogers <pdr@chromium.org>.
2384 No new tests as this is covered by svg/custom/composited-svg-with-opacity.html.
2386 * rendering/RenderLayer.cpp:
2387 (WebCore::RenderLayer::isTransparent): Deleted.
2388 * rendering/RenderLayer.h:
2389 * rendering/svg/SVGRenderingContext.cpp:
2390 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2391 The opacity case for root svg renderers is now handled by
2394 2014-05-26 Yusuke Suzuki <utatane.tea@gmail.com>
2396 CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
2397 https://bugs.webkit.org/show_bug.cgi?id=133266
2399 Reviewed by Benjamin Poulain.
2401 When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.
2403 * cssjit/SelectorCompiler.cpp:
2404 (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2405 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2407 2014-05-26 Benjamin Poulain <benjamin@webkit.org>
2409 Fix the quirks mode selector matching of the pseudo classes :hover and :active
2410 https://bugs.webkit.org/show_bug.cgi?id=133063
2412 Reviewed by Antti Koivisto.
2414 Our implementation of the quirks mode of :active and :hover was very wrong. The only
2415 thing it was doing is verify the pseudo class is not the first selector of a fragment
2416 (which was conveniently the only thing that was tested :)).
2418 Since those pseudo class were only checking for the order of the filters, something like
2420 would succeed because :hover is not the first simple selector, while
2424 That behavior is also a problem for the CSS JIT as it is an implementation detail of SelectorChecker
2425 and compiling something like that with our out-of-order matching would be nonsense.
2427 This patch update the implementation to follow http://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk
2428 Basically, the only cases that do not work in quirks mode are selectors composed only of "*, :hover and :active".
2430 To implement this behavior, I needed to be able to inspect a complete selector fragment, including
2431 what is before and after :hover/:active.
2432 To do that, I replaced the boolean isSubSelector by a pointer to the first selector of the fragment.
2433 When we need to match :active/:hover in quirks mode, we just go over all the selectors in the fragment
2434 to find one of the qualifying match type.
2436 Tests: fast/selectors/active-hover-quirks.html
2437 fast/selectors/active-quirks.html
2438 fast/selectors/hover-quirks.html
2440 * css/SelectorChecker.cpp:
2441 (WebCore::SelectorChecker::matchRecursively):
2442 (WebCore::canMatchHoverOrActiveInQuirksMode):
2443 (WebCore::SelectorChecker::checkOne):
2444 * css/SelectorChecker.h:
2445 (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2447 2014-05-26 Zalan Bujtas <zalan@apple.com>
2449 Split the call to adjustForLocalZoom out into a separate expression.
2450 https://bugs.webkit.org/show_bug.cgi?id=133286
2452 Reviewed by Darin Adler.
2454 This patch ensures that adjustForLocalZoom() always gets called before we look at
2455 zoomFactor's value. (and not rely on the undefined behavior of the order of function argument evaluation)
2458 (WebCore::Element::offsetLeft):
2459 (WebCore::Element::offsetTop):
2461 2014-05-26 Darin Adler <darin@apple.com>
2463 Class name matching should use ASCII case-insensitive matching, not Unicode case folding
2464 https://bugs.webkit.org/show_bug.cgi?id=133292
2466 Reviewed by Anders Carlsson.
2468 Tests: fast/dom/getElementsByClassName/ASCII-case-insensitive.html
2469 fast/dom/getElementsByClassName/case-sensitive.html
2471 * dom/SpaceSplitString.cpp:
2472 (WebCore::hasNonASCIIOrUpper): Deleted.
2473 (WebCore::tokenizeSpaceSplitString): Use a for loop instead of while.
2474 (WebCore::spaceSplitStringTable): Renamed from sharedDataMap; the new name is supposed
2475 to help us see the analogy with the atomic string table.
2476 (WebCore::SpaceSplitString::set): Removed unneeded special case for null and preflight
2477 since AtomicString::convertToASCIILowercase now handles both of those. Changed to call
2478 convertToASCIILowercase instead of foldCase, since we don't want to fold non-ASCII.
2479 (WebCore::SpaceSplitString::spaceSplitStringContainsValue): Ditto.
2480 (WebCore::SpaceSplitStringData::create): Marked this inline since it's only called in
2481 one place and that place is in this file. Also used auto a bit and used get instead of
2482 find since the value type is a simple pointer.
2483 (WebCore::SpaceSplitStringData::destroy): Removed unneeded check for null. We never
2484 create any SpaceSplitStringData with empty strings, and a null is a kind of empty string.
2486 * dom/SpaceSplitString.h: Removed some unneeded includes and some unneeded uses of the
2487 inline keyword. Changed types from size_t to unsigned in a couple places; we had a mix
2488 of the types and there was no reason to use size_t there.
2490 2014-05-26 Javier Fernandez <jfernandez@igalia.com>
2492 [CSS Grid Layout] Implementation of the "grid" shorthand.
2493 https://bugs.webkit.org/show_bug.cgi?id=132122
2495 Reviewed by Darin Adler.
2497 The grid property is a shorthand that sets all of the explicit
2498 grid properties (grid-template-rows, grid-template-columns, and
2499 grid-template-areas) as well as all the implicit grid properties
2500 (grid-auto-rows, grid-auto-columns, and grid-auto-flow) in a
2503 Notice that either explicit or implicit grid can be specified,
2504 assigning the initial values to the omitted properties.
2506 Test: fast/css-grid-layout/grid-shorthand-get-set.html
2508 * css/CSSComputedStyleDeclaration.cpp:
2509 (WebCore::ComputedStyleExtractor::propertyValue):
2510 * css/CSSParser.cpp:
2511 (WebCore::CSSParser::parseValue):
2512 (WebCore::CSSParser::parseGridShorthand):
2514 * css/CSSPropertyNames.in:
2515 * css/StylePropertyShorthand.cpp:
2516 (WebCore::webkitGridShorthand):
2517 * css/StylePropertyShorthand.h:
2519 2014-05-26 Zalan Bujtas <zalan@apple.com>
2521 Subpixel layout: Legacy Element.offset* client* return values are invalid in certain cases.
2522 https://bugs.webkit.org/show_bug.cgi?id=133272
2524 Reviewed by Simon Fraser.
2526 Element.offset* client* functions applied various rounding strategies on the return values before r168868.
2527 (for example, offsetLeft/Top either floored through implicit integer arithmetics or rounded explicitly depending
2528 whether the zoom scale was 1. see http://trac.webkit.org/changeset/168868/trunk/Source/WebCore/dom/Element.cpp for details)
2529 This patch mimics the legacy behavior by either rounding or flooring the return value.
2531 Not testable (legacy switch is not exposed)
2534 (WebCore::adjustForLocalZoom):
2535 (WebCore::convertToNonSubpixelValueIfNeeded):
2536 (WebCore::Element::offsetLeft):
2537 (WebCore::Element::offsetTop):
2539 2014-05-26 Michał Pakuła vel Rutka <m.pakula@samsung.com>
2541 [EFL] Input fields and text areas are not rendered correctly after r167771
2542 https://bugs.webkit.org/show_bug.cgi?id=133181
2544 Reviewed by Gyuyoung Kim.
2546 r167771 changed arguments of RenderTheme two virtual method arguments which were not reflected
2547 in changes in derived classes, which caused parent method to be called. Arguments in derived class
2548 were updated, also 'override' specifiers were added to all virtual methods to prevent similar errors.
2550 Already covered by fast/forms/textarea-placeholder-wrapping.html
2552 * platform/efl/RenderThemeEfl.cpp:
2553 (WebCore::RenderThemeEfl::paintTextField):
2554 (WebCore::RenderThemeEfl::paintTextArea):
2555 * platform/efl/RenderThemeEfl.h:
2556 (WebCore::RenderThemeEfl::supportsHover):
2557 (WebCore::RenderThemeEfl::supportsControlTints):
2559 2014-05-20 Sergio Villar Senin <svillar@igalia.com>
2561 [CSS Grid Layout] Children of grid containers must be turned into grid items
2562 https://bugs.webkit.org/show_bug.cgi?id=132991
2564 Reviewed by Darin Adler.
2566 From Blink r150472 by <jchaffraix@chromium.org>
2568 According to specs each child of a grid container must become a
2569 grid item meaning that grid items are grid level boxes and thus,
2570 do not participate in the block formatting context but in the grid
2573 This change updates the grid items' 'display' property after style
2574 resolution so that we match the specification (see section 4. Grid
2575 Items). The spec basically instructs us to compute the value of
2576 'display' by applying the table in CSS2.1 Chapter 9.7
2577 http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
2579 Test: fast/css-grid-layout/grid-item-display.html
2581 * css/StyleResolver.cpp:
2582 (WebCore::isDisplayGridBox):
2583 (WebCore::StyleResolver::adjustRenderStyle):
2585 2014-05-26 Zan Dobersek <zdobersek@igalia.com>
2587 Remove Vector copies in ShorthandPropertyWrapper implementation and use
2588 https://bugs.webkit.org/show_bug.cgi?id=133265
2590 Reviewed by Simon Fraser.
2592 * page/animation/CSSPropertyAnimation.cpp:
2593 (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Move the passed-in Vector
2594 into the member variable instead of using Vector<>::swap().
2595 (WebCore::ShorthandPropertyWrapper::propertyWrappers): Return a const reference of the member
2596 variable instead of a const value.
2597 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Move the Vector
2598 object into the ShorthandProperthyWrapper constructor.
2599 (WebCore::gatherEnclosingShorthandProperties): Deploy a range-based for-loop.
2601 2014-05-26 Tanay C <tanay.c@samsung.com>
2603 [EFL] Fix build error in blob.cpp after r168435
2604 https://bugs.webkit.org/show_bug.cgi?id=132678
2606 Reviewed by Alexey Proskuryakov.
2609 (WebCore::Blob::size): Using isInBound to check range of local var
2610 actualsize to resolve build error
2612 2014-05-25 Ryuan Choi <ryuan.choi@samsung.com>
2614 [EFL] Remove TileCairo and TiledBackingStoreBackendCairo
2615 https://bugs.webkit.org/show_bug.cgi?id=133274
2617 Reviewed by Gyuyoung Kim.
2619 Now, TiledBackingStore is only used for CoordinatedGraphics and the EFL port.
2620 CoordinatedGraphics does not use TileCairo and TiledBackingStoreBackendCairo.
2622 This patch removed them and refactored related files.
2624 * PlatformEfl.cmake:
2625 * PlatformGTK.cmake:
2626 * WebCore.vcxproj/WebCore.vcxproj:
2627 * WebCore.vcxproj/WebCore.vcxproj.filters:
2628 * platform/graphics/TiledBackingStore.cpp:
2629 (WebCore::TiledBackingStore::TiledBackingStore): Deleted.
2630 * platform/graphics/TiledBackingStore.h:
2631 * platform/graphics/TiledBackingStoreBackend.h:
2632 * platform/graphics/cairo/TileCairo.cpp: Removed.
2633 * platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp: Removed.
2635 2014-05-25 Jinwoo Song <jinwoo7.song@samsung.com>
2637 setData() of DataTransfer has a void return type
2638 https://bugs.webkit.org/show_bug.cgi?id=133108
2640 Reviewed by Alexey Proskuryakov.
2642 According to HTML5 spec, setData() of DataTranfer interface does not return value.
2643 http://www.w3.org/TR/html/editing.html#the-datatransfer-interface
2645 Test: editing/pasteboard/set_data_typeof_return.html
2647 * dom/DataTransfer.cpp:
2648 (WebCore::DataTransfer::setData):
2649 * dom/DataTransfer.h:
2650 * dom/DataTransfer.idl:
2651 * platform/Pasteboard.h:
2652 * platform/efl/PasteboardEfl.cpp:
2653 (WebCore::Pasteboard::writeString):
2654 * platform/gtk/PasteboardGtk.cpp:
2655 (WebCore::Pasteboard::writeString):
2656 * platform/ios/PasteboardIOS.mm:
2657 (WebCore::Pasteboard::writeString):
2658 * platform/mac/PasteboardMac.mm:
2659 (WebCore::Pasteboard::writeString):
2660 * platform/win/PasteboardWin.cpp:
2661 (WebCore::Pasteboard::writeString):
2663 2014-05-25 Benjamin Poulain <bpoulain@apple.com>
2665 [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
2666 https://bugs.webkit.org/show_bug.cgi?id=133262
2668 Reviewed by Simon Fraser.
2670 Since VisibleContentRect was fixed, we were no longer sending scroll events when updating the scrollOffset
2671 when updating the visible content rects. The reason is that the scrollOffset was defined as the top left of the
2672 VisibleContentRect, and as such was already at the end position after updating the unobscured rect.
2674 This patch split the unobscuredContentRect in unobscuredContentSize (updated live on zoom) and the position defined
2675 by the ScrollView's scrollOffset (updated when scrolling).
2678 * platform/ScrollView.h:
2679 * platform/ios/ScrollViewIOS.mm:
2680 (WebCore::ScrollView::unobscuredContentRect):
2681 (WebCore::ScrollView::setUnobscuredContentSize):
2682 (WebCore::ScrollView::setUnobscuredContentRect): Deleted.
2684 2014-05-25 David Kilzer <ddkilzer@apple.com>
2686 Add type-checked casts for TransformOperations
2687 <http://webkit.org/b/133217>
2689 Reviewed by Simon Fraser.
2691 * platform/graphics/GraphicsLayer.cpp:
2692 (WebCore::GraphicsLayer::validateTransformOperations):
2693 * platform/graphics/ca/GraphicsLayerCA.cpp:
2694 (WebCore::getTransformFunctionValue):
2695 - Switch to type-checked casts.
2697 * platform/graphics/transforms/IdentityTransformOperation.h:
2698 * platform/graphics/transforms/Matrix3DTransformOperation.h:
2699 * platform/graphics/transforms/MatrixTransformOperation.h:
2700 * platform/graphics/transforms/PerspectiveTransformOperation.h:
2701 * platform/graphics/transforms/RotateTransformOperation.h:
2702 * platform/graphics/transforms/ScaleTransformOperation.h:
2703 * platform/graphics/transforms/SkewTransformOperation.h:
2704 * platform/graphics/transforms/TranslateTransformOperation.h:
2705 - Add 'final' to class declaration.
2706 - Add 'override' to overridden methods.
2707 - Add type-checked cast via TRANSFORMOPERATION_TYPE_CASTS macro.
2708 - Move implementation of operator==(const TransformOperation&)
2709 from header to source file so it is able to use a type-checked
2710 cast, and switch back to using a reference instead of a
2712 - Add or update ASSERT in private constructor to check for
2713 correct OperationType in classes that represent multiple
2716 * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2717 (WebCore::Matrix3DTransformOperation::operator==): Added.
2719 * platform/graphics/transforms/MatrixTransformOperation.cpp:
2720 (WebCore::Matrix3DTransformOperation::operator==): Added.
2721 (WebCore::MatrixTransformOperation::blend):
2722 - Switch to type-checked casts and use a reference.
2724 * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2725 (WebCore::Matrix3DTransformOperation::operator==): Added.
2726 (WebCore::PerspectiveTransformOperation::blend):
2727 * platform/graphics/transforms/RotateTransformOperation.cpp:
2728 (WebCore::Matrix3DTransformOperation::operator==): Added.
2729 (WebCore::RotateTransformOperation::blend):
2730 * platform/graphics/transforms/ScaleTransformOperation.cpp:
2731 (WebCore::Matrix3DTransformOperation::operator==): Added.
2732 (WebCore::ScaleTransformOperation::blend):
2733 * platform/graphics/transforms/SkewTransformOperation.cpp:
2734 (WebCore::Matrix3DTransformOperation::operator==): Added.
2735 (WebCore::SkewTransformOperation::blend):
2736 * platform/graphics/transforms/TranslateTransformOperation.cpp:
2737 (WebCore::Matrix3DTransformOperation::operator==): Added.
2738 (WebCore::TranslateTransformOperation::blend):
2739 - Switch to type-checked casts.
2741 * platform/graphics/transforms/TransformOperation.h:
2742 (WebCore::TransformOperation::isRotateTransformOperationType):
2743 (WebCore::TransformOperation::isScaleTransformOperationType):
2744 (WebCore::TransformOperation::isSkewTransformOperationType):
2745 (WebCore::TransformOperation::isTranslateTransformOperationType):
2746 - Add type-checking methods used in constructors and type-checked
2748 - Define TRANSFORMOPERATION_TYPE_CASTS macro used by subclasses.
2750 2014-05-25 David Kilzer <ddkilzer@apple.com>
2752 Crash in WebCore::TextResourceDecoder::checkForCSSCharset
2753 <http://webkit.org/b/133257>
2754 <rdar://problem/17027109>
2756 Reviewed by Alexey Proskuryakov.
2758 Test: fast/encoding/css-charset-missing-semi-colon-and-newline.html
2760 * loader/TextResourceDecoder.cpp:
2761 (WebCore::TextResourceDecoder::checkForCSSCharset): Add early
2764 2014-05-24 Eric Carlson <eric.carlson@apple.com>
2766 [Mac] preload AVAssetTrack properties before asking for them
2767 https://bugs.webkit.org/show_bug.cgi?id=133240
2769 Reviewed by Jer Noble.
2771 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2772 (WebCore::assetTrackMetadataKeyNames): Add preferredTransform and naturalSize to the list
2773 of properties we preload.
2775 2014-05-24 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
2777 Remove one of the CSSProperty constructor
2778 https://bugs.webkit.org/show_bug.cgi?id=131094
2780 Reviewed by Darin Adler.
2782 Remove one of the CSSProperty constructor, because it is obsolete.
2784 * css/CSSProperty.h:
2785 (WebCore::CSSProperty::CSSProperty): Deleted.
2786 * css/StyleProperties.h:
2787 (WebCore::StyleProperties::PropertyReference::toCSSProperty):
2789 2014-05-23 Simon Fraser <simon.fraser@apple.com>
2791 Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
2792 https://bugs.webkit.org/show_bug.cgi?id=133254
2794 Reviewed by Tim Horton.
2796 Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
2797 the member variable and associated getter to make it clear that they relate
2798 to the last committed scroll position.
2800 * page/scrolling/ScrollingTreeScrollingNode.cpp:
2801 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2802 * page/scrolling/ScrollingTreeScrollingNode.h:
2803 (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
2804 (WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.
2806 2014-05-23 Simon Fraser <simon.fraser@apple.com>
2808 Share some more ScrollingTreeScrollingNode code
2809 https://bugs.webkit.org/show_bug.cgi?id=133248
2811 Reviewed by Sam Weinig.
2813 Push scrollBy(), scrollByWithoutContentEdgeConstraints() and setScrollPosition()
2814 down to ScrollingTreeFrameScrollingNode.
2816 This requires that scrollPosition() return the right thing for each class, so make
2817 it virtual. Future patches will reduce the confusion between the committed scroll
2818 position and the one derived from layers.
2820 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2821 (WebCore::ScrollingTreeFrameScrollingNode::scrollBy):
2822 (WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints):
2823 (WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
2824 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2825 * page/scrolling/ScrollingTreeScrollingNode.h:
2826 (WebCore::ScrollingTreeScrollingNode::scrollPosition):
2827 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2828 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2829 (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition): Deleted.
2830 (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy): Deleted.
2831 (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints): Deleted.
2832 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2833 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2834 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2835 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
2836 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
2837 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
2838 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
2839 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy): Deleted.
2840 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints): Deleted.
2842 2014-05-24 Chris Fleizach <cfleizach@apple.com>
2844 AX: fix coordinate mapping for iOS accessibility
2845 https://bugs.webkit.org/show_bug.cgi?id=133188
2847 Reviewed by Sam Weinig.
2849 Make WebCore aware of the accessibility point/rect conversion methods.
2851 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2852 (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2853 (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2854 * loader/EmptyClients.h:
2856 (WebCore::Chrome::accessibilityScreenToRootView):
2857 (WebCore::Chrome::rootViewToAccessibilityScreen):
2859 * page/ChromeClient.h:
2860 * platform/HostWindow.h:
2862 2014-05-24 Zalan Bujtas <zalan@apple.com>
2864 Subpixel rendering: Non-compositing transforms with subpixel coordinates paint to wrong position.
2865 https://bugs.webkit.org/show_bug.cgi?id=133184
2866 <rdar://problem/16745606>
2868 Reviewed by Simon Fraser.
2870 Snapping relative negative coordinate values should produce the same position as if they were
2871 positive absolute coordinates.
2872 When a child box gets positioned off of its containers towards top/left, its relative coordinates
2873 become negative. Pixel snapping those negative values should produce the same
2874 final painting position as if the child box was fixed positioned with positive coordinates.
2875 Since halfway values always round away from zero, negative and positive halfway values
2876 produce opposite rounding direction.
2877 This patch ensures that negative halfway values round to the direction as if they were positive.
2879 Test: fast/layers/hidpi-floor-negative-coordinate-values-to-maintain-rounding-direction.html
2881 * platform/LayoutUnit.h:
2882 (WebCore::roundToDevicePixel):
2883 * rendering/RenderLayer.cpp:
2884 (WebCore::RenderLayer::paintLayerByApplyingTransform):
2886 2014-05-24 Frédéric Wang <fred.wang@free.fr>
2888 Use size variants and glyph assembly from the MATH data.
2889 https://bugs.webkit.org/show_bug.cgi?id=130322
2891 Reviewed by Chris Fleizach.
2893 This patch modifies the RenderMathMLOperator code to use the MATH table
2894 when one is provided in the current font on the <math> tag. More
2895 precisely, the MathVariants table is used to draw a size variant or
2896 a glyph assembly. The displaystyle attribute is not supported yet, so
2897 for now large operators are always assumed to be in display style. The
2898 MATH support does not work well with all platforms+fonts, so at the
2899 moment the default font-family on the <math> is not changed.
2901 Tests: mathml/opentype/large-operators-LatinModern.html
2902 mathml/opentype/opentype-stretchy.html
2903 mathml/opentype/vertical-LatinModern.html
2905 * css/mathml.css: We only specify the default font-family on the math root, so that people can easily style the mathematics.
2906 For now, old fonts without the MATH table are still used as the default.
2908 (math, mfenced > *): Deleted.
2909 (mo, mfenced): Deleted.
2910 * platform/graphics/SimpleFontData.cpp: don't return the math data if the font is loading.
2911 (WebCore::SimpleFontData::mathData):
2912 * platform/graphics/opentype/OpenTypeMathData.cpp: update #ifdef so that disabling ENABLE_OPENTYPE_MATH won't lead to errors with unused parameters.
2913 (WebCore::OpenTypeMathData::OpenTypeMathData):
2914 (WebCore::OpenTypeMathData::getMathConstant):
2915 (WebCore::OpenTypeMathData::getItalicCorrection):
2916 (WebCore::OpenTypeMathData::getMathVariants):
2917 * rendering/mathml/RenderMathMLOperator.cpp:
2918 (WebCore::RenderMathMLOperator::boundsForGlyph):
2919 (WebCore::RenderMathMLOperator::heightForGlyph):
2920 (WebCore::RenderMathMLOperator::advanceForGlyph):
2921 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): We handle preferred width of size variants.
2922 (WebCore::RenderMathMLOperator::shouldAllowStretching): This function now only returns whether the operator will stretch and no longer has side effect.
2923 (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): We add a function to convert from the MathVariant table data to the format supported by RenderMathMLOperator.
2924 (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): We add a function to get the glyph that will be used for large operators in display style.
2925 (WebCore::RenderMathMLOperator::findStretchyData): We make this function handle size variants.
2926 (WebCore::RenderMathMLOperator::updateStyle): We handle size variants.
2927 (WebCore::RenderMathMLOperator::paint): We handle size variants.
2928 * rendering/mathml/RenderMathMLOperator.h:
2930 2014-05-23 Tim Horton <timothy_horton@apple.com>
2932 REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
2933 https://bugs.webkit.org/show_bug.cgi?id=132794
2934 <rdar://problem/16877909>
2936 Reviewed by Simon Fraser.
2938 Virtualize DisplayRefreshMonitor so that WebKit2 can implement its own DisplayRefreshMonitor for UI-side compositing views.
2939 This allows the synchronization of requestAnimationFrame callbacks with UI-side compositing painting.
2942 * WebCore.xcodeproj/project.pbxproj:
2944 * page/ChromeClient.h:
2945 (WebCore::ChromeClient::graphicsLayerFactory):
2946 (WebCore::ChromeClient::createDisplayRefreshMonitor):
2947 * platform/graphics/DisplayRefreshMonitorFactory.h: Added.
2948 * platform/graphics/GraphicsLayerUpdater.cpp:
2949 (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
2950 * platform/graphics/GraphicsLayerUpdater.h:
2951 * rendering/RenderLayerCompositor.cpp:
2952 (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
2953 * rendering/RenderLayerCompositor.h:
2954 Give the ChromeClient a chance to provide us with a custom DisplayRefreshMonitor.
2955 If it does not, we'll fall back to making a DisplayRefreshMonitorMac or
2956 DisplayRefreshMonitorIOS depending on the platform.
2958 * dom/ScriptedAnimationController.cpp:
2959 * dom/ScriptedAnimationController.h:
2960 * platform/graphics/DisplayRefreshMonitor.cpp:
2961 * platform/graphics/DisplayRefreshMonitor.h:
2962 * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
2963 * platform/graphics/DisplayRefreshMonitorClient.h: Added.
2964 * platform/graphics/DisplayRefreshMonitorManager.cpp: Added.
2965 * platform/graphics/DisplayRefreshMonitorManager.h: Added.
2966 Split DisplayRefreshMonitor.cpp into one file per class.
2967 Use references in a few places.
2968 Remove some useless comments.
2970 * platform/graphics/DisplayRefreshMonitor.cpp:
2971 (WebCore::DisplayRefreshMonitor::displayDidRefresh):
2972 Use takeAny() and remove a FIXME about it not existing.
2974 * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
2975 (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
2976 Use an early return instead of having the whole function body in an if().
2978 * platform/graphics/ios/DisplayRefreshMonitorIOS.h: Added.
2979 * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
2980 * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2981 * platform/graphics/mac/DisplayRefreshMonitorMac.h: Added.
2982 Virtualize DisplayRefreshMonitorIOS and DisplayRefreshMonitorMac,
2983 and move things specific to each of them out of DisplayRefreshMonitor itself.
2985 2014-05-23 Yusuke Suzuki <utatane.tea@gmail.com>
2987 CSS JIT: Apply backtracking optimization to adjacent backtracking
2988 https://bugs.webkit.org/show_bug.cgi?id=132951
2990 Reviewed by Benjamin Poulain.
2992 Apply the backtracking optimization to the adjacent backtracking.
2993 This optimization is already done for the descendant backtracking.
2994 We apply this to the adjacent backtracking similarly.
2996 Test: fast/selectors/backtracking-adjacent-optimized.html
2998 * cssjit/SelectorCompiler.cpp:
2999 (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
3000 (WebCore::SelectorCompiler::solveAdjacentBacktrackingActionForDirectAdjacent):
3001 (WebCore::SelectorCompiler::solveBacktrackingAction):
3002 (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
3003 (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
3004 (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
3005 (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
3006 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
3007 (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
3008 (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant): Deleted.
3010 2014-05-23 Alex Christensen <achristensen@webkit.org>
3012 Make CSS JIT run on ARM64.
3013 https://bugs.webkit.org/show_bug.cgi?id=133156
3015 Reviewed by Benjamin Poulain.
3017 * cssjit/FunctionCall.h:
3018 (WebCore::FunctionCall::saveAllocatedRegisters):
3019 (WebCore::FunctionCall::restoreAllocatedRegisters):
3020 Use StackAllocator's new push and pop functions to push and pop a vector instead of iterating it.
3021 * cssjit/RegisterAllocator.h:
3022 (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
3023 (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
3024 Return a vector of registers to allocate instead of doing the allocation to make the RegisterAllocator
3025 not need to know about the StackAllocator and to use the new vector push and pop functions.
3026 (WebCore::RegisterAllocator::~RegisterAllocator):
3027 Store RegisterIDs instead of StackReferences to avoid needing to know about the stack.
3028 * cssjit/SelectorCompiler.cpp:
3029 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3030 Removed the requirement for assert to be disabled to print disassembly when debugging css jit.
3031 (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
3032 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
3033 Added to correctly push the link register and frame pointer.
3034 This is required if the jit code calls a function on arm64 and helpful for debugging tools on x86_64.
3035 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3036 Generate the prologue and epilogue which respectively push and pop
3037 the link register, frame pointer, and callee saved registers if needed.
3038 * cssjit/StackAllocator.h:
3039 (WebCore::StackAllocator::push):
3040 (WebCore::StackAllocator::pop):
3041 Added new vector push and pop functions to use stp and ldb instructions on arm64.
3043 2014-05-23 Jeremy Jones <jeremyj@apple.com>
3045 Hide fullscreen immediately when switching tabs.
3046 https://bugs.webkit.org/show_bug.cgi?id=133239
3048 Reviewed by Eric Carlson.
3050 This change allows fullscreen to disappear immediately while still cleaning
3051 up fullscreen normally.
3054 * platform/ios/WebVideoFullscreenControllerAVKit.h:
3055 renamed function to requestHideAndExitFullscreen
3057 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3058 renamed function to requestHideAndExitFullscreen
3060 (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
3061 rename of requestExitFullscreen that also hides.
3063 (-[WebVideoFullscreenController requestExitFullscreen]): Deleted.
3064 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: declare requestHideAndExitFullscreen()
3065 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3066 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
3067 this hides the window before requesting exitfullscreen from the model.
3069 2014-05-23 Tim Horton <timothy_horton@apple.com>
3071 [iOS] WKPDFView should have a page indicator
3072 https://bugs.webkit.org/show_bug.cgi?id=133109
3073 <rdar://problem/16383003>
3075 Reviewed by Anders Carlsson.
3077 * English.lproj/Localizable.strings:
3079 2014-05-23 Enrica Casucci <enrica@apple.com>
3081 Remove invalid ASSERT in wordRangeForPosition.
3082 https://bugs.webkit.org/show_bug.cgi?id=133232
3084 Reviewed by Ryosuke Niwa.
3086 In WK2 for iOS this function is called on every selection change.
3087 The selection could be set by Javascript in an element that is not visible.
3088 In that case we won't be able to create a VisiblePosition therefore wordRangeForPosition
3089 should not ASSERT that the VisiblePosition is not null, but rather
3090 perform an early return if it is null.
3092 * editing/VisibleUnits.cpp:
3093 (WebCore::wordRangeFromPosition):
3095 2014-05-23 Manuel Rego Casasnovas <rego@igalia.com>
3097 [CSS Grid Layout] Use gridRowCount() and gridColumnCount() when possible
3098 https://bugs.webkit.org/show_bug.cgi?id=133213
3100 Reviewed by Sergio Villar Senin.
3102 Use gridRowCount() and gridColumnCount() instead of m_grid.size() and
3103 m_grid[0].size() to make the code more descriptive and easier to
3106 No new tests (No change in behavior).
3108 * rendering/RenderGrid.cpp:
3109 (WebCore::RenderGrid::growGrid):
3110 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3112 2014-05-23 Alexey Proskuryakov <ap@apple.com>
3114 REGRESSION (r153917): Chart for the Category Explorer within Quicken Essentials
3115 does not draw until you force a redraw
3116 https://bugs.webkit.org/show_bug.cgi?id=133228
3117 <rdar://problem/15221231>
3119 Reviewed by Simon Fraser.
3121 * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsQuickenEssentials):
3122 * platform/RuntimeApplicationChecks.h:
3123 Added a check for Quicken Essentials.
3125 * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Don't do an early return
3126 for Quicken Essentials, it depends on drawing to update its layer.
3128 2014-05-23 Mihnea Ovidenie <mihnea@adobe.com>
3130 REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
3131 https://bugs.webkit.org/show_bug.cgi?id=133124
3133 Reviewed by David Hyatt.
3135 When adjusting the end points of a subtree selection in the case of a document
3136 with named flows, we have to make sure that we pass the computed end
3137 points to the visible selection algorithm only if the end points are
3138 part of the same subtree, otherwise assume a selection clear behavior.
3140 The test fast/regions/cssom/region-range-for-box-crash.html is used to
3143 * rendering/SelectionSubtreeRoot.cpp:
3144 (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
3145 (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Moved to header file.
3146 * rendering/SelectionSubtreeRoot.h:
3147 (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
3149 2014-05-23 Jeremy Jones <jeremyj@apple.com>
3151 reset m_havePreparedToPlay when changing media engines.
3152 https://bugs.webkit.org/show_bug.cgi?id=133199
3154 Reviewed by Eric Carlson.
3156 If a play request comes in before the media player is created, m_havePreparedToPlay
3157 is set to true. But when the player is created, this prevents the new player from
3158 getting the prepare call.
3160 * html/HTMLMediaElement.cpp:
3161 (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): set m_havePreparedToPlay false.
3163 2014-05-23 Oliver Hunt <oliver@apple.com>
3165 Navigator object needs to have properties directly on the instance object
3166 https://bugs.webkit.org/show_bug.cgi?id=133221
3168 Reviewed by Mark Lam.
3170 Flag the Navigator object as requiring properties to be on the instance
3171 as there were a few compatibility issues when on the prototype.
3173 * bindings/scripts/CodeGeneratorJS.pm:
3174 (InterfaceRequiresAttributesOnInstance):
3176 2014-05-23 Simon Fraser <simon.fraser@apple.com>
3178 Switch CSSGradientValue to use more references
3179 https://bugs.webkit.org/show_bug.cgi?id=133206
3181 Reviewed by Andreas Kling.
3183 Switch from pointers to references in various places.
3185 * css/CSSGradientValue.cpp:
3186 (WebCore::CSSGradientValue::image):
3187 (WebCore::CSSGradientValue::addStops):
3188 (WebCore::positionFromValue):
3189 (WebCore::CSSGradientValue::computeEndPoint):
3190 (WebCore::CSSLinearGradientValue::createGradient):
3191 (WebCore::CSSRadialGradientValue::resolveRadius):
3192 (WebCore::CSSRadialGradientValue::createGradient):
3193 * css/CSSGradientValue.h:
3195 2014-05-23 Zalan Bujtas <zalan@apple.com>
3197 Subpixel rendering: Make webkit-box-shadow painting subpixel aware.
3198 https://bugs.webkit.org/show_bug.cgi?id=133201
3199 <rdar://problem/16072830>
3201 Reviewed by Simon Fraser.
3203 This patch enables webkit-box-shadow to be painted on a subpixel position. However, we
3204 still truncate -webkit-box-shadow property values. Tracked here: http://webkit.org/b/133202
3206 Test: fast/box-shadow/hidpi-webkit-box-shadow-subpixel-position.html
3208 * platform/graphics/FloatRoundedRect.cpp:
3209 (WebCore::FloatRoundedRect::inflateWithRadii): same as in from RoundedRect.
3210 (WebCore::FloatRoundedRect::adjustRadii): same as in from RoundedRect.
3211 * platform/graphics/FloatRoundedRect.h:
3212 * rendering/RenderBoxModelObject.cpp:
3213 (WebCore::RenderBoxModelObject::paintBoxShadow):
3215 2014-05-22 peavo@outlook.com <peavo@outlook.com>
3217 [Curl] Crash when exceeding maximum cache limit.
3218 https://bugs.webkit.org/show_bug.cgi?id=133185
3220 Reviewed by Brent Fulgham.
3222 When the maximum cache limit is exceeded, I get a crash.
3223 This happens when deleting cache entries, because a reference to the url string object in the LRU list
3224 is used as a parameter to invalidateCacheEntry(), when called from makeRoomForNewEntry().
3225 When the string is removed from the LRU list in makeRoomForNewEntry(), the string is deleted.
3226 Next, the string is accessed again to remove the url from the index, and we crash.
3228 This can be fixed by removing the string from the LRU list after it is removed from the index.
3230 Fixing the crash also revealed an infinite loop problem.
3231 If the url for some reason only exist in the LRU list, and not in the index,
3232 we will inifitely loop in makeRoomForNewEntry(), trying to remove this url from the cache, but never succeeding.
3233 This can be fixed by removing the url from the LRU list, also when it's not in the index.
3235 * platform/network/curl/CurlCacheManager.cpp:
3236 (WebCore::CurlCacheManager::makeRoomForNewEntry): Avoid infinite loop by checking if there are more cache entries to remove.
3237 (WebCore::CurlCacheManager::invalidateCacheEntry): Avoid crash and infinite loop by removing url from LRU list last.
3239 2014-05-22 Simon Fraser <simon.fraser@apple.com>
3241 Make viewport units work in CSS gradients
3242 https://bugs.webkit.org/show_bug.cgi?id=133204
3243 <rdar://problem/17012259>
3245 Reviewed by Tim Horton.
3247 Make viewport percentage lengths work in gradients.
3249 Test: fast/gradients/viewport-units-gradient.html
3251 * css/CSSGradientValue.cpp:
3252 (WebCore::CSSGradientValue::addStops):
3253 (WebCore::CSSLinearGradientValue::createGradient):
3254 (WebCore::CSSRadialGradientValue::createGradient):
3255 * css/CSSGradientValue.h:
3257 2014-05-22 Benjamin Poulain <bpoulain@apple.com>
3259 [iOS][WK2] Add support for minimal-ui viewports
3260 https://bugs.webkit.org/show_bug.cgi?id=133162
3262 Reviewed by Simon Fraser.
3264 Add support for minimal-ui directly into the Viewport configuration.
3266 ViewportConfiguration knows about two kinds of layout size in scrollview coordinates:
3270 Initially, the page is initialized with resetMinimalUI() and starts with a normal layout.
3272 At any time before the main resource is loaded, the Web page can update its viewport meta tag
3273 to include minimal-ui. The viewport configuration is updated immediately to reflect the minimal-ui
3274 layout size. Any layout after that takes minimal-ui into account.
3277 * css/LengthFunctions.cpp:
3278 (WebCore::minimumValueForLength):
3279 (WebCore::floatValueForLength):
3280 * css/StyleResolver.cpp:
3281 (WebCore::StyleResolver::viewportPercentageValue):
3282 * dom/ViewportArguments.h:
3283 (WebCore::ViewportArguments::operator==):
3284 * page/FrameView.cpp:
3285 (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
3286 (WebCore::FrameView::viewportSizeForCSSViewportUnits):
3287 (WebCore::FrameView::setViewportSize): Deleted.
3288 (WebCore::FrameView::viewportSize): Deleted.
3290 * page/ViewportConfiguration.cpp:
3291 (WebCore::ViewportConfiguration::ViewportConfiguration):
3292 (WebCore::ViewportConfiguration::setMinimumLayoutSize):
3293 (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
3294 (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates):
3295 (WebCore::ViewportConfiguration::resetMinimalUI):
3296 (WebCore::ViewportConfiguration::pageWillRenderFirstFrame):
3297 (WebCore::ViewportConfiguration::initialScale):
3298 (WebCore::ViewportConfiguration::minimumScale):
3299 (WebCore::ViewportConfiguration::updateConfiguration):
3300 (WebCore::ViewportConfiguration::layoutWidth):
3301 (WebCore::ViewportConfiguration::layoutHeight):
3302 (WebCore::ViewportConfiguration::description):
3303 * page/ViewportConfiguration.h:
3304 (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI):
3305 (WebCore::ViewportConfiguration::usesMinimalUI):
3306 * rendering/RenderView.cpp:
3307 (WebCore::RenderView::viewportSizeForCSSViewportUnits):
3308 (WebCore::RenderView::viewportSize): Deleted.
3309 * rendering/RenderView.h:
3311 2014-05-22 Ryosuke Niwa <rniwa@webkit.org>
3313 Can't type in status in facebook.com on iOS Safari because keyboard disappears
3314 https://bugs.webkit.org/show_bug.cgi?id=133196
3316 Reviewed by Geoffrey Garen.
3318 Fixed the bug by rolling out r156252.
3320 When the user taps on the status on facebook.com, the page focuses a textarea,
3321 which is then made momentarily invisible by setting display:none.
3322 The page then removes display:none later and expects the textarea to be still focused.
3324 With r156252, the focus is removed after the page sets display:none and the keyboard disappears.
3325 Since the focus is never reset on the textarea, the user can never type in anything.
3327 The specification may need to change here given that this (rather odd) behavior/expectation exists
3328 on one of the most popular websites on the Web.
3331 (WebCore::Document::Document):
3332 (WebCore::Document::recalcStyle):
3333 (WebCore::Document::updateLayout):
3334 (WebCore::Document::resetHiddenFocusElementSoon): Deleted.
3335 (WebCore::Document::resetHiddenFocusElementTimer): Deleted.
3338 2014-05-22 Myles C. Maxfield <mmaxfield@apple.com>
3340 http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
3341 https://bugs.webkit.org/show_bug.cgi?id=132523
3343 Reviewed by Alexey Proskuryakov.
3345 We should not manufacture a response in the event of an error during a
3346 synchronous XHR. In addition, this test removes two places that are
3347 sensitive to such a manufactured response.
3349 Updates test expectations.
3351 * loader/DocumentThreadableLoader.cpp:
3352 (WebCore::DocumentThreadableLoader::loadRequest): Don't inspect a
3353 loader response if there is an error
3354 * platform/network/cf/ResourceHandleCFNet.cpp:
3355 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
3356 manufacture a response
3357 * platform/network/mac/ResourceHandleMac.mm:
3358 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
3359 manufacture a response
3360 * xml/XSLTProcessorLibxslt.cpp:
3361 (WebCore::docLoaderFunc): Only use the response's URL if no error
3364 2014-05-22 Myles C. Maxfield <litherum@gmail.com>
3366 Unreviewed typo fix.
3372 * platform/graphics/mac/FontMac.mm:
3373 (WebCore::Font::dashesForIntersectionsWithRect): Accidentally said run.length() instead of glyphBuffer.size().
3375 2014-05-22 Andreas Kling <akling@apple.com>
3377 [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
3378 <https://webkit.org/b/133197>
3379 <rdar://problem/17011561>
3381 Make releaseMemory() public so we can call it from the process-will-suspend callback.
3383 Reviewed by Gavin Barraclough.
3386 * platform/MemoryPressureHandler.h:
3388 2014-05-22 Andreas Kling <akling@apple.com>
3390 Hook up a setting for showing detailed logging during memory pressure relief.
3391 <https://webkit.org/b/133194>
3393 Make the pressure relief logger opt-in. Also make it flush memory back to the
3394 OS (for both malloc and FastMalloc) to get more accurate numbers at each step.
3396 Reviewed by Gavin Barraclough.
3399 * platform/MemoryPressureHandler.cpp:
3400 * platform/MemoryPressureHandler.h:
3401 (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
3402 (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
3403 (WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled):
3404 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3405 (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
3407 2014-05-22 Brady Eidson <beidson@apple.com>
3409 Don't scan for phone numbers in editable regions
3410 <rdar://problem/16949846> and https://bugs.webkit.org/show_bug.cgi?id=133192