Removed empty files from the build
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-04  Geoffrey Garen  <ggaren@apple.com>
2
3         Removed empty files from the build
4         https://bugs.webkit.org/show_bug.cgi?id=113978
5
6         Reviewed by Anders Carlsson.
7
8         Anders made a list of all the empty files that are slowing down the Mac
9         build, and I grepped them away.
10
11         * WebCore.xcodeproj/project.pbxproj:
12
13 2013-04-04  Anders Carlsson  <andersca@apple.com>
14
15         Prune unneeded header #includes
16         https://bugs.webkit.org/show_bug.cgi?id=113973
17
18         Reviewed by Geoffrey Garen.
19
20         Reduce the amount of headers included by other headers by:
21         - Moving implicit and explicit constructors and destructors into .cpp files so member variable constructors/destructors
22           don't have to be declared.
23         - Move CachedResourceClient subclasses out into separate headers so that their respective CachedResource subclasses don't
24           have to be included by the classes that derive from those subclasses.
25         - Remove headers that were never needed in the first place.
26
27         * Modules/webaudio/AudioContext.h:
28         * WebCore.xcodeproj/project.pbxproj:
29         * bindings/js/JSDOMWindowCustom.cpp:
30         * css/CSSFontFaceSource.h:
31         * html/canvas/CanvasPattern.cpp:
32         (WebCore::CanvasPattern::create):
33         (WebCore::CanvasPattern::CanvasPattern):
34         (WebCore::CanvasPattern::~CanvasPattern):
35         * html/canvas/CanvasPattern.h:
36         (WebCore::CanvasPattern::pattern):
37         (WebCore::CanvasPattern::originClean):
38         * html/parser/HTMLScriptRunner.h:
39         * loader/ImageLoader.h:
40         * loader/LinkLoader.h:
41         * loader/TextTrackLoader.h:
42         * loader/cache/CachedFont.cpp:
43         * loader/cache/CachedFont.h:
44         * loader/cache/CachedFontClient.h: Added.
45         (WebCore::CachedFontClient::~CachedFontClient):
46         (WebCore::CachedFontClient::expectedType):
47         (WebCore::CachedFontClient::resourceClientType):
48         (WebCore::CachedFontClient::fontLoaded):
49         * loader/cache/CachedResourceHandle.cpp:
50         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
51         (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
52         (WebCore::CachedResourceHandleBase::setResource):
53         * loader/cache/CachedResourceHandle.h:
54         (WebCore::CachedResourceHandleBase::get):
55         (WebCore::CachedResourceHandleBase::operator!):
56         (WebCore::CachedResourceHandleBase::operator UnspecifiedBoolType):
57         (WebCore::CachedResourceHandleBase::operator=):
58         (WebCore::CachedResourceHandle::CachedResourceHandle):
59         (WebCore::CachedResourceHandle::get):
60         (WebCore::CachedResourceHandle::operator->):
61         (WebCore::CachedResourceHandle::operator=):
62         (WebCore::CachedResourceHandle::operator==):
63         (WebCore::CachedResourceHandle::operator!=):
64         (WebCore::operator==):
65         (WebCore::operator!=):
66         * loader/cache/CachedSVGDocument.h:
67         * loader/cache/CachedSVGDocumentReference.h:
68         * loader/cache/CachedSVGDocumentClient.h: Added.
69         (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
70         (WebCore::CachedSVGDocumentClient::expectedType):
71         (WebCore::CachedSVGDocumentClient::resourceClientType):
72         * loader/cache/CachedStyleSheetClient.h:
73         * platform/PlatformScreen.h:
74         * platform/audio/HRTFElevation.cpp:
75         * platform/audio/HRTFKernel.cpp:
76         (WebCore::HRTFKernel::fftSize):
77         * platform/audio/HRTFKernel.h:
78         * platform/audio/ReverbConvolverStage.cpp:
79         (WebCore::ReverbConvolverStage::~ReverbConvolverStage):
80         * platform/audio/ReverbConvolverStage.h:
81         * platform/graphics/FontPlatformData.h:
82         * platform/graphics/GraphicsContext3D.h:
83         * platform/graphics/Path.cpp:
84         * platform/graphics/Path.h:
85         * platform/graphics/Pattern.cpp:
86         * platform/graphics/Pattern.h:
87         * platform/graphics/filters/FilterOperation.cpp:
88         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
89         (WebCore::ReferenceFilterOperation::~ReferenceFilterOperation):
90         (WebCore::ReferenceFilterOperation::setCachedSVGDocumentReference):
91         * platform/graphics/filters/FilterOperation.h:
92         * platform/graphics/transforms/AffineTransform.h:
93         * plugins/DOMMimeType.h:
94         * rendering/RenderLayerFilterInfo.h:
95         * rendering/style/StyleCachedShader.h:
96         * svg/SVGFEImageElement.h:
97         * svg/SVGFontFaceUriElement.h:
98         * svg/SVGUseElement.h:
99         * xml/parser/XMLDocumentParser.h:
100
101 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
102
103         [Cairo] Stop passing raw pointers to BitmapImage::create()
104         https://bugs.webkit.org/show_bug.cgi?id=113945
105
106         Reviewed by Martin Robinson.
107
108         BitmapImage::create() was updated in r147643 to take a PassRefPtr<cairo_surface_t>
109         in argument instead of a cairo_surface_t*. This patch updates several call sites
110         so that they now pass in a smart pointer instead of a raw one to avoid silent
111         converting from cairo_surface_t* to PassRefPtr<cairo_surface_t>.
112
113         No new tests, no behavior change.
114
115         * platform/graphics/cairo/ImageBufferCairo.cpp:
116         (WebCore::ImageBufferData::ImageBufferData): Use RefPtr to m_surface to avoid manual
117         memory handling.
118         (WebCore::ImageBuffer::ImageBuffer):
119         (WebCore::ImageBuffer::~ImageBuffer):
120         (WebCore::ImageBuffer::copyImage):
121         (WebCore::ImageBuffer::clip):
122         (WebCore::ImageBuffer::platformTransformColorSpace):
123         (WebCore::getImageData):
124         (WebCore::ImageBuffer::putByteArray):
125         * platform/graphics/cairo/ImageBufferDataCairo.h:
126         (ImageBufferData):
127         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
128         (ImageGStreamer::ImageGStreamer):
129         * platform/graphics/gtk/ImageBufferGtk.cpp:
130         (WebCore::ImageBuffer::toDataURL):
131
132 2013-04-04  Simon Fraser  <simon.fraser@apple.com>
133
134         Page content missing when flipping from an empty layer to a tiled layer
135         https://bugs.webkit.org/show_bug.cgi?id=113977
136         <rdar://problem/13444219>
137
138         Reviewed by Tim Horton.
139         
140         Some articles on USA Today were missing content on load, when a large GraphicsLayer
141         which did not draw content needed to draw content (and become tiled in the process).
142         
143         The bug was an ordering dependency in GraphicsLayerCA::commitLayerChangesBeforeSublayers().
144         swapFromOrToTiledLayer() sets some dirty flags, but for some properties which have
145         already been committed in the current flush cycle.
146         
147         Fix by moving the swapFromOrToTiledLayer() to the top of the commit, which is
148         safe since it only consults GraphicsLayer properties, not CALayer properties.
149
150         Test: compositing/tiling/empty-to-tiled.html
151
152         * platform/graphics/ca/GraphicsLayerCA.cpp:
153         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
154         (WebCore::GraphicsLayerCA::updateGeometry):
155         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
156         (WebCore::GraphicsLayerCA::updateContentsScale):
157         * platform/graphics/ca/GraphicsLayerCA.h:
158         (GraphicsLayerCA):
159
160 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
161
162         Regression(r147639) Causes assertion hit in HashTable
163         https://bugs.webkit.org/show_bug.cgi?id=113954
164
165         Reviewed by Benjamin Poulain.
166
167         Lookup the key in the hash table again after the recursive call to
168         getCachedFontPlatformData() as it may have altered the hash map and
169         invalidated the previous iterator we had.
170
171         No new tests, covered by existing tests.
172
173         * platform/graphics/FontCache.cpp:
174         (WebCore::FontCache::getCachedFontPlatformData):
175
176 2013-04-04  Eric Carlson  <eric.carlson@apple.com>
177
178         [Mac] add "automatic" text track menu item
179         https://bugs.webkit.org/show_bug.cgi?id=113822
180
181         Reviewed by Jer Noble.
182
183         No new tests, existing tests updated.
184
185         * English.lproj/Localizable.strings: Add new track menu item.
186
187         * html/HTMLMediaElement.cpp: 
188         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode.
189         (WebCore::HTMLMediaElement::finishParsingChildren): LoadTextTrackResource -> ConfigureTextTracks.
190         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
191         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
192         (WebCore::HTMLMediaElement::loadInternal): Ditto. Flag the caption menu as invalid so it will
193             be rebuilt again.
194         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): LoadTextTrackResource -> ConfigureTextTracks.
195         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
196         (WebCore::HTMLMediaElement::configureTextTrackGroup): Deal with new track display modes.
197         (WebCore::HTMLMediaElement::HTMLMediaElement::hasClosedCaptions): Minor cleanup.
198         (WebCore::HTMLMediaElement::configureTextTrackGroup): Add some logging.
199         (WebCore::HTMLMediaElement::configureTextTracks): Call updateActiveTextTrackCues so cue display
200             is updated.
201         (WebCore::HTMLMediaElement::captionPreferencesChanged): Deal with new track display modes.
202         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Add some logging.
203         * html/HTMLMediaElement.h: Ditto.
204
205         * html/shadow/MediaControlElementTypes.cpp: Remove trackIndexAttributeName and trackListIndexForElement.
206         * html/shadow/MediaControlElementTypes.h: Ditto.
207
208         * html/shadow/MediaControlElements.cpp:
209         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Don't use track index,
210             everything we need is in the track<->element map now.
211         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto. Always rebuild the 
212             track list because clear the map each time the menu goes away because it refs every track.
213         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Don't set the track
214             index attribute on the menu items, just use the map.
215         * html/shadow/MediaControlElements.h:
216
217         * html/shadow/MediaControlsApple.cpp:
218         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): resetTrackListMenu is gone.
219         (WebCore::MediaControlsApple::reset): Ditto.
220         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Ditto.
221
222         * html/track/TextTrack.cpp:
223         (WebCore::TextTrack::captionMenuOffItem): New, static TextTrack used for the menu "Off" item.
224         (WebCore::TextTrack::captionMenuAutomaticItem): New, static TextTrack used for the menu "Automatic" item.
225         * html/track/TextTrack.h:
226
227         * page/CaptionUserPreferences.cpp:
228         (WebCore::CaptionUserPreferences::shouldShowCaptions): Removed, we use captionDisplayMode instead.
229         (WebCore::CaptionUserPreferences::captionDisplayMode): New.
230         (WebCore::CaptionUserPreferences::setCaptionDisplayMode): New.
231         (WebCore::CaptionUserPreferences::setPreferredLanguage): Make the parameter a const reference.
232         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Return 0 if the user doesn't want
233             captions or subtitles.
234         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Take language as a parameter
235             instead of assuming that it is always the entire language list.
236         * page/CaptionUserPreferences.h:
237
238         * page/CaptionUserPreferencesMac.h:
239         * page/CaptionUserPreferencesMac.mm:
240         (WebCore::CaptionUserPreferencesMac::shouldShowCaptions): Removed, we use captionDisplayMode instead.
241         (WebCore::CaptionUserPreferencesMac::captionDisplayMode): New.
242         (WebCore::CaptionUserPreferencesMac::setCaptionDisplayMode): New.
243         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Make the parameter a const reference.
244         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Deal with "Automatic" mode.
245             captions or subtitles.
246         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Take language as a parameter
247             instead of assuming that it is always the entire language list.
248         (WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Insert "Off" and "Automatic" items.
249
250         * platform/LocalizedStrings.cpp:
251         (WebCore::textTrackAutomaticMenuItemText): New.
252         * platform/LocalizedStrings.h:
253
254         * platform/graphics/MediaPlayer.cpp:
255         (WebCore::MediaPlayer::languageOfPrimaryAudioTrack): New.
256         * platform/graphics/MediaPlayer.h:
257         * platform/graphics/MediaPlayerPrivate.h:
258
259         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
260         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
261         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Return the language
262             of the main audio track.
263
264 2013-04-04  Alexey Proskuryakov  <ap@apple.com>
265
266         REGRESSION (r146580): Assertion using SecurityOrigin::create, URL string is not valid
267         https://bugs.webkit.org/show_bug.cgi?id=113961
268
269         Reviewed by Geoff Garen.
270
271         * page/SecurityOrigin.cpp:
272         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
273         (WebCore::SecurityOrigin::create):
274         Don't use ParsedURLString, because http://host:80/ is normalized to http://host/,
275         so it's not a parsed URL string.
276
277 2013-04-04  Sheriff Bot  <webkit.review.bot@gmail.com>
278
279         Unreviewed, rolling out r147662.
280         http://trac.webkit.org/changeset/147662
281         https://bugs.webkit.org/show_bug.cgi?id=113955
282
283         The change r147662  breaks fast/regions/fixed-pos-elem-in-
284         region.html (Requested by benjaminp on #webkit).
285
286         * rendering/RenderBlockLineLayout.cpp:
287         (WebCore::inlineLogicalWidth):
288
289 2013-04-04  Tim Horton  <timothy_horton@apple.com>
290
291         REGRESSION (r147373): Auto-sizing doesn't always respect minimum width changes
292         https://bugs.webkit.org/show_bug.cgi?id=113947
293         <rdar://problem/13579024>
294
295         Reviewed by Anders Carlsson.
296
297         Reset the FrameView size to the minimum auto-sizing size
298         before performing auto-sizing. We were already resetting the height,
299         but not the width, instead using the FrameView's current width.
300
301         This means that changing the minimum width without also manually
302         resizing the FrameView will never see the width change.
303
304         Auto-sizing tests are not working on Mac yet.
305
306         * page/FrameView.cpp:
307         (WebCore::FrameView::autoSizeIfEnabled):
308
309 2013-04-04  Martin Robinson  <mrobinson@igalia.com>
310
311         [GTK] Remove the gyp build
312         https://bugs.webkit.org/show_bug.cgi?id=113942
313
314         Reviewed by Gustavo Noronha Silva.
315
316         * WebCore.gyp/WebCoreGTK.gyp: Removed.
317
318 2013-04-04  Robert Hogan  <robert@webkit.org>
319
320         REGRESSION(r142152): Text wraps in menu
321         https://bugs.webkit.org/show_bug.cgi?id=113706
322
323         Reviewed by David Hyatt.
324
325         * rendering/RenderBlockLineLayout.cpp:
326         (WebCore::inlineLogicalWidth): Empty inline elements add their inline border/padding/margin to the width of the
327         line when we iterate through them in nextLineBreak(), so no need to add them again here when climbing back up
328         from their first child looking for border/padding/margin to add. (An empty inline element can have floating children.)
329
330 2013-04-04  Ryosuke Niwa  <rniwa@webkit.org>
331
332         Changing typing style with font size delta overrides the previous font size delta
333         https://bugs.webkit.org/show_bug.cgi?id=113923
334
335         Reviewed by Andreas Kling.
336
337         The bug was caused by a new font size delta value overriding the old one as
338         opposed to being added to the old value. Fixed that in overrideWithStyle.
339
340         Also made overrideWithStyle share code with mergeStyle since there is already
341         code to merge text-decorations there.
342
343         Unfortunately, adding a test for this fix proved to be hard because we don't
344         expose any API to directly set typing style.
345
346         * editing/EditingStyle.cpp:
347         (WebCore::EditingStyle::overrideWithStyle): Use mergeStyle.
348         (WebCore::EditingStyle::mergeStyle): Add font size deltas as opposed to simply
349         using the new value.
350
351 2013-04-04  Chris Fleizach  <cfleizach@apple.com>
352
353         AX:File upload button has wrong label
354         https://bugs.webkit.org/show_bug.cgi?id=113924
355
356         Reviewed by David Kilzer.
357
358         Allow the label and value to be returned for file upload controls on iOS.
359         Due to the different AX APIs, we can expose a bit more information on iOS.
360
361         Test: platform/iphone-simulator/accessibility/file-upload-button.html
362
363         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
364         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
365         (-[WebAccessibilityObjectWrapper fileUploadButtonReturnsValueInTitle]):
366         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
367         (-[WebAccessibilityObjectWrapperBase fileUploadButtonReturnsValueInTitle]):
368         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
369
370 2013-04-03  Dean Jackson  <dino@apple.com>
371
372         Expose settings to disable plugin snapshotting autostart and primary detection
373         https://bugs.webkit.org/show_bug.cgi?id=113918
374
375         Reviewed by Tim Horton.
376
377         Three new settings:
378         - snapshotAllPlugIns: Do not apply any heuristics - immediately snapshot a plugin.
379         - primaryPlugInSnapshotDetectionEnabled: Toggle snapshotting the "main" plugin in the page.
380         - autostartOriginPlugInSnapshottingEnabled: Toggle snapshotting based on URL origins.
381
382         * html/HTMLPlugInImageElement.cpp:
383         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Don't tell the host that we've started
384             if the autostartOriginPlugInSnapshottingEnabled is false.
385         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Don't restart a primary
386             plugin if primaryPlugInSnapshotDetectionEnabled is false.
387         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Snapshot immediately if
388             snapshotAllPlugIns is true. Also, don't test for autostart if
389             autostartOriginPlugInSnapshottingEnabled is false.
390         * page/Settings.in: Three new settings values.
391
392 2013-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
393
394         [BlackBerry] Remove skia code from PluginViewBlackBerry
395         https://bugs.webkit.org/show_bug.cgi?id=113936
396
397         Reviewed by Rob Buis.
398
399         Skia is not used anymore by the BlackBerry port.
400
401         * plugins/blackberry/PluginViewBlackBerry.cpp:
402         (WebCore::PluginView::paint):
403
404 2013-04-04  Emil A Eklund  <eae@chromium.org>
405
406         Change RenderFrameSet::computeEdgeInfo to use m-rows/m_cols directly
407         https://bugs.webkit.org/show_bug.cgi?id=113825
408
409         Reviewed by Eric Seidel.
410
411         Tests: fast/frames/invalid-frameset-compute-edge.html
412
413         * rendering/RenderFrameSet.cpp:
414         (WebCore::RenderFrameSet::computeEdgeInfo):
415
416 2013-04-04  ChangSeok Oh  <changseok.oh@collabora.com>
417
418         [GTK][AC] Invalid clear ClutterContent of ClutterActor
419         https://bugs.webkit.org/show_bug.cgi?id=113758
420
421         Reviewed by Gustavo Noronha Silva.
422
423         Using clutter_actor_set_content(actor, 0) is better to clear ClutterContent of ClutterActor.
424         Actually the ClutterContent referece is cleared in the API if we set 0.
425
426         No new tests since no functionality changed.
427
428         * platform/graphics/clutter/GraphicsLayerActor.cpp:
429         (graphicsLayerActorUpdateTexture):
430
431 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
432
433         [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
434         https://bugs.webkit.org/show_bug.cgi?id=113929
435
436         Reviewed by Martin Robinson.
437
438         Make (Pass)NativeImagePtr typedefs to (Pass)RefPtr<cairo_surface_t> instead
439         of NativeImageCairo*. Now that we switch to using smart pointers,
440         NativeImageCairo is removed as it made no sense to make it ref counted when
441         it merely held a single ref counted member.
442
443         Now that Cairo is using smart pointers for (Pass)NativeImagePtr, this patch
444         also enables the implementation of SVGImage::nativeImageForCurrentFrame()
445         for USE(CAIRO) as well. This effectively fixes canvas drawing of SVG-based
446         patterns for Cairo-based ports.
447
448         No new tests, covered by svg/canvas/canvas-pattern-svg.html.
449
450         * GNUmakefile.list.am: Remove NativeImageCairo.* for GTK.
451
452         * PlatformEfl.cmake: Remove NativeImageCairo.* for EFL.
453
454         * WebCore.vcproj/WebCore.vcproj:
455         * WebCore.vcxproj/WebCore.vcxproj:
456         * WebCore.vcxproj/WebCore.vcxproj.filters:
457         Remove NativeImageCairo.* for Win.
458
459         * platform/graphics/BitmapImage.cpp:
460         (WebCore::FrameData::reportMemoryUsage):
461         Update MemoryClassInfo::addRawBuffer() call now that m_frame is a RefPtr
462         for USE(CAIRO).
463
464         * platform/graphics/BitmapImage.h:
465         (BitmapImage):
466         Remove factory method taking a cairo_surface_t* in argument. This is useless
467         now that PassNativeImagePtr is a typedef to PassRefPtr<cairo_surface_t> and
468         there is already a factory method taking a PassNativeImagePtr in argument.
469
470         * platform/graphics/NativeImagePtr.h:
471         (WebCore):
472         Make PassNativeImagePtr a typedef to PassRefPtr<cairo_surface_t> and
473         NativeImagePtr a typedef to RefPtr<cairo_surface_t>, instead of
474         NativeImageCairo*. Moving to smart pointers is needed to enable implementation
475         of SVGImage::nativeImageForCurrentFrame() for Cairo.
476
477         * platform/graphics/cairo/BitmapImageCairo.cpp:
478         (WebCore::BitmapImage::BitmapImage):
479         (WebCore::BitmapImage::draw):
480         (WebCore::BitmapImage::checkForSolidColor):
481         (WebCore::FrameData::clear):
482         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
483         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
484         * platform/graphics/cairo/ImageCairo.cpp:
485         (WebCore::Image::drawPattern):
486         Update Cairo graphics code to reflect the (Pass)NativeImagePtr type changes.
487
488         * platform/graphics/cairo/NativeImageCairo.cpp: Removed.
489         * platform/graphics/cairo/NativeImageCairo.h: Removed.
490
491         * platform/graphics/cairo/PatternCairo.cpp:
492         (WebCore::Pattern::createPlatformPattern):
493         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
494         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
495         * platform/graphics/efl/ImageEfl.cpp:
496         (WebCore::BitmapImage::getEvasObject):
497         * platform/graphics/gtk/ImageGtk.cpp:
498         (WebCore::BitmapImage::getGdkPixbuf):
499         * platform/graphics/texmap/TextureMapperGL.cpp:
500         (WebCore::BitmapTextureGL::updateContents):
501         * platform/graphics/win/ImageCairoWin.cpp:
502         (WebCore::BitmapImage::create):
503         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
504         * platform/gtk/DragImageGtk.cpp:
505         (WebCore::createDragImageFromImage):
506         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
507         (WebCore::ImageFrame::asNewNativeImage):
508         * platform/win/DragImageCairoWin.cpp:
509         (WebCore::createDragImageFromImage):
510         Update code to reflect the (Pass)NativeImagePtr type changes.
511
512         * svg/graphics/SVGImage.cpp:
513         (WebCore):
514         * svg/graphics/SVGImage.h:
515         Enable SVGImage::nativeImageForCurrentFrame() for USE(CAIRO).
516
517 2013-04-04  Ed Bartosh  <bartosh@gmail.com>
518
519         [EFL] --minimal build fails with 'error: unused variable'
520         https://bugs.webkit.org/show_bug.cgi?id=113903
521
522         Reviewed by Gustavo Noronha Silva.
523
524         Moved variable definition under #if where it's used
525         * platform/network/soup/ResourceHandleSoup.cpp:
526         (WebCore::restartedCallback):
527
528 2013-04-04  Andreas Kling  <akling@apple.com>
529
530         Global FontPlatformData cache should use OwnPtr.
531         <http://webkit.org/b/111939>
532
533         Reviewed by Anders Carlsson.
534
535         Let the global FontPlatformData use OwnPtr instead of raw pointers + deleteAllValues().
536
537         * platform/graphics/FontCache.cpp:
538         (WebCore::FontCache::getCachedFontPlatformData):
539         (WebCore::FontCache::purgeInactiveFontData):
540         (WebCore::FontCache::invalidate):
541
542             Tweaked code for OwnPtr. Also made getCachedFontPlatformData() do one hash lookup
543             instead of two.
544
545         * platform/graphics/FontCache.h:
546         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
547         (WebCore::FontCache::createFontPlatformData):
548         * platform/graphics/chromium/FontCacheAndroid.cpp:
549         (WebCore::FontCache::createFontPlatformData):
550         * platform/graphics/freetype/FontCacheFreeType.cpp:
551         (WebCore::FontCache::createFontPlatformData):
552         * platform/graphics/mac/FontCacheMac.mm:
553         (WebCore::FontCache::createFontPlatformData):
554         * platform/graphics/qt/FontCacheQt.cpp:
555         (WebCore::FontCache::createFontPlatformData):
556         * platform/graphics/skia/FontCacheSkia.cpp:
557         (WebCore::FontCache::createFontPlatformData):
558         * platform/graphics/win/FontCacheWin.cpp:
559         (WebCore::FontCache::createFontPlatformData):
560         * platform/graphics/wince/FontCacheWinCE.cpp:
561         (WebCore::FontCache::createFontPlatformData):
562         * platform/graphics/wx/FontCacheWx.cpp:
563         (WebCore::FontCache::createFontPlatformData):
564
565             FontCache::createFontPlatformData() now returns a PassOwnPtr.
566
567 2013-04-04  Andreas Kling  <akling@apple.com>
568
569         Render images with low-quality scaling while FrameView is being resized.
570         <http://webkit.org/b/113764>
571         <rdar://problem/13555154>
572
573         Reviewed by Antti Koivisto.
574
575         Have ImageQualityController ask the renderer's containing FrameView if it's currently in live
576         resize, and if so, paint all images with low-quality scaling. A high-quality repaint will happen
577         ~0.5 sec after live resizing ends, piggybacking on the same mechanism we use to do JS-animated
578         resizing with low-quality scaling.
579
580         This reduces CPU time spent generating new tiles during live window resize, especially on Retina
581         systems where a lot of upscaling happens on legacy web content.
582
583         * rendering/RenderBoxModelObject.cpp:
584         (ImageQualityController):
585
586             Added an m_liveResizeOptimizationIsActive flag that tracks whether the ImageQualityController
587             is painting everything in low quality due to live window resize. It gets unset when the HQ
588             repaint timer fires and everything has been repainted properly.
589
590         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
591
592             When the HQ repaint timer fires, check if the renderer's containing FrameView is still in
593             live resize, and if so, abort HQ repaint for now and reschedule the timer.
594
595         (WebCore::ImageQualityController::ImageQualityController):
596         (WebCore::ImageQualityController::objectDestroyed):
597         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
598
599 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
600
601         Web Inspector: fix closure compiler warnings in IndexedDBModel.js
602         https://bugs.webkit.org/show_bug.cgi?id=113926
603
604         Reviewed by Alexander Pavlov.
605
606         No new tests: no change in behaviour.
607
608         * inspector/front-end/IndexedDBModel.js:
609
610 2013-04-04  Xidorn Quan  <quanxunzhen@gmail.com>
611
612         REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress
613         https://bugs.webkit.org/show_bug.cgi?id=113591
614
615         Reviewed by Simon Fraser.
616
617         Since a child node could overflow its ancestor, it is not wise to check
618         one's radii boundary before checking whether the given point intersects
619         its children. This patch moves the related code down to fix the bug.
620
621         Test: fast/borders/border-radius-child.html
622
623         * rendering/RenderBlock.cpp:
624         (WebCore::RenderBlock::nodeAtPoint):
625
626 2013-04-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
627
628         [GStreamer] Virtual modifier for MediaPlayer::simulateAudioInterruption must go
629         https://bugs.webkit.org/show_bug.cgi?id=113851
630
631         Reviewed by Eric Carlson.
632
633         * platform/graphics/MediaPlayer.h:
634         (MediaPlayer): Removed virtual modifier to
635         simulateAudioInterruption.
636
637 2013-04-04  Allan Sandfeld Jensen  <allan.jensen@digia.com>
638
639         [Qt] Support -webkit-font-smoothing
640         https://bugs.webkit.org/show_bug.cgi?id=106009
641
642         Reviewed by Jocelyn Turcotte.
643
644         Remove false dependency on Qt 5.1 for the -webkit-font-smoothing property.
645         For now we are still keeping the dependency on Font::shouldUseSmoothing().
646
647         * platform/graphics/qt/FontPlatformDataQt.cpp:
648         (WebCore::FontPlatformData::FontPlatformData):
649
650 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
651
652         Regression(r142765) Broke Custom SVG cursors and SVG canvas drawing for Chromium
653         https://bugs.webkit.org/show_bug.cgi?id=113420
654
655         Reviewed by Stephen White.
656
657         Introduce a PassNativeImagePtr typedef that is used in place of NativeImagePtr
658         for method arguments and return values. This is needed as Skia now maps
659         NativeImagePtr to RefPtr<NativeImageSkia> and PassNativeImagePtr to
660         PassRefPtr<NativeImageSkia>. We move towards ref counted smart pointers so that
661         SVGImage::nativeImageForCurrentFrame() can transfer ownership of the native
662         image to the caller if needed (e.g. for SVGImage).
663
664         Provide nativeImageForCurrentFrame() implementation for SVGImage. SVGImage no
665         longer holds the native image internally, to save memory. It is therefore created
666         when nativeImageForCurrentFrame() is called and ownership is passed to the
667         caller. For now, this implementation is only enabled for Skia as others are using
668         raw pointers for PassNativeImagePtr.
669
670         Test: svg/canvas/canvas-pattern-svg.html
671
672         * loader/icon/IconDatabase.cpp:
673         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
674         Return a PassNativeImagePtr instead of NativeImagePtr.
675
676         * loader/icon/IconDatabase.h:
677         (IconDatabase):
678         * loader/icon/IconDatabaseBase.h:
679         (WebCore::IconDatabaseBase::synchronousNativeIconForPageURL):
680         Return a PassNativeImagePtr instead of NativeImagePtr.
681
682         * platform/chromium/DragImageChromiumSkia.cpp:
683         (WebCore::createDragImageFromImage):
684         Store return value of nativeImageForCurrentFrame() in a RefPtr instead of a raw
685         one.
686
687         * platform/chromium/PasteboardChromium.cpp:
688         (WebCore::Pasteboard::writeImage):
689         Store return value of nativeImageForCurrentFrame() in a RefPtr<NativeImageSkia>
690         instead of a NativeImagePtr. While these are equivalent, the former is more
691         readable in Skia-specific code.
692
693         * platform/graphics/BitmapImage.cpp:
694         (WebCore::BitmapImage::frameAtIndex):
695         Return a PassNativeImagePtr instead of a NativeImagePtr.
696
697         (WebCore::BitmapImage::nativeImageForCurrentFrame):
698         Return a PassNativeImagePtr instead of a NativeImagePtr.
699
700         * platform/graphics/BitmapImage.h:
701         (WebCore::BitmapImage::create):
702         Take a PassNativeImagePtr in argument instead of a NativeImagePtr.
703
704         (BitmapImage): Ditto.
705
706         * platform/graphics/GraphicsContext.h:
707         (GraphicsContext): Ditto.
708
709         * platform/graphics/GraphicsContext3D.h:
710         (ImageExtractor):
711         Keep NativeImageSkia in a RefPtr instead of OwnPtr, now that it is refcounted.
712
713         * platform/graphics/Image.h:
714         (WebCore::Image::nativeImageForCurrentFrame):
715         Return a PassNativeImagePtr instead of a NativeImagePtr.
716
717         * platform/graphics/ImageBuffer.h:
718         (ImageBuffer):
719         Have copyNativeImage() return a PassNativeImagePtr instead of a NativeImagePtr.
720
721         * platform/graphics/ImageSource.cpp:
722         (WebCore::ImageSource::createFrameAtIndex):
723         Return a PassNativeImagePtr instead of a NativeImagePtr.
724
725         * platform/graphics/ImageSource.h:
726         Have createFrameAtIndex() return a PassNativeImagePtr instead of a NativeImagePtr.
727
728         * platform/graphics/NativeImagePtr.h:
729         Map NativeImagePtr to a RefPtr<NativeImageSkia> instead of NativeImageSkia* for Skia.
730         Introduce new PassNativeImagePtr that maps to PassRefPtr<NativeImageSkia> for Skia
731         and is equivalent to NativeImagePtr for other ports. We now use smart pointers for
732         the native image so that SVGImage::nativeImageForCurrentFrame() can pass ownership
733         of the native image to the caller, unlike BitmapImage::nativeImageForCurrentFrame().
734
735         * platform/graphics/blackberry/ImageBlackBerry.cpp:
736         (WebCore::ImageFrame::asNewNativeImage):
737         Return a PassNativeImagePtr instead of a NativeImagePtr.
738
739         (WebCore::BitmapImage::BitmapImage):
740         Take a PassNativeImagePtr instead of a NativeImagePtr in argument.
741
742         * platform/graphics/cg/GraphicsContextCG.cpp:
743         (WebCore::GraphicsContext::drawNativeImage): Ditto.
744
745         * platform/graphics/cg/ImageBufferCG.cpp:
746         (WebCore::ImageBuffer::copyNativeImage):
747         Take a PassNativeImagePtr instead of a NativeImagePtr in argument.
748
749         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
750         (WebCore::GraphicsLayerChromium::setContentsToImage):
751         Store return value of nativeImageForCurrentFrame() in a RefPtr instead of a raw one.
752
753         * platform/graphics/filters/skia/FEBlendSkia.cpp:
754         (WebCore::FEBlend::platformApplySkia): Ditto.
755
756         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
757         (WebCore::FEColorMatrix::platformApplySkia): Ditto.
758
759         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
760         (WebCore::FEComponentTransfer::platformApplySkia): Ditto.
761
762         * platform/graphics/filters/skia/FEDisplacementMapSkia.cpp:
763         (WebCore::FEDisplacementMap::platformApplySkia): Ditto.
764
765         * platform/graphics/filters/skia/FELightingSkia.cpp:
766         (WebCore::FELighting::platformApplySkia): Ditto.
767
768         * platform/graphics/qt/ImageDecoderQt.cpp:
769         (WebCore::ImageFrame::asNewNativeImage):
770         Return a PassNativeImagePtr instead of a NativeImagePtr.
771
772         * platform/graphics/qt/StillImageQt.cpp:
773         (WebCore::StillImage::nativeImageForCurrentFrame):
774         Return a PassNativeImagePtr instead of a NativeImagePtr.
775
776         * platform/graphics/qt/StillImageQt.h:
777         (StillImage): Ditto.
778
779         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
780         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
781         No longer need to adopt the return value of asNewNativeImage() now
782         that it returns a PassRefPtr instead of a raw one.
783
784         * platform/graphics/skia/ImageBufferSkia.cpp:
785         (WebCore::ImageBuffer::copyImage):
786         (WebCore::ImageBuffer::draw):
787         (WebCore::ImageBuffer::drawPattern):
788         Call NativeImageSkia::create() factory method now that the constructor
789         is private.
790
791         * platform/graphics/skia/ImageSkia.cpp:
792         (WebCore::FrameData::clear):
793         Just call clear() on m_frame instead of explicitely deleting it now
794         that it is a RefPtr.
795
796         (WebCore::Image::drawPattern):
797         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
798         of a raw one.
799
800         (WebCore::BitmapImage::BitmapImage):
801         (WebCore::BitmapImage::checkForSolidColor):
802         Store return value of frameAtIndex() in a RefPtr instead of a raw one.
803
804         (WebCore::BitmapImage::draw):
805         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
806         of a raw one.
807
808         * platform/graphics/skia/NativeImageSkia.cpp:
809         Add new constructor taking all members in argument. This is used for
810         cloning a NativeImageSkia object.
811
812         (WebCore::NativeImageSkia::NativeImageSkia):
813         (WebCore::NativeImageSkia::deepSkBitmapCopy):
814         Add convenience function to make a deep copy of a SkBitmap.
815
816         * platform/graphics/skia/NativeImageSkia.h:
817         (WebCore):
818         (WebCore::NativeImageSkia::create):
819         (NativeImageSkia):
820         Make NativeImageSkia subclass RefCounted. Make the constructor private
821         and add a factory method instead that returns a PassRefPtr.
822
823         (WebCore::NativeImageSkia::clone):
824         Add a clone() method now that NativeImageSkia is refcounted and is no
825         longer copyable.
826
827         * platform/graphics/skia/PatternSkia.cpp:
828         (WebCore::Pattern::platformPattern):
829         Store return value of nativeImageForCurrentFrame() in a RefPtr instead
830         of a raw one.
831
832         * platform/graphics/wince/ImageWinCE.cpp:
833         (WebCore::ImageFrame::asNewNativeImage):
834         Return a PassNativeImagePtr instead of a NativeImagePtr.
835
836         * platform/image-decoders/ImageDecoder.h:
837         (ImageFrame):
838         Have asNewNativeImage() return a PassNativeImagePtr instead of a
839         NativeImagePtr.
840
841         (WebCore::ImageFrame::getAddr):
842         (WebCore::ImageFrame::setSkBitmap):
843         (WebCore::ImageFrame::getSkBitmap):
844         (WebCore::ImageFrame::width):
845         (WebCore::ImageFrame::height):
846         Update use of m_bitmap now that it is a pointer type and call
847         NativeImageSkia::create() to construct a NativeImageSkia object now
848         that the constructor is private.
849
850         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
851         (WebCore::ImageFrame::asNewNativeImage):
852         Return a PassNativeImagePtr instead of a NativeImagePtr.
853
854         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
855         (WebCore::ImageFrame::asNewNativeImage): Ditto.
856
857         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
858         (WebCore::ImageFrame::ImageFrame):
859         Initialize m_bitmap in the constructor now that it is a pointer
860         type and we need NativeImageSkia's default constructor to be
861         called.
862
863         (WebCore::ImageFrame::operator=):
864         Call NativeImageSkia's new clone() method to copy m_bitmap as
865         NativeImageSkia is now RefCounted and no longer copyable.
866
867         (WebCore::ImageFrame::clearPixelData):
868         (WebCore::ImageFrame::zeroFillPixelData):
869         (WebCore::ImageFrame::copyBitmapData):
870         (WebCore::ImageFrame::setSize):
871         Update use of m_bitmap now that it is a pointer type.
872
873         (WebCore::ImageFrame::asNewNativeImage):
874         Return a PassNativeImagePtr instead of a NativeImagePtr.
875         Call NativeImageSkia's clone method now that it is no longer
876         copyable.
877
878         (WebCore::ImageFrame::setHasAlpha):
879         (WebCore::ImageFrame::setStatus):
880         Update use of m_bitmap now that it is a pointer type.
881
882         * platform/image-decoders/wx/ImageDecoderWx.cpp:
883         (WebCore::ImageFrame::asNewNativeImage):
884         Return a PassNativeImagePtr instead of a NativeImagePtr.
885
886         * svg/graphics/SVGImage.cpp:
887         (WebCore):
888         (WebCore::SVGImage::nativeImageForCurrentFrame):
889         Add implementation of nativeImageForCurrentFrame() for SVGImage as
890         it is needed for SVG custom cursor support and Canvas drawing of
891         patterns containing SVG images. As SVGImage no longer keep the
892         native image internally to save memory, the implementation creates
893         the native image when nativeImageForCurrentFrame() and passes
894         its ownership to the caller.
895
896         * svg/graphics/SVGImage.h:
897         Override Image::nativeImageForCurrentFrame() and remove dummy
898         implementation of frameAtIndex() as it is not needed / used.
899
900         * svg/graphics/SVGImageForContainer.cpp:
901         (WebCore::SVGImageForContainer::nativeImageForCurrentFrame):
902         Add implementation of nativeImageForCurrentFrame() which merely
903         forwards the call to the Image being contained.
904
905         * svg/graphics/SVGImageForContainer.h:
906         Override Image::nativeImageForCurrentFrame().
907
908 2013-04-04  Andrei Bucur  <abucur@adobe.com>
909
910         [CSSRegions] RenderFlowThread::renderRegionForLine should use a faster search method
911         https://bugs.webkit.org/show_bug.cgi?id=66921
912
913         Reviewed by David Hyatt.
914
915         The RenderFlowThread::regionAtBlockOffset() function is a hot path for the code using
916         flow threads because it translates from block coordinates to regions.
917         Currently the method is O(n), using a linear search through the regions chain to find the
918         region where a block offset lands.
919         The patch improves this search by using an interval tree (PODIntervalTree). Before a flow
920         thread is laid out, each region is updated to hold the size of the portion of the flow it
921         will receive. This information is gathered inside the interval tree and used to speedup the
922         search in RenderFlowThread::regionAtBlockOffset(). The algorithm uses a custom adapter
923         simplified for looking up offsets inside the interval tree.
924         For now, the interval tree is cleared every time the flow thread portions list is updated.
925         The implementation can be improved but induces some cmplexity as we'd have to manually manage
926         the life cycle of the tree's nodes. The performance gains are good enough as is to make this
927         only optional.
928         Another important change is now the flow thread portion rectangles will not overflow when
929         using auto-height regions (or very large regions). The maximum size of the flow is set to
930         LayoutUnit::max()/2. Any region forcing a greater size will be capped so the thread
931         won't overflow.
932
933         Performance test results:
934         /Layout/RegionsAuto:Time            ms 699.95   181.20  74.11% Better
935         /Layout/RegionsAutoMaxHeight:Time   ms 2083.00  308.55  85.19% Better
936         /Layout/RegionsFixed:Time           ms 726.10   223.65  69.20% Better
937         /Layout/RegionsFixedShort:Time      ms 869.60   288.25  66.85% Better
938
939         Tests: See PerformanceTests/Layout/Regions*
940
941         * rendering/RenderFlowThread.cpp:
942         (WebCore::RenderFlowThread::regionAtBlockOffset):
943         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
944         (WebCore::RenderFlowThread::RegionSearchAdapter::collectIfNeeded):
945         (WebCore):
946         * rendering/RenderFlowThread.h:
947         (WebCore):
948
949 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
950
951         [Qt] WebSocket errors should be logged to console
952         https://bugs.webkit.org/show_bug.cgi?id=113842
953
954         Reviewed by Jocelyn Turcotte.
955
956         Pass the reason of a failure to SocketStreamError instance
957         and notify it via SocketStreamHandleClient::didFailSocketStream().
958
959         Test : http/tests/inspector/console-websocket-error.html
960
961         * platform/network/qt/SocketStreamError.h:
962         (WebCore::SocketStreamError::SocketStreamError):
963         * platform/network/qt/SocketStreamHandleQt.cpp:
964         (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
965         (WebCore::SocketStreamHandlePrivate::socketErrorCallback):
966
967 2013-04-04  Ed Bartosh  <bartosh@gmail.com>
968
969         [ATK] build fails when accessibility is turned off
970         https://bugs.webkit.org/show_bug.cgi?id=113699
971
972         Reviewed by Gyuyoung Kim.
973
974         * editing/atk/FrameSelectionAtk.cpp: Wrapped accessibility code in #if HAVE(ACCESSIBILITY)
975
976 2013-04-04  Seokju Kwon  <seokju.kwon@gmail.com>
977
978         Web Inspector: fix closure compiler warnings in the profiler code HeapSnapshotDataGrids.js
979         https://bugs.webkit.org/show_bug.cgi?id=113922
980
981         Reviewed by Yury Semikhatsky.
982
983         No new tests: no change in behaviour.
984
985         * inspector/front-end/HeapSnapshotDataGrids.js:
986
987 2013-04-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
988
989         [EFL] Add a decoration image to search input field
990         https://bugs.webkit.org/show_bug.cgi?id=113552
991
992         Reviewed by Laszlo Gombos.
993
994         Though EFL port has a decoration image for search input field, we didn't use it.
995         Start to show it.
996
997         Tests: fast/forms/search-cancel-button-style-sharing.html
998                fast/forms/search-rtl.html
999                fast/css/input-search-padding.html
1000                fast/css/text-input-with-webkit-border-radius.html
1001                fast/css/text-overflow-input.html
1002                fast/forms/box-shadow-override.html
1003                fast/forms/control-restrict-line-height.html
1004                fast/forms/input-appearance-height.html
1005                fast/forms/placeholder-position.html
1006                fast/forms/placeholder-pseudo-style.html
1007                fast/forms/search-styled.html
1008                fast/forms/search-vertical-alignment.html
1009                fast/forms/searchfield-heights.html
1010                fast/repaint/search-field-cancel.html 
1011                fast/replaced/width100percent-searchfield.html
1012
1013         * platform/efl/RenderThemeEfl.cpp:
1014         (WebCore):
1015         (WebCore::RenderThemeEfl::supportsDataListUI):
1016         (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle):
1017
1018 2013-04-03  Kent Tamura  <tkent@chromium.org>
1019
1020         Input value/placeholder is not redrawn when the input height grows
1021         https://bugs.webkit.org/show_bug.cgi?id=113845
1022
1023         Reviewed by Ojan Vafai.
1024
1025         Test: fast/forms/text/text-height-grow.html
1026
1027         * rendering/RenderTextControlSingleLine.cpp:
1028         (WebCore::RenderTextControlSingleLine::styleDidChange):
1029         We need relayout of the inner text element.
1030
1031 2013-04-03  Shawn Singh  <shawnsingh@chromium.org>
1032
1033         Add comment to clarify isStackingContext() in RenderLayer.h
1034         https://bugs.webkit.org/show_bug.cgi?id=113909
1035
1036         Reviewed by Simon Fraser.
1037
1038         It was not obvious how the implementation of isStackingContext()
1039         was correct, a comment is appropriate here for anyone who reads
1040         this code in the future.
1041
1042         Just a change in comment, no test needed.
1043
1044         * rendering/RenderLayer.h:
1045
1046 2013-04-03  Hans Muller  <hmuller@adobe.com>
1047
1048         [CSS Exclusions] Removed ExclusionShape dead code
1049         https://bugs.webkit.org/show_bug.cgi?id=113904
1050
1051         Reviewed by Dirk Schulze.
1052
1053         No new tests, just removing dead code.
1054
1055         * rendering/ExclusionShape.cpp:
1056         (WebCore::ExclusionShape::createExclusionShape):
1057         * rendering/ExclusionShape.h:
1058         (ExclusionShape):
1059
1060 2013-04-03  Otto Derek Cheung  <otcheung@rim.com>
1061
1062         [BlackBerry] Switch MediaPlayerPrivateBlackBerry.cpp's timer to use CLOCK_MONOTONIC
1063         https://bugs.webkit.org/show_bug.cgi?id=113900
1064
1065         Reviewed by Rob Buis.
1066         Internally Reviewed by Jeff Rogers.
1067
1068         Timers should use CLOCK_MONOTONIC to avoid undesirable effects when
1069         the user switches the system time.
1070
1071         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1072         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
1073
1074 2013-04-03  Dave Michael  <dmichael@chromium.org>
1075
1076         Unable to focus on embedded plugins such as Flash via javascript focus()
1077         https://bugs.webkit.org/show_bug.cgi?id=32292
1078
1079         Reviewed by Ryosuke Niwa.
1080
1081         Make embed, object, and applet elements support focus() when
1082         appropriate. Prior to this patch, javascript focus() had no effect on
1083         embed, object, or applet elements unless tabindex or contenteditable is
1084         set. With this patch, focus() will focus the element unless the plugin
1085         content has failed to load (i.e., we are showing either fallback content
1086         or an unavailable plugin indicator).
1087
1088         Test: plugins/focus.html
1089               java/focus.html
1090
1091         * html/HTMLPlugInElement.cpp:
1092         (WebCore::HTMLPlugInElement::supportsFocus):
1093         Overridden to return true except when the plugin content has failed to load.
1094         * html/HTMLPlugInElement.h:
1095         (WebCore::HTMLPlugInElement::useFallbackContent):
1096         Moved up from HTMLPlugInImageElement.
1097         (WebCore::HTMLPlugInElement::supportsFocus):
1098         * html/HTMLPlugInElement.h:
1099         (WebCore::HTMLPlugInImageElement::useFallbackContent):
1100         Removed. Now the implementation is inherited from HTMLPlugInElement.
1101
1102 2013-04-03  Glenn Adams  <glenn@skynav.com>
1103
1104         Element boundaries prevent Japanese line break opportunities
1105         https://bugs.webkit.org/show_bug.cgi?id=105692
1106
1107         Reviewed by Darin Adler.
1108
1109         Introduce use of prior context when using text break iterators
1110         in non-ASCII path through nextBreakablePosition(). This enables
1111         the use of line break context across an element boundary for
1112         the non-ASCII path. Use of this context with the ASCII path was
1113         enabled by https://bugs.webkit.org/show_bug.cgi?id=17427.
1114
1115         Performance tests of line layout and html5 parsing show that this
1116         patch provides an approximately 4% improvement with Japanese and
1117         no statistically significant regression with ASCII path. Parsing
1118         (html5-full-render) performance is not significantly affected.
1119
1120         Tests: fast/text/line-break-between-text-nodes-cjk.html
1121                fast/text/line-break-between-text-nodes-latin1.html
1122
1123         Expect rebaselines will be needed due to different line breaks:
1124                fast/text/international/003.html
1125                fast/text/international/text-combine-image-test-expected.html
1126                fast/text/writing-mode/Kusa-Makura-background-canvas.html
1127
1128         * platform/text/TextBreakIterator.cpp:
1129         (WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
1130         * platform/text/TextBreakIterator.h:
1131         (WebCore::LazyLineBreakIterator::priorContextLength): Added.
1132         (WebCore::LazyLineBreakIterator::get): Pass prior context to ICU path.
1133         (WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator): Editorial.
1134         * platform/text/TextBreakIteratorICU.cpp:
1135         Use prior context from line break iterators. Requires
1136         adding new UTF16 (UChar*) text provider and reimplementing
1137         Latin1 (LChar*) text provider. Implementation is optimized
1138         by using generic functionality that applies to both string
1139         sources.
1140         (WebCore::textPinIndex): Added.
1141         (WebCore::textNativeLength): Added.
1142         (WebCore::textFixPointer): Added.
1143         (WebCore::textClone): Added.
1144         (WebCore::textExtract): Added.
1145         (WebCore::textClose): Added.
1146         (WebCore::textGetContext): Added.
1147         (WebCore::textLatin1GetCurrentContext): Added.
1148         (WebCore::textLatin1MoveInPrimaryContext): Added.
1149         (WebCore::textLatin1SwitchToPrimaryContext): Added.
1150         (WebCore::textLatin1MoveInPriorContext): Added.
1151         (WebCore::textLatin1SwitchToPriorContext): Added.
1152         (WebCore::textInChunkOrOutOfRange): Added.
1153         (WebCore::textLatin1Access): Added.
1154         (WebCore::textInit): Added.
1155         (WebCore::textOpenLatin1): Added.
1156         (WebCore::textUTF16GetCurrentContext): Added.
1157         (WebCore::textUTF16MoveInPrimaryContext): Added.
1158         (WebCore::textUTF16SwitchToPrimaryContext): Added.
1159         (WebCore::textUTF16MoveInPriorContext): Added.
1160         (WebCore::textUTF16SwitchToPriorContext): Added.
1161         (WebCore::textUTF16Access): Added.
1162         (WebCore::textOpenUTF16): Added.
1163         (WebCore::acquireLineBreakIterator): Use new text providers with prior context.
1164         * platform/text/wchar/TextBreakIteratorWchar.cpp:
1165         (WebCore::acquireLineBreakIterator): Pass prior context to non-ICU path.
1166         * rendering/break_lines.cpp:
1167         (WebCore::nextBreakablePosition): Use prior context in ICU path.
1168
1169 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1170
1171         [Chromium] Bad cast from BitmapImageSingleFrameSkia to BitmapImage
1172         https://bugs.webkit.org/show_bug.cgi?id=113492
1173
1174         Reviewed by Stephen White.
1175
1176         Remove BitmapImageSingleFrameSkia and have ImageBufferSkia construct
1177         BitmapImage objects instead via an intermediate NativeImageSkia.
1178
1179         No new tests, covered by existing tests.
1180
1181         * WebCore.gypi:
1182         * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp: Remove
1183         include for BitmapImageSingleFrameSkia.h header.
1184         * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Removed.
1185         * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Removed.
1186         * platform/graphics/skia/ImageBufferSkia.cpp: Construct BitmapImage
1187         objects instead of BitmapImageSingleFrameSkia ones.
1188         (WebCore::ImageBuffer::copyImage):
1189         (WebCore::drawNeedsCopy):
1190         (WebCore::ImageBuffer::draw):
1191         (WebCore::ImageBuffer::drawPattern):
1192         * platform/graphics/skia/ImageSkia.cpp:
1193         (WebCore::BitmapImage::BitmapImage): Implement BitmapImage constructor
1194         that takes an NativeImageSkia* in argument.
1195         (WebCore):
1196         (WebCore::BitmapImage::draw): Remove m_source.initialized() check as
1197         this will return false for BitmapImage objects constructed from a
1198         NativeImageSkia, due to the lack of decoder.
1199         * platform/graphics/skia/NativeImageSkia.cpp:
1200         (WebCore::NativeImageSkia::NativeImageSkia): Add parameter to the
1201         NativeImageSkia constructor so that the caller can request a deep copy
1202         instead of a shallow one. This is needed by the ImageBuffer.
1203         * platform/graphics/skia/NativeImageSkia.h:
1204         * platform/image-decoders/ImageDecoder.h:
1205         (WebCore::ImageFrame::setSkBitmap):
1206
1207 2013-04-03  David Vest  <davve@opera.com>
1208
1209         ASSERTION FAILED: resultAnimationElement->m_animatedType
1210         https://bugs.webkit.org/show_bug.cgi?id=93528
1211
1212         Reviewed by Philip Rogers.
1213
1214         When the order of animation elements change within an animation
1215         group, we can't assume that the resultElement is the same as it
1216         was when the animation was frozen. Make sure to reset the
1217         animation type for the resultElement before updating the
1218         animation.
1219
1220         Test: svg/animations/animation-dependency-crash.html
1221
1222         * svg/animation/SVGSMILElement.cpp:
1223         (WebCore::SVGSMILElement::progress):
1224
1225 2013-04-03  Timothy Hatcher  <timothy@apple.com>
1226
1227         Stop unconditionally enabling JavaScript execution when closing the Web Inspector.
1228
1229         https://webkit.org/b/113889
1230         rdar://problem/12281794
1231
1232         Reviewed by Joseph Pecoraro.
1233
1234         * inspector/InspectorPageAgent.cpp:
1235         (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize m_originalScriptExecutionDisabled.
1236         (WebCore::InspectorPageAgent::enable): Populate m_originalScriptExecutionDisabled based on current setting.
1237         (WebCore::InspectorPageAgent::disable): Restore previous setting.
1238         * inspector/InspectorPageAgent.h:
1239         (InspectorPageAgent): Added m_originalScriptExecutionDisabled.
1240
1241 2013-04-03  Dean Jackson  <dino@apple.com>
1242
1243         Cross fade into restarted plugin
1244         https://bugs.webkit.org/show_bug.cgi?id=113868
1245
1246         Reviewed by Tim Horton.
1247
1248         Allow a restarted plugin to fade in over its snapshot, avoiding the abrupt
1249         flash of empty content. The WebCore part of this patch marks the plugin
1250         element as restarted, and draws the snapshot for a short amount of time
1251         as the plugin is restarting. After the plugin has reappeared, we stop drawing
1252         the snapshot.
1253
1254         There is a little bit of drive-by whitespace removal in HTMLPlugInImageElement.
1255
1256         * html/HTMLPlugInElement.h:
1257         (WebCore::HTMLPlugInElement::restartedPlugin): New method indicating if the plugin has been restarted.
1258         * html/HTMLPlugInImageElement.cpp:
1259         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialise new timer and member variable.
1260         (WebCore::HTMLPlugInImageElement::setDisplayState): If we are moving into a restarting state, make sure
1261             to remember this and also start a timer so that we show the snapshot for while.
1262         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): No need to draw the snapshot from here on.
1263         * html/HTMLPlugInImageElement.h:
1264         (HTMLPlugInImageElement): Member variable to remember if we've restarted.
1265         * rendering/RenderEmbeddedObject.cpp:
1266         (WebCore::RenderEmbeddedObject::paintContents): Only exit early from the paint if we're not a restarting
1267             plugin, otherwise we do want to draw the snapshot if there is one.
1268         * rendering/RenderLayerBacking.cpp:
1269         (WebCore::isRestartedPlugin): Detects a restarted plugin.
1270         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Don't become a simple container
1271             compositing layer if you're a restarted plugin.
1272
1273 2013-04-03  John Griggs  <jgriggs@blackberry.com>
1274
1275         [BlackBerry] Adjustments to media controls appearance.
1276         https://bugs.webkit.org/show_bug.cgi?id=113816
1277         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=316398
1278         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=316438
1279
1280         Updates to the BlackBerry media controls:
1281          - extend the timeline slider.
1282          - move the volume slider for audio elements up so it does not overlap the main panel.
1283          - upstream some other cosmetic changes to media controls that were not previously upstreamed.
1284
1285         Reviewed by Rob Buis.
1286
1287         BlackBerry-specific, cosmetic change; No new tests required.
1288
1289         * platform/blackberry/RenderThemeBlackBerry.cpp:
1290         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
1291         (WebCore::RenderThemeBlackBerry::paintMediaPlayButton):
1292         (WebCore::RenderThemeBlackBerry::paintMediaMuteButton):
1293         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
1294         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
1295         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderThumb):
1296
1297 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1298
1299         [Gstreamer] Use gst_buffer_extract() in copyGstreamerBuffersToAudioChannel()
1300         https://bugs.webkit.org/show_bug.cgi?id=113880
1301
1302         Reviewed by Philippe Normand.
1303
1304         copyGstreamerBuffersToAudioChannel() was mapping the GstBuffer content to memcpy
1305         it to the AudioChannel buffer. This patch leverages gst_buffer_extract() to
1306         simplify the code as it does exactly what we need: gst_buffer_map, memcpy,
1307         gst_buffer_unmap and error handling.
1308
1309         Also replace GstBuffer NULL check by an assertion as we already make sure they
1310         are not NULL before adding them to the list. Additionally, we now call
1311         audioChannel->mutableData() only once instead of once per iteration. It is
1312         a bit better as the getter does some work internally.
1313
1314         No new tests, no behavior change.
1315
1316         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1317         (WebCore::copyGstreamerBuffersToAudioChannel):
1318
1319 2013-04-03  Antoine Quint  <graouts@apple.com>
1320
1321         Web Inspector: DOM.highlightRect() and DOM.highlightQuad() should allow for page coordinates
1322         https://bugs.webkit.org/show_bug.cgi?id=113869
1323
1324         Add a new "usePageCoordinates" parameter to DOM.highlightRect() and DOM.highlightQuad()
1325         allowing to specify that the rect or quad to highlight should be converted to page
1326         coordinates instead of using the default viewport coordinates.
1327
1328         Reviewed by Timothy Hatcher.
1329
1330         * inspector/Inspector.json:
1331         * inspector/InspectorDOMAgent.cpp:
1332         (WebCore::InspectorDOMAgent::highlightRect):
1333         (WebCore::InspectorDOMAgent::highlightQuad):
1334         (WebCore::InspectorDOMAgent::innerHighlightQuad):
1335         Store the "usePageCoordinates" parameter obtained from the protocol calls onto the
1336         highlight configuration object so that it may be used within the InspectorOverlay.
1337
1338         * inspector/InspectorDOMAgent.h:
1339         (InspectorDOMAgent):
1340         * inspector/InspectorOverlay.cpp:
1341         (WebCore::InspectorOverlay::highlightQuad):
1342         Check the highlight configuration for the "usePageCoordinates" parameter and
1343         apply the inverse of the page's scroll offset to the quad if it's true.
1344
1345         * inspector/InspectorOverlay.h:
1346         (HighlightConfig):
1347         (WebCore::Highlight::setDataFromConfig):
1348         (Highlight):
1349
1350 2013-04-03  Kangil Han  <kangil.han@samsung.com>
1351
1352         Add omitted reference operator of VisiblePosition in AccessibilityObject
1353         https://bugs.webkit.org/show_bug.cgi?id=113879
1354
1355         Reviewed by Darin Adler.
1356
1357         Seems reference operator has been omitted in startOfStyleRange function, so add it.
1358
1359         * accessibility/AccessibilityObject.cpp:
1360         (WebCore::startOfStyleRange):
1361
1362 2013-04-03  Jessie Berlin  <jberlin@apple.com>
1363
1364         Update the localizable strings file.
1365
1366         Rubber-stamped by Michael Saboff.
1367
1368         * English.lproj/Localizable.strings:
1369
1370 2013-04-03  David Kilzer  <ddkilzer@apple.com>
1371
1372         BUILD FIX (r147493): Fix number of arguments to AudioDestinationIOS constructor
1373
1374         Fixes the following build failures:
1375
1376             Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:84:25: error: no matching constructor for initialization of 'WebCore::AudioDestinationIOS'
1377                 return adoptPtr(new AudioDestinationIOS(callback, sampleRate));
1378                                     ^                   ~~~~~~~~~~~~~~~~~~~~
1379             In file included from Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:36:
1380             Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:44:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
1381                 AudioDestinationIOS(AudioIOCallback&, unsigned numberOfOutputChannels, double sampleRate);
1382                 ^
1383             Source/WebCore/platform/audio/ios/AudioDestinationIOS.h:42:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
1384             class AudioDestinationIOS : public AudioDestination, public AudioSessionListener {
1385                   ^
1386             Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:101:22: error: out-of-line definition of 'AudioDestinationIOS' does not match any declaration in 'WebCore::AudioDestinationIOS'
1387             AudioDestinationIOS::AudioDestinationIOS(AudioIOCallback& callback, double sampleRate)
1388                                  ^~~~~~~~~~~~~~~~~~~
1389             2 errors generated.
1390
1391         * platform/audio/ios/AudioDestinationIOS.h:
1392         (AudioDestinationIOS): Remove numberOfOutputChannels argument.
1393
1394 2013-04-03  David Kilzer  <ddkilzer@apple.com>
1395
1396         BUILD FIX (r147494): -[AVAudioSession setCategory:error:] takes NSError**
1397
1398         Fixes the following build failure:
1399
1400             Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:151:71: error: cannot initialize a parameter of type 'NSError **' with an lvalue of type 'NSError *'
1401                 [[AVAudioSession sharedInstance] setCategory:categoryString error:error];
1402                                                                                   ^~~~~
1403
1404         * platform/audio/ios/AudioSessionIOS.mm:
1405         (WebCore::AudioSession::setCategory): Add '&' operator.
1406
1407 2013-04-03  Felipe Zimmerle  <felipe@zimmerle.org>
1408
1409         CSP blocks inline style when cloning a node
1410         https://bugs.webkit.org/show_bug.cgi?id=112270
1411
1412         Reviewed by Adam Barth.
1413
1414         Checks if the Element is being cloned, if so, the application of the
1415         style is allowed otherwise it relies on default permission mechanism.
1416
1417         Test: http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html
1418
1419         * dom/Element.cpp:
1420         (WebCore::Element::attributeChanged): Added parameter
1421         AttributeModificationReason to the method signature.
1422         (WebCore::Element::cloneAttributesFromElement): It is now calling 
1423         attributeChanged with AttributeModificationReason parameter. In this scope
1424         it is always set to ModifiedByCloning.
1425         (WebCode::Element::attributeChangedFromParserOrByCloning):
1426         Added parameter AttributeModificationReason.
1427         * dom/Element.h: Added AttributeModificationReason enum. Used to specify
1428         whenever an attribute was set by a cloned oject or directly.
1429         AttributeModificationReason added to attributeChanged with the default
1430         value set to ModifiedDirectly. 
1431         * dom/StyledElement.cpp: 
1432         (WebCore::StyledElement::attributeChanged): Added
1433         AttributeModificationReason to the method signature.
1434         (WebCore::StyledElement::styleAttributeChanged): Now it is checking the
1435         reason of the update, if the reason is ModifiedDirectly check CSP
1436         before set. If ModifiedByCloning set the attribute ignoring the CSP
1437         policy.
1438         * dom/StyledElement.h:
1439         (StyledElement): Added AttributeModificationReason parameter to the methods:
1440         attributeChanged and styleAttributeChanged, attributeChanged has
1441         ModifiedDirectly as default value.
1442         * svg/SVGElement.cpp: 
1443         (WebCore::SVGElement::attributeChanged): Added AttributeModificationReason
1444         parameter to the method signature.
1445         * svg/SVGElement.h: 
1446         (SVGElement): Added AttributeModificationReason parameter to the
1447         attributeChanged signature with the default value set to:
1448         ModifiedDirectly.
1449
1450 2013-04-03  Csaba Osztrogonác  <ossy@webkit.org>
1451
1452         Unreviewed 32bit buildfix after r147542.
1453
1454         * Modules/websockets/WebSocket.cpp:
1455         (WebCore::WebSocket::didReceiveBinaryData):
1456
1457 2013-04-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1458
1459         [Gstreamer] Avoid calls to g_slist_nth_data in webKitWebAudioSrcLoop()
1460         https://bugs.webkit.org/show_bug.cgi?id=113875
1461
1462         Reviewed by Philippe Normand.
1463
1464         webKitWebAudioSrcLoop() was iterating over 2 GSLists by using a counter and then
1465         calling g_slist_nth_data() to get the element of each GSList. This is inefficient
1466         because calling g_slist_nth_data() will iterate the GSList up until index 'n'.
1467
1468         This patch improves this by keeping pointers to the current element of each list
1469         while iterating, so that we can simply use g_slist_next() to iterate instead
1470         of g_slist_nth_data().
1471
1472         No new tests, no behavior change.
1473
1474         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1475         (webKitWebAudioSrcLoop):
1476
1477 2013-04-03  Keishi Hattori  <keishi@webkit.org>
1478
1479         Actions that require user gesture don't work in window.showModalDialog in Chromium
1480         https://bugs.webkit.org/show_bug.cgi?id=113777
1481
1482         Reviewed by Jochen Eisinger.
1483
1484         In Chromium the window for showModalDialog is not modal which causes the
1485         UserGestureIndicator to block actions in the sub window. We introduce a
1486         RAII that saves the UserGestureIndicator and state, then resets it before
1487         runModalDialog, and restore it when it's done.
1488
1489         No new tests. Can't cause user gesture inside modal dialog.
1490
1491         * dom/UserGestureIndicator.cpp:
1492         (WebCore::UserGestureIndicatorDisabler::UserGestureIndicatorDisabler): Saves and resets the topmost indicator and state.
1493         (WebCore):
1494         (WebCore::UserGestureIndicatorDisabler::~UserGestureIndicatorDisabler): Restores topmost indicator and state.
1495         * dom/UserGestureIndicator.h:
1496         (WebCore):
1497         (UserGestureIndicatorDisabler): RAII to temporarily disable UserGestureIndicator.
1498         (UserGestureIndicator): Allow access to UserGestureIndicatorDisabler.
1499         * page/DOMWindow.cpp:
1500         (WebCore::DOMWindow::showModalDialog): Disable UserGestureIndicator while runModalDialog.
1501
1502 2013-04-03  Zeno Albisser  <zeno@webkit.org>
1503
1504         [Qt] Fail gracefully if an OpenGL context could not be created.
1505         https://bugs.webkit.org/show_bug.cgi?id=113784
1506
1507         In case we fail to create or adopt a valid platform OpenGL context
1508         we do not want to provide a GraphicsContext3D instance.
1509         Otherwise we would crash as soon as the instance is being used.
1510
1511         Reviewed by Jocelyn Turcotte.
1512
1513         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1514         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1515         (WebCore::GraphicsContext3D::GraphicsContext3D):
1516
1517 2013-04-03  ChangSeok Oh  <changseok.oh@collabora.com>
1518
1519         [GTK][AC] Implement matrix keyframe animations with clutter ac backend
1520         https://bugs.webkit.org/show_bug.cgi?id=110314
1521
1522         Reviewed by Gustavo Noronha Silva.
1523
1524         Clutter 1.12 doesn't support additive transform animations yet, So clutter ac backend
1525         uses matrix animations for the case. This patch follows changeset 143369, 143343
1526         to support matrix keyframe animations. I believe this change is easy if you understand
1527         above two changesets.
1528
1529         Covered by existing animation tests.
1530
1531         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
1532         (WebCore::PlatformClutterAnimation::setValues):
1533         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
1534         (WebCore):
1535         (WebCore::PlatformClutterAnimation::addTransformTransition):
1536         * platform/graphics/clutter/PlatformClutterAnimation.h:
1537         (PlatformClutterAnimation):
1538
1539 2013-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1540
1541         Should close select popup when the element loses focus
1542         https://bugs.webkit.org/show_bug.cgi?id=113220
1543
1544         Reviewed by Kent Tamura.
1545
1546         Test: fast/forms/select-popup-closes-on-blur.html
1547
1548         * html/HTMLSelectElement.cpp:
1549         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): handle the blur event, closing
1550         the popup menu if any.
1551         * testing/Internals.cpp:
1552         (WebCore::Internals::isSelectPopupVisible): utility to query the select node renderer to
1553         find out whether the popup is open or closed.
1554         (WebCore):
1555         * testing/Internals.h: add the new method definition.
1556         * testing/Internals.idl: ditto.
1557
1558 2013-03-28  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1559
1560         [Qt] Switch ContextMenu implementation to CROSS_PLATFORM_CONTEXT_MENU
1561         https://bugs.webkit.org/show_bug.cgi?id=113535
1562
1563         Reviewed by Simon Hausmann.
1564
1565         Now Qt uses the CROSS_PLATFORM_CONTEXT_MENUS
1566         USE flag. This flag provides a full cross-platform
1567         representation of a ContextMenu and a ContextMenuItem.
1568         The embedder can then decide how to show this, so neither
1569         WebCore nor WebCore/platform need to know any platform
1570         specifics about menus.
1571
1572         No new tests, no behavior changes.
1573
1574         * Target.pri:
1575         * platform/ContextMenu.h:
1576         (ContextMenu):
1577         * platform/ContextMenuItem.h:
1578         * platform/qt/ContextMenuItemQt.cpp:
1579         (WebCore::ContextMenuItem::platformContextMenuItem):
1580         * platform/qt/ContextMenuQt.cpp:
1581         (WebCore::ContextMenu::ContextMenu):
1582         (WebCore::ContextMenu::getContextMenuItems):
1583         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1584         (WebCore::ContextMenu::platformContextMenu):
1585
1586 2013-04-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1587
1588         [Qt] Monospace font does not render in proper sizes
1589         https://bugs.webkit.org/show_bug.cgi?id=93263
1590
1591         Reviewed by Jocelyn Turcotte.
1592
1593         Remove this patch's artificial dependency on Qt 5.1.
1594
1595         * platform/graphics/qt/FontPlatformDataQt.cpp:
1596         (WebCore::FontPlatformData::FontPlatformData):
1597
1598 2013-04-03  Takeshi Yoshino  <tyoshino@chromium.org>
1599
1600         Refine LOG messages in WebSocket related components
1601         https://bugs.webkit.org/show_bug.cgi?id=113852
1602
1603         Reviewed by Kent Tamura.
1604
1605         Refine LOG messages by
1606         - Make them contain method names to ease identifying where the event occurred.
1607         - For consistency, make all messages print the pointer of the origin instance.
1608         - Quote UTF8 data in LOG messages.
1609         - For overloaded methods, add the type to clarify which one is run
1610
1611         * Modules/websockets/WebSocket.cpp:
1612         (WebCore::WebSocket::connect):
1613         (WebCore::WebSocket::send):
1614         (WebCore::WebSocket::close):
1615         (WebCore::WebSocket::contextDestroyed):
1616         (WebCore::WebSocket::didConnect):
1617         (WebCore::WebSocket::didReceiveMessage):
1618         (WebCore::WebSocket::didReceiveBinaryData):
1619         (WebCore::WebSocket::didReceiveMessageError):
1620         (WebCore::WebSocket::didUpdateBufferedAmount):
1621         (WebCore::WebSocket::didStartClosingHandshake):
1622         (WebCore::WebSocket::didClose):
1623         * Modules/websockets/WebSocketChannel.cpp:
1624         (WebCore::WebSocketChannel::connect):
1625         (WebCore::WebSocketChannel::subprotocol):
1626         (WebCore::WebSocketChannel::extensions):
1627         (WebCore::WebSocketChannel::send):
1628         (WebCore::WebSocketChannel::bufferedAmount):
1629         (WebCore::WebSocketChannel::close):
1630         (WebCore::WebSocketChannel::fail):
1631         (WebCore::WebSocketChannel::disconnect):
1632         (WebCore::WebSocketChannel::willOpenSocketStream):
1633         (WebCore::WebSocketChannel::didOpenSocketStream):
1634         (WebCore::WebSocketChannel::didCloseSocketStream):
1635         (WebCore::WebSocketChannel::didReceiveSocketStreamData):
1636         (WebCore::WebSocketChannel::didFailSocketStream):
1637         (WebCore::WebSocketChannel::didStartLoading):
1638         (WebCore::WebSocketChannel::didReceiveData):
1639         (WebCore::WebSocketChannel::didFinishLoading):
1640         (WebCore::WebSocketChannel::didFail):
1641         (WebCore::WebSocketChannel::appendToBuffer):
1642         (WebCore::WebSocketChannel::processBuffer):
1643         (WebCore::WebSocketChannel::startClosingHandshake):
1644         (WebCore::WebSocketChannel::closingTimerFired):
1645         * Modules/websockets/WebSocketDeflater.cpp:
1646         (WebCore::WebSocketDeflater::~WebSocketDeflater):
1647         (WebCore::WebSocketInflater::~WebSocketInflater):
1648         * Modules/websockets/WebSocketHandshake.cpp:
1649         (WebCore::WebSocketHandshake::readServerHandshake):
1650         * platform/network/chromium/SocketStreamHandle.cpp:
1651         (WebCore::SocketStreamHandleInternal::connect):
1652         (WebCore::SocketStreamHandleInternal::send):
1653         (WebCore::SocketStreamHandleInternal::close):
1654         (WebCore::SocketStreamHandleInternal::didOpenStream):
1655         (WebCore::SocketStreamHandleInternal::didSendData):
1656         (WebCore::SocketStreamHandleInternal::didReceiveData):
1657         (WebCore::SocketStreamHandleInternal::didClose):
1658         (WebCore::SocketStreamHandleInternal::didFail):
1659
1660 2013-04-03  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
1661
1662         [Qt] Update QMAKE_MAC_SDK check for Qt 5.1
1663
1664         Relies on QMAKE_MAC_SDK_VERSION set in features.prf
1665
1666         Reviewed by Simon Hausmann.
1667
1668         * WebCore.pri:
1669
1670 2013-04-03  Kristof Provost  <kristof@codepro.be>
1671
1672         [Qt] assignToHTMLImageElement no longer exists in Qt5
1673         https://bugs.webkit.org/show_bug.cgi?id=113639
1674
1675         Reviewed by Simon Hausmann.
1676
1677         No new tests: covered by ./Source/WebKit/qt/tests/hybridPixmap/test.html
1678
1679         * bridge/qt/qt_pixmapruntime.cpp:
1680         (JSC::Bindings::QtPixmapRuntime::getClassRef):
1681
1682 2013-04-03  Antoine Quint  <graouts@apple.com>
1683
1684         Web Inspector: crash in WebCore::InspectorLayerTreeAgent::buildObjectForLayer if a layer is created for an anonymous RenderObject (:first-letter)
1685         https://bugs.webkit.org/show_bug.cgi?id=113768
1686
1687         The InspectorLayerTreeAgent now knows how to deal with anonymous RenderObjects
1688         for the :first-letter and :first-line pseudo-elements.
1689
1690         Reviewed by Timothy Hatcher.
1691
1692         Test: inspector-protocol/layers/layers-anonymous.html
1693
1694         * inspector/Inspector.json:
1695         Change the Layer type in the LayerTree domain to have more accurate terminology
1696         (pseudo-element vs. pseudo-class) and a new optional isAnonymous flag for layers
1697         associated to anonymous RenderObjects.
1698
1699         * inspector/InspectorLayerTreeAgent.cpp:
1700         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1701         Check for anonymous RenderObjects and set the parent renderer's node as the node
1702         for this layer since anonymous renderers have the Document as their node and this
1703         would not be satisfactory to show in a front-end. We also check for anonymous
1704         RenderObjects for the :first-letter and :first-line pseudo-elements and set them
1705         in the pseudoElement property of the Layer object created such that a front-end
1706         could correctly identify what type of pseudo-element for the associated node
1707         yielded this layer.
1708
1709         (WebCore::InspectorLayerTreeAgent::idForNode):
1710         Here we fix the actual crash by first checking if the node provided is null and
1711         returning 0 if there's no such node. This ensures that any scenario where there
1712         is no node associated with the RenderObject simply informs of the front-end that
1713         no such node exists and we do not crash.
1714
1715 2013-04-03  Alexander Pavlov  <apavlov@chromium.org>
1716
1717         Web Inspector: [REGRESSION(r147117)][Elements] Copy/paste keyboard shortcuts broken in "Edit as HTML"
1718         https://bugs.webkit.org/show_bug.cgi?id=113798
1719
1720         Reviewed by Yury Semikhatsky.
1721
1722         Stop propagation of "copy" event from the multiline editor's
1723         CodeMirror host element so that it is not handled by
1724         WebInspector.documentCopy().
1725
1726         * inspector/front-end/UIUtils.js:
1727         (.consumeCopy):
1728         (.cleanUpAfterEditing):
1729         * inspector/front-end/inspector.js:
1730         (WebInspector.addMainEventListeners):
1731
1732 2013-04-03  Takashi Sakamoto  <tasak@google.com>
1733
1734         With borders of differing alpha, the corners become squared off
1735         https://bugs.webkit.org/show_bug.cgi?id=113744
1736
1737         Reviewed by Simon Fraser.
1738
1739         paintTranslucentBorderSides should pick up borders with common color
1740         in order: top, bottom, left and right (not top, right, bottom and
1741         left), because willBeOverdrawn depends on the assumption, borders are
1742         drawn in order: top, bottom, left and right.
1743
1744         Test: fast/borders/border-left-right-same-bottom-different-color.html
1745
1746         * rendering/RenderBoxModelObject.cpp:
1747         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
1748
1749 2013-04-03  Mihnea Ovidenie  <mihnea@adobe.com>
1750
1751         [New Multicolumn]Remove assert in RenderMultiColumnFlowThread::createAnonymous
1752         https://bugs.webkit.org/show_bug.cgi?id=113855
1753
1754         Reviewed by Antti Koivisto.
1755
1756         Remove CSSRegions specific assert from new multicolumn implementation.
1757         No change in functionality, no new tests.
1758
1759         * rendering/RenderMultiColumnFlowThread.cpp:
1760         (WebCore::RenderMultiColumnFlowThread::createAnonymous):
1761
1762 2013-04-03  Mike West  <mkwst@chromium.org>
1763
1764         X-Frame-Options: Blocked frames should not inherit their parent's SecurityOrigin.
1765         https://bugs.webkit.org/show_bug.cgi?id=112903
1766
1767         Reviewed by Adam Barth.
1768
1769         This change brings WebKit in line with IE and Gecko's behavior, both of
1770         which treat the blocked frame as being cross-origin for the purposes of
1771         access checks ('[frame].contentWindow.location.href' is inaccessible,
1772         for example).
1773
1774         * dom/Document.cpp:
1775         (WebCore::Document::processHttpEquiv):
1776             Rather than redirecting to 'about:blank', redirect to a URL which
1777             does not inherit the SecurityOrigin of the parent.
1778         * loader/DocumentLoader.cpp:
1779         (WebCore::DocumentLoader::responseReceived):
1780             Before calling cancelMainResourceLoad, ensure that the frame's
1781             document is sandboxed into a unique origin so that it doesn't inherit
1782             the parent's SecurityOrigin.
1783
1784 2013-04-03  Mikhail Naganov  <mnaganov@chromium.org>
1785
1786         [Chromium] Implement target-densityDpi viewport property emulation
1787         https://bugs.webkit.org/show_bug.cgi?id=110835
1788
1789         The value is only used in the Chromium port, when the corresponding
1790         setting is enabled.
1791
1792         This is needed for supporting existing WebView-based applications
1793         that rely on this property.
1794
1795         Reviewed by Adam Barth.
1796
1797         * dom/ViewportArguments.cpp:
1798         (WebCore::findTargetDensityDPIValue):
1799         (WebCore):
1800         (WebCore::setViewportFeature):
1801         * dom/ViewportArguments.h:
1802         (WebCore::ViewportArguments::ViewportArguments):
1803         (ViewportArguments):
1804         (WebCore::ViewportArguments::operator==):
1805
1806 2013-04-03  Mike West  <mkwst@chromium.org>
1807
1808         Extract URL that doesn't inherit a parent's SecurityOrigin out into a constant.
1809         https://bugs.webkit.org/show_bug.cgi?id=113780
1810
1811         Reviewed by Jochen Eisinger.
1812
1813         We're scheduling navigations to 'data:text/html,' in XSSAuditor in
1814         order to end up on a page that doesn't inherit its parent's
1815         SecurityOrigin. We'll be reusing this mechainsm to solve
1816         http://wkbug.com/112903
1817
1818         This patch makes us more explicit about what we're doing and why.
1819         It doesn't change any behavior: XSSAuditor tests should still pass.
1820
1821         * html/parser/XSSAuditorDelegate.cpp:
1822         (WebCore::XSSAuditorDelegate::didBlockScript):
1823             Use SecurityOrigin::urlWithUniqueSecurityOrigin rather than a
1824             literal string to make our intentions clear.
1825         * page/SecurityOrigin.cpp:
1826         (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin):
1827         * page/SecurityOrigin.h:
1828             Add the new static method.
1829
1830 2013-04-02  Chris Fleizach  <cfleizach@apple.com>
1831
1832         clean up static casts in WebAccessibilityObjectWrapperMac.mm to methods like toAccessibilityList()
1833         https://bugs.webkit.org/show_bug.cgi?id=113828
1834
1835         Reviewed by Tim Horton.
1836
1837         static_cast changed to toAccessibilityList().
1838
1839         * accessibility/AccessibilityList.h:
1840         (WebCore::toAccessibilityList):
1841         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1842         (-[WebAccessibilityObjectWrapper subrole]):
1843         (-[WebAccessibilityObjectWrapper roleDescription]):
1844
1845 2013-04-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1846
1847         Unreviewed, rolling out r147370.
1848         http://trac.webkit.org/changeset/147370
1849         https://bugs.webkit.org/show_bug.cgi?id=113850
1850
1851         This patch is causing crashes in video tests on all Mac bots.
1852         (Requested by jernoble_ on #webkit).
1853
1854         * html/HTMLMediaElement.cpp:
1855         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1856
1857 2013-04-02  James Craig  <james@cookiecrook.com>
1858
1859         AXRoleDescripton for DL is "list"; should be "description list"
1860         https://bugs.webkit.org/show_bug.cgi?id=111665
1861
1862         Reviewed by Chris Fleizach.
1863
1864         Defining the role and description strings, and accessors for DL.
1865         This previously relied on getting the role and description from the platform API.
1866
1867         Updated existing test coverage.
1868
1869         * English.lproj/Localizable.strings:
1870         * accessibility/AccessibilityObject.h:
1871         * accessibility/AccessibilityRenderObject.cpp:
1872         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1873         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1874         (createAccessibilityRoleMap):
1875         (-[WebAccessibilityObjectWrapper subrole]):
1876         (-[WebAccessibilityObjectWrapper roleDescription]):
1877         * platform/LocalizedStrings.cpp:
1878         (WebCore::AXDescriptionListText):
1879         (WebCore):
1880         * platform/LocalizedStrings.h:
1881         (WebCore):
1882         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1883         (WebCore::AXDescriptionListText):
1884         (WebCore):
1885         * platform/chromium/LocalizedStringsChromium.cpp:
1886         (WebCore::AXDescriptionListText):
1887         (WebCore):
1888         * platform/efl/LocalizedStringsEfl.cpp:
1889         (WebCore::AXDescriptionListText):
1890         (WebCore):
1891         * platform/gtk/LocalizedStringsGtk.cpp:
1892         (WebCore::AXDescriptionListText):
1893         (WebCore):
1894         * platform/qt/LocalizedStringsQt.cpp:
1895         (WebCore::AXDescriptionListText):
1896         (WebCore):
1897
1898 2013-04-02  Eugene Klyuchnikov  <eustas@chromium.org>
1899
1900         Web Inspector: [Network] Split business logic and presentation for initiator column.
1901         https://bugs.webkit.org/show_bug.cgi?id=113486
1902
1903         Reviewed by Pavel Feldman.
1904
1905         Currently business logic and presentation are mixed.
1906         This prevents making cell renderer static and applying
1907         viewport rendering, because initiator sorting function
1908         depends on data written when cell is rendered.
1909
1910         * inspector/front-end/NetworkPanel.js:
1911         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
1912         Removed business logic. Use "initiatorInfo".
1913         (WebInspector.NetworkDataGridNode.InitiatorComparator):
1914         Use "initiatorInfo".
1915         * inspector/front-end/NetworkRequest.js:
1916         (WebInspector.NetworkRequest.prototype.initiatorInfo):
1917         Extracted business logic from "refreshInitiatorCell".
1918
1919 2013-04-02  Ryosuke Niwa  <rniwa@webkit.org>
1920
1921         needsLeopardMailQuirks should be removed
1922         https://bugs.webkit.org/show_bug.cgi?id=113749
1923
1924         Reviewed by Benjamin Poulain.
1925
1926         Removed needsLeopardMailQuirks from settings.in after r147447.
1927
1928         * page/Settings.in:
1929
1930 2013-04-02  Jaehun Lim  <ljaehun.lim@samsung.com>
1931
1932         [css3-text] Rendering -webkit-each-line value for text-indent from css3-text
1933         https://bugs.webkit.org/show_bug.cgi?id=113259
1934
1935         Reviewed by Levi Weintraub.
1936
1937         CSS3 TEXT introduces new value, "each-line" for text-indent.
1938         Indentation affects the first line of the block container as well as each line
1939         after a forced line break, but does not affect lines after a soft wrap break.
1940
1941         This patch is the rendering part to support each-line value for text-indent.
1942         It's prefixed and guarded by CSS3_TEXT flag.
1943
1944         Test: fast/css3-text/css3-text-indent/text-indent-each-line.html
1945
1946         * rendering/RenderBlock.h:
1947         (WebCore::RenderBlock::availableLogicalWidthForLine):
1948         (WebCore::RenderBlock::logicalRightOffsetForLine):
1949         (WebCore::RenderBlock::logicalLeftOffsetForLine):
1950         (WebCore::RenderBlock::startOffsetForLine):
1951         (WebCore::RenderBlock::endOffsetForLine):
1952         (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine):
1953         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine):
1954             Rename a parameter from firstLine to shouldIndentText.
1955
1956         * rendering/RenderBlockLineLayout.cpp:
1957         (WebCore::LineWidth::LineWidth):
1958         (WebCore::LineWidth::shouldIndentText): Return boolean according to m_shouldIndentText.
1959         (WebCore::LineWidth::updateAvailableWidth):
1960         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1961         (WebCore::LineWidth::fitBelowFloats):
1962             Add enum IndentTextOrNot and m_shouldIndentText.
1963             Use m_shouldIndentText instead of m_isFirstLine.
1964
1965         (WebCore::requiresIndent): Decide whether text indentation is required.
1966         (WebCore::updateLogicalInlinePositions):
1967         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1968         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1969
1970 2013-04-02  Glenn Adams  <glenn@skynav.com>
1971
1972         Generalize prior line break context state and names.
1973         https://bugs.webkit.org/show_bug.cgi?id=113823
1974
1975         Reviewed by Darin Adler.
1976
1977         No new tests required due to no behavioral change.
1978
1979         * platform/text/TextBreakIterator.h:
1980         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
1981         (WebCore::LazyLineBreakIterator::lastCharacter):
1982         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
1983         (WebCore::LazyLineBreakIterator::setPriorContext):
1984         (WebCore::LazyLineBreakIterator::updatePriorContext):
1985         (WebCore::LazyLineBreakIterator::resetPriorContext):
1986         (WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator):
1987         Store previous characters as prior context buffer used directly
1988         by line break iterator implementation. Rename members to reflect
1989         somewhat more general usage. Also fix bad indentations.
1990         * rendering/RenderBlockLineLayout.cpp:
1991         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1992         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1993         Use renamed line break iterator methods.
1994
1995 2013-04-02  Emil A Eklund  <eae@chromium.org>
1996
1997         Padding applied twice for empty generated RenderInlines
1998         https://bugs.webkit.org/show_bug.cgi?id=113800
1999
2000         Reviewed by Levi Weintraub.
2001         
2002         The padding for empty generated content render objects is
2003         incorrectly applied twice. Regression from r140693.
2004
2005         Test: fast/css-generated-content/margin-empty-content.html
2006
2007         * rendering/RenderBlockLineLayout.cpp:
2008         (WebCore::inlineLogicalWidth):
2009
2010 2013-04-02  Levi Weintraub  <leviw@chromium.org>
2011
2012         InlineIterator needs to be updated when RenderCombineText shrinks at a line break
2013         https://bugs.webkit.org/show_bug.cgi?id=113733
2014
2015         Reviewed by Emil A Eklund.
2016
2017         Update stale InlineIterators that point beyond the end of a RenderCombineText that's
2018         shrunk when RenderCombineText::combineText() is called.
2019
2020         Test: fast/text/international/combine-at-line-break-crash.html
2021
2022         * rendering/BidiRun.h:
2023         (WebCore::BidiRun::BidiRun): Adding an assertion that runs are created within
2024         the bounds of their associated RenderText.
2025         * rendering/RenderBlockLineLayout.cpp:
2026         (WebCore::iteratorIsBeyondEndOfRenderCombineText): Added.
2027         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Update stale iterators.
2028
2029 2013-04-02  Max Vujovic  <mvujovic@adobe.com>
2030
2031         [CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
2032         https://bugs.webkit.org/show_bug.cgi?id=109098
2033
2034         Reviewed by Dean Jackson.
2035
2036         This patch addresses the following issues:
2037         (1) Compositors who can compute their own filter outsets don't need WebKit to inflate the
2038             composited layer bounds. Eventually, all platforms' compositors should be able to
2039             compute their own filter outsets.
2040         (2) When filter outsets change, we need to update composited layer bounds if the filters are
2041             painted in software.
2042         (3) When filter outsets change, we need to recompute the overlap map to promote the correct
2043             layers to composited layers on all platforms.
2044
2045         Tests: css3/filters/composited-layer-bounds-after-sw-blur-animation.html
2046                css3/filters/composited-layer-bounds-with-composited-blur.html
2047                css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html
2048                css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow.html
2049                css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow.html
2050
2051         * platform/graphics/IntRectExtent.h:
2052         (WebCore::IntRectExtent::isZero):
2053         (IntRectExtent):
2054
2055             Make isZero public on IntRectExtent.
2056
2057         * rendering/RenderLayer.cpp:
2058         (WebCore::hasOrHadFilters):
2059
2060             Helper function used to exit early from filters related code.
2061
2062         (WebCore::RenderLayer::updateFilters):
2063
2064             Move filter updating code from RenderLayer::styleChanged into this new method.
2065
2066             This method calls RenderLayerBacking::updateFilters instead of
2067             RenderLayerBacking::updateGraphicsLayerGeometry. RenderLayerBacking::updateFilters lets
2068             us know whether there was a filter paint mode change (i.e. the filters were painted in
2069             software and are now painted in the compositor, or vice-versa). We need to know this
2070             earlier, in RenderLayer::styleChanged, because we may need to rebuild the compositing
2071             layers due to a filter paint mode change.
2072
2073         (WebCore::RenderLayer::styleChanged):
2074
2075             Add a condition for filters for setCompositingLayersNeedRebuild. If the filter outsets
2076             on a layer changed, we need to rebuild the compositing layers because there could be new
2077             overlap. Likewise, if there are or were filter outsets and the filter paint mode changed
2078             the layer bounds (and child positions) may have changed. In either case, we don't
2079             rebuild the compositing layers if there is an accelerated filter animation running.
2080
2081             Remove old code to detect a filter paint mode change from the end of
2082             RenderLayer::styleChanged because it could never be executed. The old code counted on
2083             RenderLayerBacking::canCompositeFilters to change on its own, but it doesn't change
2084             unless updateFilters gets called. Thus, we could never enter the if statement that
2085             calls setBackingNeedsRepaint.
2086
2087         * rendering/RenderLayerBacking.cpp:
2088         (WebCore::RenderLayerBacking::updateFilters):
2089
2090             Now return true if there was a filter paint mode change, so RenderLayer::styleChanged
2091             can decide if it should rebuild the compositing layers.
2092
2093             Call updateOrRemoveFilterEffectRenderer and setContentsNeedDisplay if there was a
2094             render mode change. We need to either destroy or create the software renderer and we
2095             need to repaint the layer contents if there was a render mode change.
2096
2097         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2098
2099             Don't call updateFilters here. Call it earlier in RenderLayer::styleChanged, for reasons
2100             explained above.
2101
2102         * rendering/RenderLayerBacking.h:
2103         (RenderLayerBacking):
2104
2105             Make updateFilters public so RenderLayer::styleChanged can call it.
2106
2107         * rendering/RenderLayerCompositor.cpp:
2108         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2109
2110             If the platform's compositor computes filter outsets for its layers internally, do not
2111             inflate WebKit's composited bounds for filter outsets. This results in smaller layers
2112             on Safari. Note that we still need to include filter outsets in layer bounds for other
2113             situations like overlap testing in WebKit and when we're painting filters in software.
2114
2115 2013-04-02  Martin Robinson  <mrobinson@igalia.com>
2116
2117         [GTK] Make libsecret optional
2118         https://bugs.webkit.org/show_bug.cgi?id=113821
2119
2120         Reviewed by Gustavo Noronha Silva.
2121
2122         Don't try to use libsecret if credential storage is disabled.
2123
2124         * platform/gtk/GRefPtrGtk.cpp: Protect libsecret sections.
2125         * platform/gtk/GRefPtrGtk.h: Ditto.
2126         * platform/network/gtk/CredentialBackingStore.cpp: Ditto.
2127
2128 2013-04-02  Bem Jones-Bey  <bjonesbe@adobe.com>
2129
2130         [CSS Exclusions] refactor shape-outside code to use isFloatingWithShapeOutside() helper method
2131         https://bugs.webkit.org/show_bug.cgi?id=113799
2132
2133         Reviewed by Dirk Schulze.
2134
2135         When reviewing my patch for bug 110349, Julien mentioned that the
2136         common test for floating with shape outside should be factored out.
2137         This patch does that.
2138
2139         No new functionality, so no new tests.
2140
2141         * rendering/ExclusionShapeOutsideInfo.cpp:
2142         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Use helper method.
2143         * rendering/RenderBox.h:
2144         (WebCore::RenderBox::exclusionShapeOutsideInfo): Ditto.
2145         * rendering/RenderLayer.cpp:
2146         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
2147         * rendering/RenderObject.h:
2148         (WebCore::RenderObject::hasPaintOffset):  Ditto.
2149         (WebCore::RenderObject::isFloatingWithShapeOutside): Add method to
2150             encapsulate the common test.
2151
2152 2013-04-02  Jer Noble  <jer.noble@apple.com>
2153
2154         Add platform AudioSession and iOS platform-specific code.
2155         https://bugs.webkit.org/show_bug.cgi?id=113813
2156         <rdar://problem/11701792>
2157
2158         Reviewed by Eric Carlson.
2159
2160         Replace the deprecated AudioToolbox AudioSession APIs with the new AVAudioSession API.
2161         To protect against exposing platform specific intrinsics to cross-platform code, add a
2162         platform generic class AudioSession, with port-specific implementations. A default
2163         implementation is provided.
2164
2165         Add a new listener interface to receive interruption notifications:
2166         * platform/audio/AudioSessionListener.h: Added.
2167         (WebCore::AudioSessionListener::AudioSessionListener):
2168         (WebCore::AudioSessionListener::~AudioSessionListener):
2169
2170         Add a platform generic AudioSession class:
2171         * platform/audio/AudioSession.cpp: Added.
2172         (AudioSession::sharedSession): AudioSession is a singleton object, and this is its accessor.
2173         (AudioSession::addListener): Add the parameter to the listeners set.
2174         (AudioSession::removeListener): Remove the parameter from the listers set.
2175         (AudioSession::beganAudioInterruption): Iterate over the parameters.
2176         (AudioSession::endedAudioInterruption): Ditto.
2177         (AudioSession::AudioSession): Empty stub.
2178         (AudioSession::~AudioSession): Ditto.
2179         (AudioSession::setCategory): Ditto.
2180         (AudioSession::category): Ditto.
2181         (AudioSession::sampleRate): Ditto.
2182         (AudioSession::numberOfOutputChannels): Ditto.
2183         (AudioSession::setActive): Ditto.
2184         (AudioSession::preferredBufferDuration): Ditto.
2185         (AudioSession::setPreferredBufferDuration): Ditto.
2186         * platform/audio/AudioSession.h: Added.
2187
2188         Add IOS-specific AudioSession implementation:
2189         * platform/audio/ios/AudioSessionIOS.mm: Added.
2190         (-[WebAudioSessionHelper initWithCallback:WebCore::]): Register for interruption notifications.
2191         (-[WebAudioSessionHelper dealloc]): Unregister for interruption notifications.
2192         (-[WebAudioSessionHelper interruption:]): Pass to AudioSession.
2193         (WebCore::AudioSessionPrivate::AudioSessionPrivate): Private storage for AudioSessionIOS.
2194         (WebCore::AudioSession::AudioSession): Create AudioSessionPrivate and WebAudioSessionHelper.
2195         (WebCore::AudioSession::~AudioSession): Simple destructor.
2196         (WebCore::AudioSession::setCategory): Check the current categoryOverride, and refuse to overwrite
2197             "MediaPlayback" with "AmbientSound".
2198         (WebCore::AudioSession::setCategoryOverride): Simple setter.
2199         (WebCore::AudioSession::categoryOverride): Simple getter.
2200         (WebCore::AudioSession::category): Pass to AVAudioSession.
2201         (WebCore::AudioSession::sampleRate): Ditto.
2202         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
2203         (WebCore::AudioSession::setActive): Ditto.
2204         (WebCore::AudioSession::preferredBufferDuration): Ditto.
2205         (WebCore::AudioSession::setPreferredBufferDuration): Ditto.
2206
2207         Use the new AudioSession class in place of explicit AudioToolbox or AVAudioSession calls:
2208         * platform/audio/ios/AudioDestinationIOS.cpp:
2209         (WebCore::AudioDestination::hardwareSampleRate): Pass to AudioSession.
2210         (WebCore::AudioDestination::maxChannelCount): Ditto.
2211         (WebCore::AudioDestinationIOS::AudioDestinationIOS): Register for listeners and activate.
2212         (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Unregister and deactivate.
2213         (WebCore::AudioDestinationIOS::configure): Use AudioSession to set the buffer length.
2214         * platform/audio/ios/AudioDestinationIOS.h:
2215
2216         Add the new files to the project:
2217         * WebCore.xcodeproj/project.pbxproj:
2218
2219 2013-04-02  Jer Noble  <jer.noble@apple.com>
2220
2221         Upstream AudioDestinationIOS.
2222         https://bugs.webkit.org/show_bug.cgi?id=113806
2223
2224         Reviewed by Eric Carlson.
2225
2226         Upstream AudioDestinationIOS from the iOS repository.
2227
2228         * WebCore.xcodeproj/project.pbxproj:
2229         * platform/audio/ios/AudioDestinationIOS.cpp: Added.
2230         (WebCore::audioDestinations):
2231         (WebCore::AudioDestination::create):
2232         (WebCore::AudioDestination::hardwareSampleRate):
2233         (WebCore::AudioDestination::maxChannelCount):
2234         (WebCore::AudioDestinationIOS::AudioDestinationIOS):
2235         (WebCore::AudioDestinationIOS::~AudioDestinationIOS):
2236         (WebCore::AudioDestinationIOS::configure):
2237         (WebCore::AudioDestinationIOS::audioDestinationInterruptionListener):
2238         (WebCore::AudioDestinationIOS::initializeAudioSession):
2239         (WebCore::AudioDestinationIOS::start):
2240         (WebCore::AudioDestinationIOS::stop):
2241         (WebCore::AudioDestinationIOS::beganAudioInterruption):
2242         (WebCore::AudioDestinationIOS::endedAudioInterruption):
2243         (WebCore::AudioDestinationIOS::render):
2244         (WebCore::AudioDestinationIOS::inputProc):
2245         (WebCore::AudioDestinationIOS::frameSizeChangedProc):
2246         * platform/audio/ios/AudioDestinationIOS.h: Added.
2247         (AudioDestinationIOS):
2248         (WebCore::AudioDestinationIOS::isPlaying):
2249         (WebCore::AudioDestinationIOS::sampleRate):
2250
2251 2013-04-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2252
2253         fast/dom/HTMLImageElement/image-alt-text.html and fast/dom/HTMLInputElement/input-image-alt-text.html are failing
2254         https://bugs.webkit.org/show_bug.cgi?id=94198
2255
2256         Reviewed by Darin Adler.
2257
2258         Fix alt text not being displayed for img elements or input of type
2259         "image" due to insufficient size. imageSizeForError() was adding
2260         padding for the alt text but setImageSizeForAltText() was not. The
2261         issue was occurring in paintReplaced() because the contentWidth() /
2262         contentHeight() would be exactly the same size as the alt text.
2263         However, paintReplaced() first draws an outline rect where the
2264         image should be and then reduces the usable width / height for the
2265         alt text by 2 so that the text does not get printed over the rect
2266         borders. However, after decreasing the usable width / height, there
2267         is no longer enough space to draw the text.
2268
2269         No new tests, already covered by existing tests.
2270
2271         * rendering/RenderImage.cpp:
2272         (WebCore::RenderImage::setImageSizeForAltText): Add padding to the text size
2273         so that the alt text can still be drawn, despite the outline rect
2274         borders. Such padding was already used in imageSizeForError(). Also use
2275         ceilf() for the value returned by Font::width() instead of truncating it.
2276         This is needed because we need to fit the whole text in the image and this
2277         may not be the case if we truncate.
2278         (WebCore::RenderImage::paintReplaced):
2279
2280 2013-04-02  Raymond Toy  <rtoy@google.com>
2281
2282         Add support for using ARM FFT in WebAudio
2283         https://bugs.webkit.org/show_bug.cgi?id=109755
2284
2285         Reviewed by Chris Rogers.
2286
2287         No new tests.
2288
2289         * WebCore.gyp/WebCore.gyp: Add dependency on openmax_dl when use_openmax_dl_fft is enabled.
2290         * WebCore.gypi: Add source FFTFrameOpenMAXDLAndroid.cpp
2291         * platform/audio/AudioArray.h:
2292         (WebCore::AudioArray::allocate): Need 32-byte aligntment with the
2293         OpenMAX DL FFT.
2294         * platform/audio/FFTFrame.h:
2295         (FFTFrame): Support OpenMAX DL FFT
2296         * platform/audio/FFTFrameStub.cpp: Support OpenMAX DL FFT
2297         * platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp: Added.  Implements the
2298         necessary interface using the OpenMAX DL FFT routines.
2299         (WebCore):
2300         (WebCore::FFTFrame::FFTFrame):
2301         (WebCore::FFTFrame::initialize):
2302         (WebCore::FFTFrame::cleanup):
2303         (WebCore::FFTFrame::~FFTFrame):
2304         (WebCore::FFTFrame::multiply):
2305         (WebCore::FFTFrame::doFFT):
2306         (WebCore::FFTFrame::doInverseFFT):
2307         (WebCore::FFTFrame::realData):
2308         (WebCore::FFTFrame::imagData):
2309         (WebCore::FFTFrame::contextForSize):
2310
2311 2013-04-02  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
2312
2313         [GStreamer] Memory leaks in MediaPlayerPrivateGStreamer
2314         https://bugs.webkit.org/show_bug.cgi?id=113762
2315
2316         Reviewed by Philippe Normand.
2317
2318         Don't leak strings returned by gst_element_get_name() and
2319         gst_missing_plugin_message_get_installer_detail().
2320
2321         No new tests. No change in behavior.
2322
2323         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2324         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
2325         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2326
2327 2013-04-02  Min Qin  <qinmin@chromium.org>
2328
2329         Fix css style for CC button on android
2330         https://bugs.webkit.org/show_bug.cgi?id=113815
2331
2332         Reviewed by Adam Barth.
2333
2334         The default CC button size is 16px as defined in mediaControls.css. Android should use 35px.
2335         This change fixed that problem.
2336         Also fixed a problem that r142947 does not change the display of fullscreen button to -webkit-flex
2337         Android does not run media layout tests currently. Will fix the test expectations when layout tests are run in content shell.
2338
2339         * css/mediaControlsChromiumAndroid.css:
2340         (video::-webkit-media-controls-fullscreen-button):
2341         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2342
2343 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2344
2345         [Mac] Remove WKCreateNSURLConnectionDelegateProxy
2346         https://bugs.webkit.org/show_bug.cgi?id=113810
2347
2348         Reviewed by Anders Carlsson.
2349
2350         This WKSI function is not used any more.
2351
2352         * WebCore.exp.in:
2353         * platform/mac/WebCoreSystemInterface.h:
2354         * platform/mac/WebCoreSystemInterface.mm:
2355
2356 2013-04-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2357
2358         Unreviewed, rolling out r147464.
2359         http://trac.webkit.org/changeset/147464
2360         https://bugs.webkit.org/show_bug.cgi?id=113812
2361
2362         JSSQLResultSet.cpp:131:24: error: implicit conversion loses
2363         integer precision: 'int64_t' (aka 'long long') to 'int'
2364         [-Werror,-Wshorten-64-to-32] (Requested by xenon on #webkit).
2365
2366         * bindings/scripts/CodeGeneratorJS.pm:
2367         (GenerateImplementation):
2368         * bindings/scripts/test/JS/JSTestObj.cpp:
2369         (WebCore::jsTestObjAttrWithGetterException):
2370         (WebCore::jsTestObjStringAttrWithGetterException):
2371         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2372         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2373         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2374         (WebCore::jsTestObjNullableDoubleAttribute):
2375         (WebCore::jsTestObjNullableLongAttribute):
2376         (WebCore::jsTestObjNullableBooleanAttribute):
2377         (WebCore::jsTestObjNullableStringAttribute):
2378         (WebCore::jsTestObjNullableLongSettableAttribute):
2379         (WebCore::jsTestObjNullableStringValue):
2380         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2381         (WebCore::jsTestTypedefsAttrWithGetterException):
2382         (WebCore::jsTestTypedefsStringAttrWithGetterException):
2383
2384 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2385
2386         Web Inspector: Make Source Frame & status bar a layout boundary
2387         https://bugs.webkit.org/show_bug.cgi?id=112353
2388
2389         Reviewed by Pavel Feldman.
2390
2391         No new tests: no change in behaviour.
2392
2393         - Add View.markAsLayoutBoundary method to mark a view as a layout
2394         boundary. This will force this view to autoupdate its height to actual
2395         pixel value.
2396         - Mark both CodeMirrorTextEditor and DefaultTextEditor as a layout
2397         boundary.
2398         - Mark main-status-bar element with a layout-boundary class.
2399
2400         * inspector/front-end/CodeMirrorTextEditor.js:
2401         (WebInspector.CodeMirrorTextEditor):
2402         * inspector/front-end/DefaultTextEditor.js:
2403         * inspector/front-end/View.js:
2404         (WebInspector.View.prototype.markAsLayoutBoundary):
2405         (WebInspector.View.prototype._processWillShow):
2406         (WebInspector.View.prototype._processWasShown):
2407         (WebInspector.View.prototype._processOnResize):
2408         * inspector/front-end/inspector.css:
2409         (.layout-boundary):
2410         * inspector/front-end/inspector.html:
2411
2412 2013-04-02  Alexey Proskuryakov  <ap@apple.com>
2413
2414         <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
2415         https://bugs.webkit.org/show_bug.cgi?id=113803
2416
2417         Reviewed by Darin Adler.
2418
2419         Stop using a delegate proxy. It hasn't been needed in years, and the extra layer
2420         just adds bugs.
2421
2422         This specific issue gets fixed because connection retains its delegate is retained,
2423         but a proxy does not.
2424
2425         * WebCore.exp.in:
2426         * platform/network/ResourceHandle.h:
2427         * platform/network/ResourceHandleInternal.h:
2428         * platform/network/mac/ResourceHandleMac.mm:
2429         (WebCore::ResourceHandle::start):
2430         (WebCore::ResourceHandle::releaseDelegate):
2431         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2432         Removed code that was dealing with delegate proxy.
2433
2434 2013-04-02  John J. Barton  <johnjbarton@chromium.org>
2435
2436         Web Inspector: Encapsulate SetEmbedderData/GetEmbedderData
2437         https://bugs.webkit.org/show_bug.cgi?id=113331
2438
2439         Reviewed by Pavel Feldman.
2440
2441         Refactor to encapsulate uses of V8 Set/GetEmbedderData together
2442         with uses of V8 Set/GetAlignedPointerInEmbedderData since these
2443         functions operate on the same underyling array in V8.
2444
2445         * bindings/v8/ScriptController.cpp:
2446         (WebCore::ScriptController::setContextDebugId):
2447         (WebCore::ScriptController::contextDebugId):
2448         * bindings/v8/V8DOMWindowShell.cpp:
2449         (WebCore::setInjectedScriptContextDebugId):
2450         * bindings/v8/V8PerContextData.cpp:
2451         (WebCore::V8PerContextDebugData::setContextDebugData):
2452         (WebCore):
2453         (WebCore::V8PerContextDebugData::contextDebugId):
2454         (WebCore::V8PerContextDebugData::createDebugData):
2455         (WebCore::V8PerContextDebugData::getDebugData):
2456         (WebCore::V8PerContextDebugData::setDebugData):
2457         * bindings/v8/V8PerContextData.h:
2458         (V8PerContextDebugData):
2459         (WebCore):
2460
2461 2013-04-02  Alexei Filippov  <alph@chromium.org>
2462
2463         Web Inspector: Adjust toolbar labels position
2464         https://bugs.webkit.org/show_bug.cgi?id=113805
2465
2466         Reviewed by Pavel Feldman.
2467
2468         Move the labels 1px up to make them centered.
2469         Also fix font centering in native memory distribution snapshot.
2470
2471         * inspector/front-end/inspector.css:
2472         (.toolbar-label):
2473         * inspector/front-end/nativeMemoryProfiler.css:
2474         (.native-snapshot-view .data-grid td):
2475
2476 2013-04-02  Beth Dakin  <bdakin@apple.com>
2477
2478         Viewport constrained elements should work properly with headers and footers
2479         https://bugs.webkit.org/show_bug.cgi?id=113743
2480
2481         Reviewed by Simon Fraser.
2482
2483         ScrollableArea::constrainScrollPositionForOverhang() needs to take headerHeight 
2484         and footerHeight into account. It also needs to use totalContentsSize() instead of 
2485         contentsSize().
2486
2487         Send totalContentsSize() instead of contentsSize() and also send headerHeight() 
2488         and footerHeight().
2489         * page/FrameView.cpp:
2490         (WebCore::FrameView::scrollOffsetForFixedPosition):
2491         * page/FrameView.h:
2492         (FrameView):
2493
2494         The scrolling tree will also need to know about header and footer heights since it 
2495         will need these values to call 
2496         ScrollableArea::constrainScrollPositionForOverhang().
2497         * page/scrolling/ScrollingStateScrollingNode.cpp:
2498         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2499         (WebCore::ScrollingStateScrollingNode::setHeaderHeight):
2500         (WebCore::ScrollingStateScrollingNode::setFooterHeight):
2501         * page/scrolling/ScrollingStateScrollingNode.h:
2502         (WebCore::ScrollingStateScrollingNode::headerHeight):
2503         (ScrollingStateScrollingNode):
2504         (WebCore::ScrollingStateScrollingNode::footerHeight):
2505         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2506         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2507         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2508         * page/scrolling/ScrollingTreeScrollingNode.h:
2509         (WebCore::ScrollingTreeScrollingNode::headerHeight):
2510         (WebCore::ScrollingTreeScrollingNode::footerHeight):
2511         (ScrollingTreeScrollingNode):
2512         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2513         (ScrollParameters):
2514         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2515         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2516         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
2517         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2518         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2519
2520         Use footerHeight when calculating the maxValue and use headerHeight in determining 
2521         what the minimum value is. 
2522         * platform/ScrollableArea.cpp:
2523         (WebCore::constrainedScrollPosition):
2524         (WebCore::ScrollableArea::constrainScrollPositionForOverhang):
2525         * platform/ScrollableArea.h:
2526         (ScrollableArea):
2527
2528 2013-04-02  Stephen White  <senorblanco@chromium.org>
2529
2530         [Skia] Enable GPU-accelerated Skia path for FEComposite filter.
2531         https://bugs.webkit.org/show_bug.cgi?id=113797
2532
2533         Reviewed by Adrienne Walker.
2534
2535         Tests: css3/filters/effect-reference-composite-hw.html
2536                css3/filters/effect-reference-composite.html
2537
2538         * WebCore.gypi:
2539         * platform/graphics/filters/FEComposite.h:
2540         Enable Skia DAG hook for FEComposite.
2541         * platform/graphics/filters/skia/FECompositeSkia.cpp: Added.
2542         (WebCore::FEComposite::createImageFilter):
2543         Implement skia DAG builder for FEComposite, and implement generic
2544         skia version of composite filter.
2545
2546 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2547
2548         Web Inspector: Avoid using style.display="inline-block"
2549         https://bugs.webkit.org/show_bug.cgi?id=113802
2550
2551         Reviewed by Pavel Feldman.
2552
2553         No new tests.
2554
2555         - Create class "inline-block" which will set "display: inline-block"
2556         style.
2557         - Use this class with DIV elements to get "inline-block" element.
2558
2559         * inspector/front-end/ObjectPopoverHelper.js:
2560         (WebInspector.ObjectPopoverHelper.prototype.):
2561         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2562         * inspector/front-end/ScriptsPanel.js:
2563         (WebInspector.ScriptsPanel):
2564         * inspector/front-end/inspector.css:
2565         (.inline-block):
2566
2567 2013-04-02  Andrey Kosyakov  <caseq@chromium.org>
2568
2569         Web Inspector: [Timeline] warning markers are not propagated to coalesced records
2570         https://bugs.webkit.org/show_bug.cgi?id=113789
2571
2572         Reviewed by Pavel Feldman.
2573
2574         Test: inspector/timeline/timeline-coalescing.html
2575
2576         * inspector/front-end/TimelinePresentationModel.js: set childHasWarning on coalescing record if the record it replaces had warnings.
2577         (WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):
2578
2579 2013-04-02  Yury Semikhatsky  <yurys@chromium.org>
2580
2581         Web Inspector: memory instrumentation for external strings is broken
2582         https://bugs.webkit.org/show_bug.cgi?id=113788
2583
2584         Reviewed by Pavel Feldman.
2585
2586         Native memory snapshot now provides information about JS external strings.
2587
2588         Test: inspector/profiler/memory-instrumentation-external-string.html
2589
2590         * inspector/InspectorMemoryAgent.cpp:
2591
2592 2013-04-02  Yury Semikhatsky  <yurys@chromium.org>
2593
2594         Web Inspector: memory instrumentation for external arrays is broken
2595         https://bugs.webkit.org/show_bug.cgi?id=113790
2596
2597         Report pointers to external arrays as retaining ones to make sure their
2598         size is counted correctly.
2599
2600         Reviewed by Pavel Feldman.
2601
2602         Test: inspector/profiler/memory-instrumentation-external-array.html
2603
2604         * inspector/InspectorMemoryAgent.cpp:
2605
2606 2013-04-02  Peter Beverloo  <peter@chromium.org>
2607
2608         [JSC] Don't create a JSValue if it's not going to be used for nullable attributes
2609         https://bugs.webkit.org/show_bug.cgi?id=112711
2610
2611         Reviewed by Sam Weinig.
2612
2613         When nullable attributes are used, it's possible that we disregard the JSValue
2614         when null should be returned instead. This is a waste, and we should cast the
2615         native type to a JSValue as late as possible.
2616
2617         * bindings/scripts/CodeGeneratorJS.pm:
2618         (GenerateImplementation):
2619         (NativeValueToLocal):
2620         * bindings/scripts/test/JS/JSTestObj.cpp:
2621         (WebCore::jsTestObjAttrWithGetterException):
2622         (WebCore::jsTestObjStringAttrWithGetterException):
2623         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2624         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2625         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2626         (WebCore::jsTestObjNullableDoubleAttribute):
2627         (WebCore::jsTestObjNullableLongAttribute):
2628         (WebCore::jsTestObjNullableBooleanAttribute):
2629         (WebCore::jsTestObjNullableStringAttribute):
2630         (WebCore::jsTestObjNullableLongSettableAttribute):
2631         (WebCore::jsTestObjNullableStringValue):
2632         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2633         (WebCore::jsTestTypedefsAttrWithGetterException):
2634         (WebCore::jsTestTypedefsStringAttrWithGetterException):
2635
2636 2013-04-02  Bem Jones-Bey  <bjonesbe@adobe.com>
2637
2638         [css exclusions] overflow:hidden undoes shape-outside offsets
2639         https://bugs.webkit.org/show_bug.cgi?id=110349
2640
2641         Reviewed by Julien Chaffraix.
2642
2643         When overflow: hidden was set on a float with shape-outside, the
2644         offset from the shape-outside was being ignored. This was because the
2645         float was being placed in the normal flow, causing the offsets to be
2646         calculated differently. Since floats with shape outside behave like
2647         positioned objects in many places, I have caused them to take the same
2648         behavior as positioned objects in this case as well: the floats with
2649         shape-outside do not get placed in the normal flow when overflow:
2650         hidden is set.
2651
2652         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden.html
2653
2654         * rendering/RenderLayer.cpp:
2655         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Floats that have
2656             shape-outside should not be in the normal flow.
2657
2658 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2659
2660         Web Inspector: resource preview of html/js/css types should be on a grey background
2661         https://bugs.webkit.org/show_bug.cgi?id=113791
2662
2663         Reviewed by Pavel Feldman.
2664
2665         No new tests.
2666
2667         - Add a css rule to set grey background for SourceFrame in resource view.
2668         - Add "fill" style to SourceFrame element to setup its height.
2669
2670         * inspector/front-end/SourceFrame.js:
2671         (WebInspector.SourceFrame):
2672         * inspector/front-end/resourceView.css:
2673         (.resource-view .script-view):
2674
2675 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2676
2677         Web Inspector: [CodeMirror] Editor doesn't have yellow background in DivergedFromVM state
2678         https://bugs.webkit.org/show_bug.cgi?id=113783
2679
2680         Reviewed by Pavel Feldman.
2681
2682         No new tests.
2683
2684         Force CodeMirrorTextEditor to have transparent background to inherit
2685         background color from source frame.
2686
2687         * inspector/front-end/cm/cmdevtools.css:
2688         (.CodeMirror):
2689
2690 2013-04-02  Jochen Eisinger  <jochen@chromium.org>
2691
2692         Check whether popups are allowed before creating a new window
2693         https://bugs.webkit.org/show_bug.cgi?id=113782
2694
2695         Reviewed by Adam Barth.
2696
2697         Otherwise, firing a generated mouse event at an anchor is enough to
2698         work around the popup blocker.
2699
2700         Test: fast/loader/url-selected-user-gesture.html
2701
2702         * loader/PolicyChecker.cpp:
2703         (WebCore::PolicyChecker::checkNewWindowPolicy):
2704
2705 2013-04-02  Jochen Eisinger  <jochen@chromium.org>
2706
2707         When computing the percentage of the logical height, use the logical top and bottom
2708         https://bugs.webkit.org/show_bug.cgi?id=113761
2709
2710         Reviewed by Ojan Vafai.
2711
2712         Test: fast/writing-mode/percentage-height-orthogonal-writing-modes.html
2713
2714         * rendering/RenderBox.cpp:
2715         (WebCore::RenderBox::computePercentageLogicalHeight):
2716
2717 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2718
2719         Web Inspector: [CodeMirror] do not show cursor in read-only mode
2720         https://bugs.webkit.org/show_bug.cgi?id=113793
2721
2722         Reviewed by Alexander Pavlov.
2723
2724         No new tests.
2725
2726         Pass "nocursor" option to CodeMirror's "readonly" setting.
2727
2728         * inspector/front-end/CodeMirrorTextEditor.js:
2729         (WebInspector.CodeMirrorTextEditor.prototype.setReadOnly):
2730
2731 2013-04-02  Nate Chapin  <japhet@chromium.org>
2732
2733         Unreviewed, rolling out r147402.
2734         http://trac.webkit.org/changeset/147402
2735         https://bugs.webkit.org/show_bug.cgi?id=112903
2736
2737         * dom/Document.cpp:
2738         (WebCore::Document::processHttpEquiv):
2739         * loader/DocumentLoader.cpp:
2740         (WebCore::DocumentLoader::responseReceived):
2741
2742 2013-04-02  ChangSeok Oh  <changseok.oh@collabora.com>
2743
2744         [GTK][AC] Support preserves3D css property for clutter ac backend.
2745         https://bugs.webkit.org/show_bug.cgi?id=113318
2746
2747         Reviewed by Gustavo Noronha Silva.
2748
2749         This patch brings preserve-3D css property support to WebKitGtk+ with clutter ac backed.
2750         Most of the code is based on Mac port's implementation. The core concept is that
2751         if a layer has preserve-3d property false, we mark itself and its immediate children
2752         to make them flatten. And then we remove 3D factor in a modelView matrix
2753         when applying it to each actor.
2754
2755         No new tests as this is covered with existing AC tests.
2756
2757         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2758         (_GraphicsLayerActorPrivate):
2759         (graphics_layer_actor_init):
2760         (graphicsLayerActorApplyTransform):
2761         (graphicsLayerActorNew):
2762         (graphicsLayerActorRemoveFromSuperLayer):
2763         (graphicsLayerActorSetDrawsContent):
2764         (graphicsLayerActorSetFlatten):
2765         * platform/graphics/clutter/GraphicsLayerActor.h:
2766         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2767         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
2768         (WebCore::GraphicsLayerClutter::platformLayer):
2769         (WebCore::GraphicsLayerClutter::moveOrCopyAnimations):
2770         (WebCore):
2771         (WebCore::GraphicsLayerClutter::setPreserves3D):
2772         (WebCore::GraphicsLayerClutter::flushCompositingState):
2773         (WebCore::GraphicsLayerClutter::recursiveCommitChanges):
2774         (WebCore::GraphicsLayerClutter::commitLayerChangesAfterSublayers):
2775         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
2776         (WebCore::GraphicsLayerClutter::updateGeometry):
2777         (WebCore::GraphicsLayerClutter::updateSublayerList):
2778         (WebCore::GraphicsLayerClutter::updateStructuralLayer):
2779         (WebCore::GraphicsLayerClutter::ensureStructuralLayer):
2780         (WebCore::GraphicsLayerClutter::structuralLayerPurpose):
2781         (WebCore::GraphicsLayerClutter::layerForSuperlayer):
2782         * platform/graphics/clutter/GraphicsLayerClutter.h:
2783         (CommitState):
2784         (WebCore::GraphicsLayerClutter::CommitState::CommitState):
2785         (GraphicsLayerClutter):
2786         (WebCore::GraphicsLayerClutter::primaryLayer):
2787
2788 2013-04-02  Adam Klein  <adamk@chromium.org>
2789
2790         HTML parser should consistently inspect the namespace of elements on the stack of open elements
2791         https://bugs.webkit.org/show_bug.cgi?id=113723
2792
2793         Reviewed by Adam Barth.
2794
2795         Added HTMLStackItem::matchesHTMLTag method and use that nearly
2796         everywhere instead of HTMLStackItem::hasLocalName. The most important
2797         of these changes is in HTMLElementStack's inScopeCommon() function,
2798         where the use of matchesHTMLTag means that any of the inXXXScope()
2799         calls now only match HTML tags.
2800
2801         Tests: html5lib/generated/run-namespace-sensitivity-data.html
2802                html5lib/generated/run-namespace-sensitivity-write.html
2803
2804         * html/parser/HTMLConstructionSite.cpp:
2805         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
2806         * html/parser/HTMLElementStack.cpp:
2807         (WebCore::HTMLElementStack::popUntil):
2808         (WebCore::HTMLElementStack::topmost):
2809         (WebCore::inScopeCommon):
2810         (WebCore::HTMLElementStack::inScope):
2811         (WebCore::HTMLElementStack::inListItemScope):
2812         (WebCore::HTMLElementStack::inTableScope):
2813         (WebCore::HTMLElementStack::inButtonScope):
2814         (WebCore::HTMLElementStack::inSelectScope):
2815         * html/parser/HTMLElementStack.h:
2816         (WebCore::HTMLElementStack::popUntilPopped):
2817         * html/parser/HTMLFormattingElementList.cpp:
2818         (WebCore::HTMLFormattingElementList::closestElementInScopeWithName):
2819         * html/parser/HTMLStackItem.h:
2820         (WebCore::HTMLStackItem::matchesHTMLTag):
2821         (HTMLStackItem):
2822         * html/parser/HTMLTreeBuilder.cpp:
2823         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2824         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
2825         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
2826         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
2827
2828 2013-04-02  Hayato Ito  <hayato@chromium.org>
2829
2830         Report memory usage for ShadowDistributedRules.
2831         https://bugs.webkit.org/show_bug.cgi?id=109882
2832
2833         Reviewed by Dimitri Glazkov.
2834
2835         This is a follow-up patch for r142855.
2836
2837         No new tests, no behavior change for layout tests.
2838
2839         * css/DocumentRuleSets.cpp:
2840         (WebCore):
2841         (WebCore::ShadowDistributedRules::reportMemoryUsage):
2842         (WebCore::DocumentRuleSets::reportMemoryUsage):
2843         * css/DocumentRuleSets.h:
2844         (ShadowDistributedRules):
2845
2846 2013-04-02  Chris Fleizach  <cfleizach@apple.com>
2847
2848         AX: Need to get line thickness from fraction on web
2849         https://bugs.webkit.org/show_bug.cgi?id=113720
2850
2851         Reviewed by David Kilzer.
2852
2853         Expose the line thickness property for fractions, which is needed to
2854         help determine the type of equation.
2855
2856         Test: platform/mac/accessibility/mathml-line-fraction.html
2857
2858         * accessibility/AccessibilityObject.h:
2859         (WebCore::AccessibilityObject::mathLineThickness):
2860         * accessibility/AccessibilityRenderObject.cpp:
2861         (WebCore::AccessibilityRenderObject::mathLineThickness):
2862         (WebCore):
2863         * accessibility/AccessibilityRenderObject.h:
2864         (AccessibilityRenderObject):
2865         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2866         (-[WebAccessibilityObjectWrapper accessibilityMathLineThickness]):
2867         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2868         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2869         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2870
2871 2013-04-02  Alexandre Elias  <aelias@chromium.org>
2872
2873         Unreviewed, rolling out r147389.
2874         http://trac.webkit.org/changeset/147389
2875         https://bugs.webkit.org/show_bug.cgi?id=113738
2876
2877         r147389 was temporary patch for Chromium branch management, needs
2878         revert.
2879
2880         * platform/ScrollView.cpp:
2881         (WebCore::positionScrollbarLayer):
2882         * rendering/RenderLayerBacking.cpp:
2883         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
2884
2885 2013-04-02  David Vest  <davve@opera.com>
2886
2887         Hang when calling setCurrentTime on SVG with cyclic animation dependency chain
2888         https://bugs.webkit.org/show_bug.cgi?id=113485
2889
2890         Reviewed by Stephen Chenney.
2891
2892         If no exact match can be found, approximateBinarySearch may return
2893         either adjacent value to the key. Selecting the lesser value when
2894         there is a greater one may cause interval creation to fail in a
2895         way that causes infinite loops during seeking. Detect and amend
2896         this condition by selecting the greater value when possible.
2897
2898         Test: svg/animations/animation-dependency-hang.html
2899
2900         * svg/animation/SVGSMILElement.cpp:
2901         (WebCore::SVGSMILElement::findInstanceTime):
2902
2903 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
2904
2905         Web Inspector: source location gets frozen after inspector reload
2906         https://bugs.webkit.org/show_bug.cgi?id=113776
2907
2908         Reviewed by Pavel Feldman.
2909
2910         Put statusBarText item in its own container and update its contents in
2911         ScriptsPanel._updateScriptViewStatusBarItems in similar way it's done
2912         for statusBarItems.
2913
2914         No new tests.
2915
2916         * inspector/front-end/ScriptsPanel.js:
2917         (WebInspector.ScriptsPanel):
2918         (WebInspector.ScriptsPanel.prototype.statusBarText):
2919         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2920
2921 2013-04-02  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2922
2923         Remove unneeded cpp file from CMake build. Rubber-stamp by Alexis Menard.
2924
2925         * CMakeLists.txt: Remove FFTFrameStub.cpp, since adding this file or not
2926         to your build is a platform decision.
2927
2928 2013-04-01  Andrey Kosyakov  <caseq@chromium.org>
2929
2930         Web Inspector: [Timeline] unify logic for 3 overview modes in Timeline
2931         https://bugs.webkit.org/show_bug.cgi?id=113708
2932
2933         Reviewed by Yury Semikhatsky.
2934
2935         - make TimelineOverviewPane logic independent on overview mode;
2936         - show only one of 3 controls at one time;
2937         - attach overview controls to the same parent.
2938
2939         * inspector/front-end/OverviewGrid.js: remove gridElement() and itemsGraphsElement(), no longer needed.
2940         (WebInspector.OverviewGrid):
2941         * inspector/front-end/TimelineOverviewPane.js:
2942         (WebInspector.TimelineOverviewPane):
2943         (WebInspector.TimelineOverviewPane.prototype.setMode):
2944         (WebInspector.TimelineOverviewPane.prototype._innerSetMode):
2945         (WebInspector.TimelineOverviewPane.prototype._createOverviewControl): 
2946         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
2947         (WebInspector.TimelineOverviewPane.prototype._update):
2948         (WebInspector.TimelineOverviewPane.prototype.addFrame):
2949         (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
2950         (WebInspector.TimelineOverviewPane.prototype._reset):
2951         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
2952         (WebInspector.TimelineOverviewBase.prototype.update):
2953         (WebInspector.TimelineOverviewBase.prototype.reset):
2954         (WebInspector.TimelineOverviewBase.prototype.categoryVisibilityChanged):
2955         (WebInspector.TimelineOverviewBase.prototype.addFrame):
2956         (WebInspector.TimelineOverviewBase.prototype.getWindowTimes):
2957         (WebInspector.TimelineEventOverview):
2958         (WebInspector.TimelineEventOverview.prototype.categoryVisibilityChanged):
2959         * inspector/front-end/timelinePanel.css:
2960
2961 2013-04-02  Julien Chaffraix  <jchaffraix@webkit.org>
2962
2963         webkit fails IETC grid-column-002
2964         https://bugs.webkit.org/show_bug.cgi?id=83907
2965
2966         Reviewed by Ojan Vafai.
2967
2968         Tests: fast/css-grid-layout/grid-item-column-row-get-set.html
2969                ietestcenter/css3/grid/grid-column-002.htm
2970
2971         * css/CSSParser.cpp:
2972         (WebCore::CSSParser::parseValue):
2973         Don't accept 0 as a valid <integer> position.
2974
2975 2013-04-02  Dmitry Gozman  <dgozman@chromium.org>
2976
2977         Web Inspector: allow referencing of nodes that have not been pushed to the front-end
2978         https://bugs.webkit.org/show_bug.cgi?id=110921
2979
2980         Reviewed by Pavel Feldman.
2981
2982         Nodes not yet pushed to front-end are referenced by BackendNodeId and retained.
2983         One can group nodes when generating BackendNodeIds to release them all together later.
2984
2985         To resolve node references by BackendNodeId, frontend should use new pushNodeByBackendIdToFrontend method.
2986         This will invalidate the generated BackendNodeId.
2987
2988         * inspector/Inspector.json:
2989         * inspector/InspectorDOMAgent.cpp:
2990         (WebCore::InspectorDOMAgent::discardBindings):
2991         (WebCore::InspectorDOMAgent::backendNodeIdForNode):
2992         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
2993         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
2994         * inspector/InspectorDOMAgent.h:
2995         (WebCore):
2996         (InspectorDOMAgent):
2997
2998 2013-04-02  Andrei Bucur  <abucur@adobe.com>
2999
3000         [CSS Regions] Nested auto-height regions don't layout correctly
3001         https://bugs.webkit.org/show_bug.cgi?id=111969
3002
3003         Reviewed by David Hyatt.
3004
3005         The patch fixes the auto-height regions processing model to work with nested named flows. Currently
3006         this use case doesn't work correctly because the order in which the computed height value is propagated
3007         to the regions is incorrect. For example, in the case of two flows (f1 and f2) and two auto-height
3008         regions (r1 and r2) with r2 a member of f1:
3009         1. the normal layout phase starts
3010         2. r1 is laid out with height = 0
3011         3. f1 is laid out including r2 with height = 0; overrideLogicalHeight for r1 is computed
3012         4. f2 is laid out; overrideLogicalHeight for r2 is computed
3013         5. the constrained layout phase starts
3014         6. r1 is laid out using the overrideLogicalHeight computed in the normal phase
3015         7. f1 is laid out including r2 with its overrideLogicalHeight
3016         8. f2 is laid out
3017
3018         The problem appears at step 6 because the overrideLogicalheight computed during step 3 assumes r2
3019         has a height of 0. The patch changes the algorithm to update the auto-height regions in the reverse
3020         order of their flow threads dependecies. Here is a high level overview of the new algorithm,
3021         considering the named flows are sorted in the order of their dependencies:
3022         1. The flows are laid out from the outer flow to the inner flow. This successfully computes the outer
3023         non-auto-height regions size so the inner flows have the necessary information to correctly fragment
3024         the content.
3025         2. The flows are laid out from the inner flow to the outer flow. After an inner flow is laid out it
3026         goes into the constrained layout phase and marks the auto-height regions they need layout. This
3027         means the outer flows will relayout if they depend on regions with auto-height regions belonging to
3028         inner flows. This step will correctly compute the overrideLogicalHeights for the auto-height regions.
3029         It's possible for non-auto-height regions to relayout if they depend on auto-height regions. This
3030         will invalidate the inner flow threads and mark them as needing layout.
3031         3. The last step is to do one last layout if there are pahtological dependencies between non-auto-height
3032         regions and auto-height regions as detected in the previous step.
3033
3034         The patch also removes the layout phase flag from RenderView and moves it to the flow threads. This
3035         happens because a flow needs to update its auto-height regions overrideLogicalHeight while updating
3036         the logical height of the regions belonging to the inner flows that are laid out by the flow (i.e. the
3037         outer flow is in the normal phase while the inner flows are in the constrained layout phase).
3038
3039         There's also a new flag on the RenderFlowThread that is set when the flow needs the constrained layout
3040         phase. This could have been placed on the flow thread controller but I think it will be useful when doing
3041         content balancing for the new multi-column implementation.
3042
3043         Another change is the moment we clear the overrideLogicalHeight value on empty auto-height regions because
3044         we don't have to relayout a flow thread once it's in the constrained phase. We need to have the correct
3045         flow thread portions correctly computed after the artificial forced break is applied at the end of the content.
3046
3047         Tests: fast/regions/autoheight-mixed-nested-complex-regions.html
3048                fast/regions/autoheight-mixed-nested-regions.html
3049                fast/regions/autoheight-mixed-parallel-regions.html
3050                fast/regions/autoheight-nested-regions.html
3051
3052         * rendering/FlowThreadController.cpp:
3053         (WebCore::FlowThreadController::FlowThreadController):
3054         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
3055         (WebCore):
3056         (WebCore::FlowThreadController::registerNamedFlowContentNode):
3057         (WebCore::FlowThreadController::unregisterNamedFlowContentNode):
3058         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
3059         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
3060         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
3061         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
3062         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
3063         * rendering/FlowThreadController.h:
3064         (FlowThreadController):
3065         * rendering/RenderBlock.cpp:
3066         (WebCore::RenderBlock::layoutBlock):
3067         * rendering/RenderFlowThread.cpp:
3068         (WebCore::RenderFlowThread::RenderFlowThread):
3069         (WebCore::RenderFlowThread::validateRegions):
3070         (WebCore::RenderFlowThread::layout):
3071         (WebCore::RenderFlowThread::regionAtBlockOffset):
3072         (WebCore::RenderFlowThread::applyBreakAfterContent): Apply an artificial break at the end of the content.
3073         This way we can detect when the content ends and clear the overrideLogicalHeight on the empty auto-height regions.
3074         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
3075         (WebCore):
3076         (WebCore::RenderFlowThread::initializeRegionsOverrideLogicalContentHeight):
3077         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
3078         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
3079         (WebCore::RenderFlowThread::addForcedRegionBreak):
3080         * rendering/RenderFlowThread.h:
3081         * rendering/RenderRegion.cpp:
3082         (WebCore::RenderRegion::pageLogicalWidth):
3083         (WebCore::RenderRegion::pageLogicalHeight):
3084         (WebCore::RenderRegion::maxPageLogicalHeight):
3085         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
3086         (WebCore::RenderRegion::layoutBlock):
3087         (WebCore::RenderRegion::updateLogicalHeight):
3088         * rendering/RenderView.cpp:
3089         (WebCore::RenderView::RenderView):
3090         (WebCore):
3091         (WebCore::RenderView::layoutContentInAutoLogicalHeightRegions):
3092         (WebCore::RenderView::layout):
3093         * rendering/RenderView.h:
3094         (WebCore):
3095         (RenderView):
3096
3097 2013-04-02  Andrey Kosyakov  <caseq@chromium.org>
3098
3099         Web Inspector: ignore minimum record duration filter in Timeline overview
3100         https://bugs.webkit.org/show_bug.cgi?id=113705
3101
3102         Reviewed by Pavel Feldman.
3103
3104         * inspector/front-end/TimelineOverviewPane.js:
3105         * inspector/front-end/TimelinePanel.js:
3106         (WebInspector.TimelinePanel.prototype._durationFilterChanged):
3107
3108 2013-03-29  Andrey Kosyakov  <caseq@chromium.org>
3109
3110         Web Inspector: display the number of dirty render objects in Layout timeline event
3111         https://bugs.webkit.org/show_bug.cgi?id=95331
3112
3113         Reviewed by Pavel Feldman.
3114
3115         Count the render objects that need layout in InspectorTimelineAgent::willLayout()
3116         and display the number in popover over Layout record in Timeline panel.
3117
3118         * English.lproj/localizedStrings.js:
3119         * inspector/InspectorTimelineAgent.cpp:
3120         (WebCore::InspectorTimelineAgent::willLayout):
3121         (WebCore::InspectorTimelineAgent::didLayout):
3122         * inspector/TimelineRecordFactory.cpp:
3123         (WebCore):
3124         (WebCore::TimelineRecordFactory::createLayoutData):
3125         (WebCore::TimelineRecordFactory::appendLayoutRoot):
3126         * inspector/TimelineRecordFactory.h:
3127         (TimelineRecordFactory):
3128         * inspector/front-end/TimelinePresentationModel.js:
3129         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
3130
3131 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3132
3133         Web Inspector: [CodeMirror] Popover for codemirror
3134         https://bugs.webkit.org/show_bug.cgi?id=113771
3135
3136         Reviewed by Pavel Feldman.
3137
3138         Implement methods TextEditor.cursorPositionToCoordinates, TextEditor.coordinatesToCursorPosition and
3139         TextEditor.tokenAtTextPosition in CodeMirrorTextEditor to support popover
3140         functionality. Add css classes to highlight popover anchoring text.
3141
3142         No new tests.
3143
3144         * inspector/front-end/CodeMirrorTextEditor.js:
3145         (WebInspector.CodeMirrorTextEditor.prototype.cursorPositionToCoordinates):
3146         (WebInspector.CodeMirrorTextEditor.prototype.coordinatesToCursorPosition):
3147         (WebInspector.CodeMirrorTextEditor.prototype.tokenAtTextPosition):
3148         * inspector/front-end/cm/cmdevtools.css:
3149         (.CodeMirror .source-frame-eval-expression):
3150         (.CodeMirror .source-frame-eval-expression-end):
3151         (.CodeMirror .source-frame-eval-expression-start):
3152
3153 2013-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3154
3155         [BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
3156         https://bugs.webkit.org/show_bug.cgi?id=113763
3157
3158         Reviewed by Rob Buis.
3159
3160         PR 318945
3161         Internally reviewed by Jakob Petsovits.
3162
3163         And remove the BlackBerry specific methods
3164         frameViewFrameRectDidChange and frameViewContentsSizeDidChange.
3165
3166         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:
3167         (WebCore::ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated):
3168         Called when the frame view has been laid out. Update the contents
3169         rectangle and visible area of the scroll layer for the given frame
3170         view.
3171         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h:
3172         (ScrollingCoordinatorBlackBerry):
3173         * platform/graphics/blackberry/LayerWebKitThread.h:
3174         (WebCore::LayerWebKitThread::setFrameVisibleRect): Return early if
3175         value hasn't changed.
3176         (WebCore::LayerWebKitThread::setFrameContentsSize): Ditto.
3177
3178 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
3179
3180         Web Inspector: Separate JavaScriptSourceFrame popover from knowledge of editor's DOM
3181         https://bugs.webkit.org/show_bug.cgi?id=113412
3182
3183         Reviewed by Pavel Feldman.
3184
3185         - Use TextEditor.coordinatesToCursorPosition,
3186         TextEditor.cursorPositionToCoordinates and TextEditor.tokenAtTextPosition to figure out
3187         hovering area and create popover anchor.
3188         - Use TextEditor.highlightRange/TextEditor.removeHighlight methods to
3189         highlight hovering text in editor.
3190
3191         No new tests: no change in behaviour.
3192
3193         * inspector/front-end/DefaultTextEditor.js:
3194         * inspector/front-end/JavaScriptSourceFrame.js:
3195         (WebInspector.JavaScriptSourceFrame):
3196         (WebInspector.JavaScriptSourceFrame.prototype.willHide):
3197         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
3198         (WebInspector.JavaScriptSourceFrame.prototype.):
3199         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
3200         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
3201         * inspector/front-end/inspector.css:
3202         (.popover-anchor):
3203         (.source-frame-eval-expression):
3204
3205 2013-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
3206
3207         [CSSRegions] RenderFlowThread should not be created as a Document renderer
3208         https://bugs.webkit.org/show_bug.cgi?id=113658
3209
3210         Reviewed by Julien Chaffraix.
3211
3212         After https://bugs.webkit.org/show_bug.cgi?id=107138, RenderFlowThread should not be constructed as a renderer for Document.
3213         Since it does not have an element associated, it will be constructed using the pattern for anonymous blocks.
3214         However, since I do not want the flow thread to be collapsed as anonymous blocks are, i changed RenderObject::isAnonymousBlock
3215         to return false for a RenderFlowThread (the alternative would have been to patch more call sites to prevent RenderFlowThread
3216         collapsing as anonymous block).
3217
3218         Covered by existing tests.
3219
3220         * rendering/FlowThreadController.cpp:
3221         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
3222         * rendering/RenderFlowThread.cpp:
3223         (WebCore::RenderFlowThread::RenderFlowThread):
3224         * rendering/RenderFlowThread.h:
3225         * rendering/RenderMultiColumnBlock.cpp:
3226         (WebCore::RenderMultiColumnBlock::addChild):
3227         * rendering/RenderMultiColumnFlowThread.cpp:
3228         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
3229         (WebCore::RenderMultiColumnFlowThread::createAnonymous):
3230         * rendering/RenderMultiColumnFlowThread.h:
3231         (RenderMultiColumnFlowThread):
3232         * rendering/RenderNamedFlowThread.cpp:
3233         (WebCore::RenderNamedFlowThread::createAnonymous):
3234         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3235         * rendering/RenderNamedFlowThread.h:
3236         (RenderNamedFlowThread):
3237         * rendering/RenderObject.h:
3238         (WebCore::RenderObject::isAnonymousBlock):
3239
3240 2013-04-02  Shinya Kawanaka  <shinyak@chromium.org>
3241
3242         Unreviewed, rolling out r147383.
3243         http://trac.webkit.org/changeset/147383
3244         https://bugs.webkit.org/show_bug.cgi?id=112369
3245
3246         Speculative rollout because of lots of layout test failure
3247
3248         * html/parser/HTMLDocumentParser.cpp:
3249         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
3250         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
3251         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3252         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
3253         (WebCore::HTMLDocumentParser::insert):
3254         * html/parser/HTMLParserScheduler.cpp:
3255         (WebCore::PumpSession::PumpSession):
3256         * html/parser/HTMLParserScheduler.h:
3257
3258 2013-04-02  Eugene Klyuchnikov  <eustas@chromium.org>
3259
3260         Web Inspector: [HeapProfiler] Table rows do not appear when resizing.
3261         https://bugs.webkit.org/show_bug.cgi?id=113760
3262
3263         Reviewed by Yury Semikhatsky.
3264
3265         Analysis: custom-made split-view doesn't notify content panes about
3266         resizing.
3267
3268         * inspector/front-end/HeapSnapshotView.js:
3269         (WebInspector.HeapSnapshotView.prototype._updateRetainmentViewHeight):
3270         Notify content pane about resize.
3271
3272 2013-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
3273
3274         [CSSRegions] Clean-up RenderFlowThread::updateRegionsFlowThreadPortionRect
3275         https://bugs.webkit.org/show_bug.cgi?id=113659
3276
3277         Reviewed by Julien Chaffraix.
3278
3279         RenderRegion::logicalHeightOfAllFlowThreadContent already contains the
3280         override logical content height for auto-height regions in normal layout phase.
3281         Therefore, there is no need to explicitly override region's rect height with
3282         the region's overrideLogicalContentHeight as the region rect already contains
3283         the right value.
3284
3285         No change in functionality, covered by existing tests.
3286
3287         * rendering/RenderFlowThread.cpp:
3288         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
3289         * rendering/RenderRegion.cpp:
3290         (WebCore::RenderRegion::pageLogicalHeight):
3291         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
3292
3293 2013-04-02  Mike West  <mkwst@chromium.org>
3294
3295         X-Frame-Options: Blocked frames should not inherit their parent's SecurityOrigin.
3296         https://bugs.webkit.org/show_bug.cgi?id=112903
3297
3298         Reviewed by Adam Barth.
3299
3300         This change brings WebKit in line with IE and Gecko's behavior, both of
3301         which treat the blocked frame as being cross-origin for the purposes of
3302         access checks ('[frame].contentWindow.location.href' is inaccessible,
3303         for example).
3304
3305         * dom/Document.cpp:
3306         (WebCore::Document::processHttpEquiv):
3307             Rather than redirecting to 'about:blank', redirect to
3308             'data:text/html,<p></p>' which does not inherit the SecurityOrigin
3309             of the parent.
3310         * loader/DocumentLoader.cpp:
3311         (WebCore::DocumentLoader::responseReceived):
3312             Before calling cancelMainResourceLoad, ensure that the frame's
3313             document is sandboxed into a unique origin so that it doesn't
3314             inherit the parent's SecurityOrigin.
3315
3316 2013-04-01  Elliott Sprehn  <esprehn@chromium.org>
3317
3318         RenderObject::offsetParent should return Element*
3319         https://bugs.webkit.org/show_bug.cgi?id=113739
3320
3321         Reviewed by Abhishek Arya.
3322
3323         The offsetParent of a node should always be an Element, ensure this
3324         by fixing RenderObject::offsetParent to return an Element* and clean up
3325         the method to match the algorithm in the spec which lets us remove the
3326         comments that were trying to explain what was going on.
3327
3328         This also hardens against badness where RenderObject::offsetParent
3329         could have returned a renderer with a non-Element node which would result
3330         in a bad cast in Element::offsetParent. We fixed all cases of this, but
3331         this patch makes sure such things never happen again.
3332
3333         No new tests, no change in behavior.
3334
3335         * dom/Element.cpp:
3336         (WebCore::Element::offsetParent):
3337         * rendering/RenderBoxModelObject.cpp:
3338         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
3339         * rendering/RenderObject.cpp:
3340         (WebCore::RenderObject::offsetParent): Now returns Element*.
3341         * rendering/RenderObject.h:
3342         (RenderObject):
3343
3344 2013-04-01  Alpha Lam  <hclam@chromium.org>
3345
3346         Simply GIFImageReader error handling
3347         https://bugs.webkit.org/show_bug.cgi?id=113718
3348
3349         Reviewed by Adam Barth.
3350
3351         When GIFImageReader encounters a parsing error it should just return
3352         without doing any more work. Current code saves a boolean before return,
3353         this is not necessary.
3354
3355         Tested with existing unit tests.
3356         Tested locally with ASAN build with 60k GIF images.
3357
3358         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3359         (WebCore::GIFImageDecoder::repetitionCount):
3360         * platform/image-decoders/gif/GIFImageReader.cpp:
3361         (GIFImageReader::decode):
3362         * platform/image-decoders/gif/GIFImageReader.h:
3363         (GIFImageReader::GIFImageReader):
3364         (GIFImageReader):
3365
3366 2013-04-01  Elliott Sprehn  <esprehn@chromium.org>
3367
3368         Make all v8 weak callbacks type safe
3369         https://bugs.webkit.org/show_bug.cgi?id=111802
3370
3371         Reviewed by Adam Barth.
3372
3373         Make all v8 handle weak callbacks typesafe by adding a new class WeakHandleListner
3374         that uses templates to generate the callback proxies that have the correct type
3375         arguments. Now getting the arguments wrong will fail compilation.
3376
3377         No new tests, no change in behavior.
3378
3379         * bindings/v8/DOMDataStore.h:
3380         (WebCore::::callback):
3381         * bindings/v8/DOMWrapperMap.h:
3382         (WebCore::DOMWrapperMap::DOMWrapperMap):
3383         (WebCore::DOMWrapperMap::set):
3384         (WebCore::DOMWrapperMap::reportMemoryUsage):
3385         (DOMWrapperMap):
3386         * bindings/v8/DOMWrapperWorld.cpp:
3387         (WebCore::::callback):
3388         (WebCore::DOMWrapperWorld::makeContextWeak):
3389         * bindings/v8/ScriptState.cpp:
3390         (WebCore::::callback):
3391         (WebCore::ScriptState::ScriptState):
3392         * bindings/v8/ScriptState.h:
3393         (ScriptState):
3394         * bindings/v8/ScriptWrappable.h:
3395         (ScriptWrappable):
3396         (WebCore::ScriptWrappable::setWrapper):
3397         (WebCore::::callback):
3398         * bindings/v8/V8AbstractEventListener.cpp:
3399         (WebCore::::callback):
3400         (WebCore::V8AbstractEventListener::setListenerObject):
3401         * bindings/v8/V8AbstractEventListener.h:
3402         (V8AbstractEventListener):
3403         * bindings/v8/V8MutationCallback.cpp:
3404         (WebCore::::callback):
3405         (WebCore::V8MutationCallback::V8MutationCallback):
3406         * bindings/v8/V8MutationCallback.h:
3407         (V8MutationCallback):
3408         * bindings/v8/V8NPObject.cpp:
3409         (V8NPTemplateMap):
3410         (WebCore::V8NPTemplateMap::set):
3411         (WebCore::::callback):
3412         (WebCore::staticNPObjectMap):
3413         * bindings/v8/V8Utilities.h:
3414         (WeakHandleListener):
3415         (WebCore::WeakHandleListener::makeWeak):
3416         (WebCore::WeakHandleListener::WeakHandleListener):
3417         (WebCore::WeakHandleListener::invokeWeakCallback):
3418         * bindings/v8/V8ValueCache.cpp:
3419         (WebCore::::callback):
3420         (WebCore::StringCache::v8ExternalStringSlow):
3421         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3422         (WebCore::::callback):
3423         (WebCore::createInjectedScriptHostV8Wrapper):
3424
3425 2013-04-01  Tien-Ren Chen  <trchen@chromium.org>
3426
3427         Hide non-coordinated scrollbars for Android M26
3428         https://bugs.webkit.org/show_bug.cgi?id=113738
3429
3430         Reviewed by Simon Fraser.
3431
3432         This patch will hide any non-coordinated scrollbars on Android.
3433         Coordinated scrollbars won't be affected.
3434
3435         Currently all scrollbars are coordinated on Android. The sole purpose
3436         of this patch is to be cherry-picked to the M26 branch.
3437
3438