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