Crash in WebCore::TextTrackList::remove
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-02  Eric Carlson  <eric.carlson@apple.com>
2
3         Crash in WebCore::TextTrackList::remove
4         https://bugs.webkit.org/show_bug.cgi?id=85095
5
6         Reviewed by Maciej Stachowiak.
7
8         Test: media/track/track-remove-quickly.html
9
10         * html/HTMLMediaElement.cpp:
11         (WebCore::HTMLMediaElement::willRemoveTrack): Return immediately if the tracks collection
12             has not been allocated yet.
13
14 2012-05-02  David Barton  <dbarton@mathscribe.com>
15
16         After appending MathML with jquery the table renders with overlaps
17         https://bugs.webkit.org/show_bug.cgi?id=52444
18
19         Reviewed by Julien Chaffraix.
20
21         This patch also fixes bugs 72834 and 47781. The main problem is that correct preferred
22         logical widths are affected by operator stretching. Thus we add a call to
23         setNeedsLayoutAndPrefWidthsRecalc() after the stretching code in
24         RenderMathMLOperator.cpp, and change RenderMathMLBlock and RenderMathMLRow to make sure
25         that stretching of children is done before an <mrow>'s preferred logical widths are
26         computed.
27         
28         Test: Added a test to mathml/presentation/mo-stretch.html
29
30         * rendering/mathml/RenderMathMLBlock.cpp:
31         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
32         (WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
33         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
34         (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
35         * rendering/mathml/RenderMathMLBlock.h:
36         (WebCore::RenderMathMLBlock::unembellishedOperator):
37         (WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty):
38         (WebCore::RenderMathMLBlock::preferredLogicalHeight):
39         (WebCore::RenderMathMLBlock::setPreferredLogicalHeight):
40             - Add m_preferredLogicalHeight and methods to compute and return it.
41             - Remove stretchToHeight() from most classes as it no longer needs to be done
42               recursively. We just call it on the base of an embellished operator, and that
43               calls setNeedsLayoutAndPrefWidthsRecalc() to mark itself and its container
44               chain.
45         
46         * rendering/mathml/RenderMathMLOperator.cpp:
47         (WebCore::RenderMathMLOperator::stretchToHeight):
48             - Don't compare an unexpanded height to an expanded one.
49         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
50         (WebCore::RenderMathMLOperator::updateFromElement):
51             - After stretching, call setNeedsLayoutAndPrefWidthsRecalc().
52         * rendering/mathml/RenderMathMLOperator.h:
53         (RenderMathMLOperator):
54         
55         * rendering/mathml/RenderMathMLRow.cpp:
56         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
57         (WebCore::RenderMathMLRow::layout):
58         * rendering/mathml/RenderMathMLRow.h:
59         (RenderMathMLRow):
60             - Add computePreferredLogicalWidths(), using computeChildrenPreferredLogicalHeights()
61               to compute our children's preferred logical heights if necessary, followed by
62               operator stretching.
63         
64         * rendering/mathml/RenderMathMLSubSup.cpp:
65         * rendering/mathml/RenderMathMLSubSup.h:
66         (RenderMathMLSubSup):
67         * rendering/mathml/RenderMathMLUnderOver.cpp:
68         * rendering/mathml/RenderMathMLUnderOver.h:
69         (RenderMathMLUnderOver):
70
71 2012-05-02  Dana Jansens  <danakj@chromium.org>
72
73         [chromium] Avoid extra Region copies in CCOcclusionTracker
74         https://bugs.webkit.org/show_bug.cgi?id=85257
75
76         Reviewed by Adrienne Walker.
77
78         Instead of making a Region for each layer and then uniting the region
79         with the current occlusion, directly add the rects for the given layer
80         to the current occlusion.
81
82         When subtracting a region from a rect, just subtract the region
83         directly instead of computing the intersecting region.
84
85         Covered by existing tests.
86
87         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
88         (WebCore::addOcclusionBehindLayer):
89         (WebCore::::markOccludedBehindLayer):
90         (WebCore::rectSubtractRegion):
91
92 2012-05-02  Keith Rosenblatt  <keith.rosenblatt@nokia.com>
93
94         [Qt] ASSERT in FontCustomPlatformDataQt.cpp with invalid font in data URI
95         https://bugs.webkit.org/show_bug.cgi?id=85089
96
97         Reviewed by Simon Hausmann.
98
99         Do not return data referencing an invalid QRawFont from createFontCustomPlatformData().  Instead
100         return null.
101
102         Test: fast/css/font-face-data-uri-invalid.html
103
104         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
105         (WebCore::createFontCustomPlatformData):
106
107 2012-05-02  Michal Mocny  <mmocny@google.com>
108
109         [chromium] Set contents texture manager preferred memory limit based on GpuMemoryManager suggestion.
110         https://bugs.webkit.org/show_bug.cgi?id=84270
111
112         Reviewed by Kenneth Russell.
113
114         Updates the content texture manager memory limits based on GpuMemoryManager memory allocation suggestions.
115
116         The memory allocation size (in bytes) is fed from LayerRendererChromium memory allocation changed callback
117         handler to CCLayerTreeHost.  At that point we adjust the limits, using the existing notions of preferred and
118         max limits.
119
120         On android, the preferred limit is half the maximum (as it has always been), but on all other platforms the
121         preferred limit is now equal to max, in order to allow more agressive prepainting.
122
123         Finally, android has memory constraints dependant on viewportSize, but that logic has been pushed into
124         the GpuMemoryManager.
125
126         * platform/graphics/chromium/LayerRendererChromium.cpp:
127         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
128         (WebCore::LayerRendererChromium::beginDrawingFrame):
129         * platform/graphics/chromium/LayerRendererChromium.h:
130         (LayerRendererChromiumClient):
131         * platform/graphics/chromium/TextureManager.cpp:
132         (WebCore::TextureManager::setMemoryAllocationLimitBytes):
133         (WebCore):
134         * platform/graphics/chromium/TextureManager.h:
135         (TextureManager):
136         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
137         (WebCore::CCLayerTreeHost::setViewportSize):
138         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
139         (WebCore):
140         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
141         (CCLayerTreeHost):
142         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
143         (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes):
144         (WebCore):
145         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
146         (CCLayerTreeHostImplClient):
147         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
148         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
149         (WebCore):
150         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
151         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
152         (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
153         (WebCore):
154         (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes):
155         * platform/graphics/chromium/cc/CCThreadProxy.h:
156         (CCThreadProxy):
157
158 2012-05-02  Emil A Eklund  <eae@chromium.org>
159
160         Fix usage of layout types in platform code
161         https://bugs.webkit.org/show_bug.cgi?id=85392
162
163         Reviewed by Eric Seidel.
164
165         No new tests, no change in functionality.
166
167         * page/EventHandler.cpp:
168         (WebCore::EventHandler::handleGestureTap):
169         Use rounded point for gestures as event handling is still mostly int based.
170
171 2012-05-02  Kenneth Russell  <kbr@google.com>
172
173         Don't allocate stencil buffer if stencil flag is false in context creation attributes
174         https://bugs.webkit.org/show_bug.cgi?id=85317
175
176         Reviewed by Dimitri Glazkov.
177
178         Make it appear to WebGL application that there is no stencil
179         buffer even if the underlying GraphicsContext3D allocated one.
180         Verified intended behavior with test case from Mozilla's bug report.
181
182         Updated context-attributes-alpha-depth-stencil-antialias.html test
183         from Khronos repository. Ran WebGL layout tests on Linux in
184         Chrome's DRT and on Mac OS in Safari's.
185
186         * html/canvas/WebGLFramebuffer.cpp:
187         (WebCore::WebGLFramebuffer::hasStencilBuffer): Added query method.
188         (WebCore): Changed desired semantics of isValidRenderbuffer.
189         * html/canvas/WebGLFramebuffer.h:
190         (WebGLFramebuffer): Added hasStencilBuffer.
191         * html/canvas/WebGLRenderingContext.cpp:
192         (WebCore):
193         (WebCore::WebGLRenderingContext::initializeNewContext):
194             Clear new flag.
195         (WebCore::WebGLRenderingContext::bindFramebuffer):
196             Reset stencil test upon framebuffer change.
197         (WebCore::WebGLRenderingContext::disable):
198             Cache flag; reset stencil test.
199         (WebCore::WebGLRenderingContext::enable):
200             Cache flag; reset stencil test.
201         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
202             Reset stencil test upon renderbuffer change.
203         (WebCore::WebGLRenderingContext::getContextAttributes):
204             Force depth and stencil to false if false was requested.
205         (WebCore::WebGLRenderingContext::isEnabled):
206             Return cached flag.
207         (WebCore::WebGLRenderingContext::renderbufferStorage):
208             Reset stencil test upon renderbuffer reallocation.
209         (WebCore::WebGLRenderingContext::applyStencilTest):
210             Enable or disable stencil test based on request and availability.
211         (WebCore::WebGLRenderingContext::enableOrDisable):
212             Helper function.
213         * html/canvas/WebGLRenderingContext.h:
214         (WebGLRenderingContext):
215             Added cache of STENCIL_TEST flag. Deleted unused m_stencilBits.
216
217 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
218
219         Drag and drop text into table is pasting the text in the next <td> element
220         https://bugs.webkit.org/show_bug.cgi?id=75004
221
222         Reviewed by Darin Adler.
223
224         The bug was caused by ReplaceSelectionCommand adjusting the insertion position to be before
225         of the block element containing the insertion position even when the block element is a table cell.
226
227         Fixed the bug by not moving the insertion position before the table cell in this case.
228
229         Test: editing/pasteboard/paste-into-table-cell.html
230
231         * editing/ReplaceSelectionCommand.cpp:
232         (WebCore::ReplaceSelectionCommand::doApply):
233
234 2012-05-02  Beth Dakin  <bdakin@apple.com>
235
236         https://bugs.webkit.org/show_bug.cgi?id=85309
237         supportsExpandedScrollbars() should check for the method we actually call rather 
238         than a related method
239
240         Reviewed by Anders Carlsson.
241
242         Missing colon.
243         * platform/mac/ScrollbarThemeMac.mm:
244         (WebCore::supportsExpandedScrollbars):
245
246 2012-05-02  Antti Koivisto  <antti@apple.com>
247
248         Move title and media queries from StyleSheetInternal to CSSStyleSheet
249         https://bugs.webkit.org/show_bug.cgi?id=85387
250
251         Reviewed by Anders Carlsson.
252
253         Stylesheet title and media queries are determined by the owner, not by the stylesheet itself.
254         The fields belong to CSSStyleSheet.
255         
256         This will make it easier to share StyleSheetInternal instances between documents.
257
258         * css/CSSStyleSheet.cpp:
259         (WebCore::StyleSheetInternal::StyleSheetInternal):
260         (WebCore::StyleSheetInternal::isCacheable):
261         (WebCore):
262         (WebCore::CSSStyleSheet::setDisabled):
263         
264             Invalidate the document style directly instead of ping-ponging through StyleSheetInternal.
265
266         (WebCore::CSSStyleSheet::setMediaQueries):
267         (WebCore::CSSStyleSheet::media):
268         * css/CSSStyleSheet.h:
269         (StyleSheetInternal):
270         (WebCore::StyleSheetInternal::originalURL):
271         (WebCore::StyleSheetInternal::hasCharsetRule):
272         (WebCore::CSSStyleSheet::mediaQueries):
273         (CSSStyleSheet):
274         (WebCore::CSSStyleSheet::setTitle):
275         * css/StyleResolver.cpp:
276         (WebCore::StyleResolver::appendAuthorStylesheets):
277         (WebCore::StyleResolver::collectMatchingRulesForList):
278         * dom/DOMImplementation.cpp:
279         (WebCore::DOMImplementation::createCSSStyleSheet):
280         * dom/ProcessingInstruction.cpp:
281         (WebCore::ProcessingInstruction::setCSSStyleSheet):
282         * dom/StyleElement.cpp:
283         (WebCore::StyleElement::createSheet):
284         * html/HTMLLinkElement.cpp:
285         (WebCore::HTMLLinkElement::parseAttribute):
286         (WebCore::HTMLLinkElement::setCSSStyleSheet):
287         * html/HTMLStyleElement.cpp:
288         (WebCore::HTMLStyleElement::parseAttribute):
289         * svg/SVGStyleElement.cpp:
290         (WebCore::SVGStyleElement::parseAttribute):
291
292 2012-05-02  Alexis Menard  <alexis.menard@openbossa.org>
293
294         Unreviewed Qt build fix with GCC 4.7.0.
295
296         * platform/qt/DeviceMotionProviderQt.h:
297         (DeviceMotionProviderQt):
298         * platform/qt/DeviceOrientationProviderQt.cpp:
299         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
300         (WebCore):
301         * platform/qt/DeviceOrientationProviderQt.h:
302         (DeviceOrientationProviderQt):
303
304 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
305
306         [Texmap] Enable css filters in TextureMapperGL
307         https://bugs.webkit.org/show_bug.cgi?id=75778
308
309         Unreviewed build fix to greenify the Qt Minimal bot.
310
311         * platform/graphics/texmap/TextureMapperShaderManager.h:
312
313 2012-05-02  Philippe Normand  <pnormand@igalia.com>
314
315         [GTK] Compilation warnings in RenderTheme
316         https://bugs.webkit.org/show_bug.cgi?id=85286
317
318         Reviewed by Martin Robinson.
319
320         Removed un-needed code and refactored fileListNameForWidth
321         accordingly to avoid un-used variable warnings during compilation.
322
323         * platform/gtk/RenderThemeGtk.cpp:
324         (WebCore):
325         (WebCore::RenderThemeGtk::fileListNameForWidth):
326
327 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
328
329         NULL ptr in WebCore::AppendNodeCommand::AppendNodeCommand
330         https://bugs.webkit.org/show_bug.cgi?id=75843
331
332         Reviewed by Tony Chang.
333
334         The crash was caused by indentIntoBlockquote's passing a bad outerBlock to moveParagraphsWithClone.
335
336         When the position is created after blockquote in the following DOM:
337         BODY
338         * BLOCKQUOTE style=margin: 0 0 0 40px; border: none; padding: 0px;
339             E
340                 #text "\nx\n"
341         VisiblePosition's constructor (of startOfContents) turns the position into a legacy position (blockquote, 0).
342         The crash occurs because this position doesn't belong in the same paragraph as E, which is the paragraph
343         we're trying to move into the blockquote.
344
345         Fixed bug by calling positionInParentAfterNode instead of positionAfterNode for now. We should eventually be
346         able to use positionAfterNode here once VisiblePosition's constructor starts handling before/after positions
347         properly.
348
349         Test: editing/execCommand/indent-with-after-content-crash.html
350
351         * editing/IndentOutdentCommand.cpp:
352         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
353
354 2012-05-02  Jer Noble  <jer.noble@apple.com>
355
356         WebWindowFadeAnimation ignores "duration" parameter.
357         https://bugs.webkit.org/show_bug.cgi?id=85386
358
359         Reviewed by Brady Eidson.
360
361         Ignoring the "duration" parameter causes the full screen fade and scale animations
362         to get out of sync.
363
364         * platform/mac/WebWindowAnimation.mm:
365         (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]):
366
367 2012-05-02  Julien Chaffraix  <jchaffraix@webkit.org>
368
369         REGRESSION(110072): Clipping is not applied on layers that are animated using platform code
370         https://bugs.webkit.org/show_bug.cgi?id=83954
371
372         Reviewed by Simon Fraser.
373
374         Tests: fast/layers/no-clipping-overflow-hidden-added-after-transform-expected.html
375                fast/layers/no-clipping-overflow-hidden-added-after-transform.html
376                fast/layers/no-clipping-overflow-hidden-added-after-transition-expected.html
377                fast/layers/no-clipping-overflow-hidden-added-after-transition.html
378                fast/layers/no-clipping-overflow-hidden-hardware-acceleration-expected.html
379                fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
380                (and all the tests that will need to be rebaselined)
381
382         r110072 changed the way we create layers to lazily allocate overflow: hidden ones
383         based on layout overflow. However with hardware acceleration, certain operations
384         do cause overflow without actually calling layout (the test cases added as part
385         of this change are using transition / animation). This means that those cases
386         wouldn't properly clip.
387
388         Due to the above issue and the other regressions from r110072, the easiest fix is
389         to just to roll it out.
390
391         * rendering/RenderBox.h:
392         Changed to allocate a layer whenever we have an overflow clip.
393
394         * rendering/RenderBox.cpp:
395         (WebCore::RenderBox::scrolledContentOffset):
396         (WebCore::RenderBox::cachedSizeForOverflowClip):
397         Reverted those 2 to avoid using the cached size logic.
398
399         * rendering/RenderBlock.cpp:
400         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
401         (WebCore::RenderBlock::layoutBlock):
402         (WebCore::RenderBlock::paint):
403         (WebCore::RenderBlock::isPointInOverflowControl):
404         * rendering/RenderBlock.h:
405         * rendering/RenderBox.cpp:
406         (WebCore::RenderBox::willBeDestroyed):
407         (WebCore::RenderBox::styleDidChange):
408         (WebCore::RenderBox::layout):
409         (WebCore::RenderBox::scrollWidth):
410         (WebCore::RenderBox::scrollHeight):
411         (WebCore::RenderBox::scrollLeft):
412         (WebCore::RenderBox::scrollTop):
413         (WebCore::RenderBox::setScrollLeft):
414         (WebCore::RenderBox::setScrollTop):
415         (WebCore::RenderBox::includeVerticalScrollbarSize):
416         (WebCore::RenderBox::includeHorizontalScrollbarSize):
417         (WebCore::RenderBox::pushContentsClip):
418         (WebCore::RenderBox::popContentsClip):
419         (WebCore::RenderBox::addLayoutOverflow):
420         * rendering/RenderBoxModelObject.cpp:
421         (WebCore::RenderBoxModelObject::styleDidChange):
422         * rendering/RenderBoxModelObject.h:
423         (RenderBoxModelObject):
424         * rendering/RenderDeprecatedFlexibleBox.cpp:
425         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
426         * rendering/RenderFlexibleBox.cpp:
427         (WebCore::RenderFlexibleBox::layoutBlock):
428         * rendering/RenderTable.cpp:
429         (WebCore::RenderTable::layout):
430         * rendering/RenderTableRow.h:
431         (RenderTableRow):
432         * rendering/RenderTableSection.cpp:
433         (WebCore::RenderTableSection::layout):
434         Removed the previous scaffolding code and reverted some functions to
435         being private (as they were prior to r110072).
436
437 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
438
439         [Texmap] Enable css filters in TextureMapperGL
440         https://bugs.webkit.org/show_bug.cgi?id=75778
441
442         Reviewed by Jocelyn Turcotte.
443
444         Added support for color filters in TextureMapperGL. Blur and shadow would be done in a
445         different patch.
446
447         Modified BitmapTexture::applyFilters to return a texture, since GL cannot paint a texture
448         into itself.
449         Created a shader map for standard filters, since all of them work more or less the same way
450         with a single uniform. Added the colorization shaders based on the W3C filter spec, as
451         already implemented in FEFilterRenderer.cpp and FEColorMatrix.cpp.
452         We use two swapping textures to render the filters.
453
454         Covered by tests in css3/filters.
455
456         * platform/graphics/texmap/TextureMapper.cpp:
457         (WebCore::TextureMapper::acquireTextureFromPool):
458         * platform/graphics/texmap/TextureMapper.h:
459         (WebCore::BitmapTexture::applyFilters):
460         * platform/graphics/texmap/TextureMapperGL.cpp:
461         (WebCore::BitmapTextureGL::updateContents):
462         (WebCore):
463         (WebCore::TextureMapperGL::drawFiltered):
464         (WebCore::BitmapTextureGL::applyFilters):
465         (WebCore::BitmapTextureGL::bind):
466         * platform/graphics/texmap/TextureMapperGL.h:
467         (TextureMapperGL):
468         (BitmapTextureGL):
469         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
470         (WebCore::BitmapTextureImageBuffer::applyFilters):
471         * platform/graphics/texmap/TextureMapperImageBuffer.h:
472         (BitmapTextureImageBuffer):
473         * platform/graphics/texmap/TextureMapperLayer.cpp:
474         (WebCore::applyFilters):
475         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
476         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
477         (WebCore::TextureMapperShaderManager::~TextureMapperShaderManager):
478         (WebCore):
479         (WebCore::StandardFilterProgram::~StandardFilterProgram):
480         (WebCore::StandardFilterProgram::StandardFilterProgram):
481         (WebCore::StandardFilterProgram::create):
482         (WebCore::StandardFilterProgram::prepare):
483         (WebCore::TextureMapperShaderManager::getShaderForFilter):
484         * platform/graphics/texmap/TextureMapperShaderManager.h:
485         (WebCore):
486         (StandardFilterProgram):
487         (WebCore::StandardFilterProgram::vertexAttrib):
488         (WebCore::StandardFilterProgram::texCoordAttrib):
489         (WebCore::StandardFilterProgram::textureUniform):
490         (TextureMapperShaderManager):
491
492 2012-05-02  Philippe Normand  <pnormand@igalia.com>
493
494         [GTK] media/track/track-cue-rendering-snap-to-lines-not-set.html fails
495         https://bugs.webkit.org/show_bug.cgi?id=84378
496
497         Reviewed by Eric Carlson.
498
499         Fix positioning of the controls panel back to relative, as it is
500         in the parent CSS. Also remove some duplicate CSS attributes.
501
502         * css/mediaControlsGtk.css:
503         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
504
505 2012-05-02  Beth Dakin  <bdakin@apple.com>
506
507         https://bugs.webkit.org/show_bug.cgi?id=85309
508         supportsExpandedScrollbars() should check for the method we actually call rather 
509         than a related method
510         -and corresponding-
511         <rdar://problem/11065691>
512
513         Reviewed by Anders Carlsson.
514
515         * platform/mac/ScrollbarThemeMac.mm:
516         (WebCore::supportsExpandedScrollbars):
517
518 2012-05-02  Zalan Bujtas  <zbujtas@gmail.com>
519
520         [Qt] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions()
521         https://bugs.webkit.org/show_bug.cgi?id=84241
522
523         Reviewed by Kenneth Rohde Christiansen.
524
525         No need to update viewport arguments when the body element is inserted into the Document.
526         Viewport arguments are updated first when the Document is set on the Frame, and later
527         on any subsequent occurence of the viewport meta tag in the document.
528         It is sufficient to dispatch viewport update once per main frame, if no viewport meta tag is present.
529
530         Also add a flag to be able to track viewport argument update dispatch.
531
532         No tests. Currrent viewport tests cover this behaviour.
533
534         * dom/Document.cpp:
535         (WebCore::Document::Document):
536         (WebCore::Document::updateViewportArguments):
537         (WebCore::Document::documentWillSuspendForPageCache):
538         * dom/Document.h:
539         (Document):
540         (WebCore::Document::didDispatchViewportPropertiesChanged):
541         * html/HTMLBodyElement.cpp:
542         (WebCore::HTMLBodyElement::didNotifyDescendantInseretions):
543
544 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
545
546         Web Inspector: Cannot read property 'length' of undefined TextEditorModel.js:467
547         https://bugs.webkit.org/show_bug.cgi?id=85360
548
549         Reviewed by Yury Semikhatsky.
550
551         Added the undo/redo stack length checks.
552
553         * inspector/front-end/TextEditorModel.js:
554         (WebInspector.TextEditorModel.endsWithBracketRegex.):
555
556 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
557
558         WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed.
559         https://bugs.webkit.org/show_bug.cgi?id=85361
560
561         Reviewed by Yury Semikhatsky.
562
563         Added content validation upon script show.
564
565         * inspector/front-end/JavaScriptSourceFrame.js:
566         (WebInspector.JavaScriptSourceFrame.prototype.wasShown):
567
568 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
569
570         Web Inspector: breakpoints are de-activated only upon the second click.
571         https://bugs.webkit.org/show_bug.cgi?id=85359
572
573         Reviewed by Yury Semikhatsky.
574
575         Initial value for activated state is set.
576
577         * inspector/front-end/DebuggerModel.js:
578         (WebInspector.DebuggerModel):
579
580 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
581
582         Web Inspector: live edit fails to report error
583         https://bugs.webkit.org/show_bug.cgi?id=85357
584
585         Reviewed by Yury Semikhatsky.
586
587         ProtocolError is now a string, not an error object.
588
589         * inspector/front-end/DatabaseQueryView.js:
590         (WebInspector.DatabaseQueryView.prototype._queryError):
591         * inspector/front-end/SourceFrame.js:
592         (WebInspector.SourceFrame.prototype.didEditContent):
593
594 2012-05-02  Lars Knudsen  <lars.knudsen@nokia.com>
595
596         [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2
597         https://bugs.webkit.org/show_bug.cgi?id=64595
598
599         Reviewed by Kenneth Rohde Christiansen.
600
601         No new tests added.  This change adds support for WK2
602         what was in WK1.
603
604         Also moving DeviceMotion and DeviceOrientation clients and
605         providers to WebCore.  This is done to allow clean dependencies
606         when statically linking WK2.
607
608         * Target.pri:
609         * WebCore.pri:
610         * platform/qt/DeviceMotionClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp.
611         (WebCore):
612         (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
613         (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
614         (WebCore::DeviceMotionClientQt::setController):
615         (WebCore::DeviceMotionClientQt::startUpdating):
616         (WebCore::DeviceMotionClientQt::stopUpdating):
617         (WebCore::DeviceMotionClientQt::currentDeviceMotion):
618         * platform/qt/DeviceMotionClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h.
619         (WebCore):
620         (DeviceMotionClientQt):
621         (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
622         * platform/qt/DeviceMotionProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp.
623         (WebCore):
624         (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
625         (WebCore::DeviceMotionProviderQt::~DeviceMotionProviderQt):
626         (WebCore::DeviceMotionProviderQt::setController):
627         (WebCore::DeviceMotionProviderQt::start):
628         (WebCore::DeviceMotionProviderQt::stop):
629         (WebCore::DeviceMotionProviderQt::filter):
630         * platform/qt/DeviceMotionProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h.
631         (WebCore):
632         (DeviceMotionProviderQt):
633         (WebCore::DeviceMotionProviderQt::currentDeviceMotion):
634         * platform/qt/DeviceOrientationClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp.
635         (WebCore):
636         (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
637         (WebCore::DeviceOrientationClientQt::setController):
638         (WebCore::DeviceOrientationClientQt::startUpdating):
639         (WebCore::DeviceOrientationClientQt::stopUpdating):
640         (WebCore::DeviceOrientationClientQt::lastOrientation):
641         * platform/qt/DeviceOrientationClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h.
642         (WebCore):
643         (DeviceOrientationClientQt):
644         * platform/qt/DeviceOrientationProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp.
645         (WebCore):
646         (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
647         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
648         (WebCore::DeviceOrientationProviderQt::setController):
649         (WebCore::DeviceOrientationProviderQt::start):
650         (WebCore::DeviceOrientationProviderQt::stop):
651         (WebCore::DeviceOrientationProviderQt::filter):
652         * platform/qt/DeviceOrientationProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h.
653         (WebCore):
654         (DeviceOrientationProviderQt):
655         (WebCore::DeviceOrientationProviderQt::isActive):
656         (WebCore::DeviceOrientationProviderQt::lastOrientation):
657         (WebCore::DeviceOrientationProviderQt::hasAlpha):
658
659 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
660
661         Web Inspector: exception in console when there are watch expressions
662         https://bugs.webkit.org/show_bug.cgi?id=85351
663
664         Check if script execution is still paused before trying to resolve an
665         object for script popover because execution may be resumed after popover
666         showing is scheduled but before we start resolving the object under
667         the cursor in which case there is no selected call frame any more and
668         we should hide the popover.
669
670         Reviewed by Pavel Feldman.
671
672         * inspector/front-end/JavaScriptSourceFrame.js:
673         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
674
675 2012-05-02  Tommy Widenflycht  <tommyw@google.com>
676
677         MediaStream API: Changing webkitGetUserMedia to take an object instead of a string
678         https://bugs.webkit.org/show_bug.cgi?id=84850
679
680         Reviewed by Dimitri Glazkov.
681
682         The standard changed a while back to use an object as a dictionary but since JSC
683         didn't support the Dictionary class until just recently we have not updated the API until now.
684
685         Change covered by existing, and edited, tests.
686
687         * Modules/mediastream/NavigatorMediaStream.cpp:
688         (WebCore::NavigatorMediaStream::webkitGetUserMedia):
689         * Modules/mediastream/NavigatorMediaStream.h:
690         (WebCore):
691         (NavigatorMediaStream):
692         * Modules/mediastream/NavigatorMediaStream.idl:
693         * Modules/mediastream/UserMediaRequest.cpp:
694         (WebCore::UserMediaRequest::create):
695         (WebCore::UserMediaRequest::UserMediaRequest):
696         * Modules/mediastream/UserMediaRequest.h:
697         (WebCore):
698         (UserMediaRequest):
699         * platform/mediastream/MediaStreamSourcesQueryClient.h:
700         (MediaStreamSourcesQueryClient):
701
702 2012-05-02  Antti Koivisto  <antti@apple.com>
703
704         StyleSheetInternal::parseUserStyleSheet() should be called parseAuthorStyleSheet().
705
706         Rubber-stamped by Nikolas Zimmermann.
707
708         * css/CSSImportRule.cpp:
709         (WebCore::StyleRuleImport::setCSSStyleSheet):
710         * css/CSSStyleSheet.cpp:
711         (WebCore::StyleSheetInternal::parseAuthorStyleSheet):
712         * css/CSSStyleSheet.h:
713         (StyleSheetInternal):
714         * html/HTMLLinkElement.cpp:
715         (WebCore::HTMLLinkElement::setCSSStyleSheet):
716
717 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
718
719         REGRESSION: Web Inspector doesn't show cookies anymore
720         https://bugs.webkit.org/show_bug.cgi?id=85349
721
722         Pass root node instead of DataGrid object to the "populateNode" method.
723         Added compiler annotations so that closure compiler catches such errors.
724
725         Reviewed by Pavel Feldman.
726
727         * inspector/front-end/CookiesTable.js:
728         (WebInspector.CookiesTable.prototype._rebuildTable):
729         * inspector/front-end/NetworkRequest.js:
730         (WebInspector.NetworkRequest.prototype.addFrameError):
731
732 2012-05-02  Dongwoo Im  <dw.im@samsung.com>
733
734         [EFL] Implement the Web Audio API feature.
735         https://bugs.webkit.org/show_bug.cgi?id=78688
736
737         Reviewed by Philippe Normand.
738
739         Implement the Web Audio API feature on the EFL port.
740         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
741
742         * CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi.
743         * PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi.
744         * UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi.
745         * platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro.
746         (WebCore):
747         * platform/audio/efl/AudioBusEfl.cpp: Added.
748         (WebCore):
749         (WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource.
750
751 2012-05-01  Kentaro Hara  <haraken@chromium.org>
752
753         [V8] Add an Isolate parameter to setJSWrapperForXXX()
754         https://bugs.webkit.org/show_bug.cgi?id=85329
755
756         Reviewed by Adam Barth.
757
758         The objective is to pass Isolate around in V8 bindings.
759         This patch adds an Isolate parameter to setJSWrapperForXXX()
760         and passes Isolate to setJSWrapperForXXX() in CodeGeneratorV8.pm.
761         I'll pass Isolate to setJSWrapperForXXX() in custom bindings
762         in a follow-up patch.
763
764         No tests. No change in behavior.
765
766         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
767         (GenerateConstructorCallback):
768         (GenerateEventConstructorCallback):
769         (GenerateNamedConstructorCallback):
770         (GenerateToV8Converters):
771         * bindings/v8/V8DOMWrapper.cpp:
772         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
773         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode):
774         * bindings/v8/V8DOMWrapper.h:
775         (V8DOMWrapper):
776         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
777         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
778
779         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results.
780         (WebCore::V8Float64Array::wrapSlow):
781         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
782         (WebCore::V8TestActiveDOMObject::wrapSlow):
783         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
784         (WebCore::V8TestCustomNamedGetter::wrapSlow):
785         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
786         (WebCore::V8TestEventConstructor::constructorCallback):
787         (WebCore::V8TestEventConstructor::wrapSlow):
788         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
789         (WebCore::V8TestEventTarget::wrapSlow):
790         * bindings/scripts/test/V8/V8TestInterface.cpp:
791         (WebCore::V8TestInterface::constructorCallback):
792         (WebCore::V8TestInterface::wrapSlow):
793         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
794         (WebCore::V8TestMediaQueryListListener::wrapSlow):
795         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
796         (WebCore::V8TestNamedConstructorConstructorCallback):
797         (WebCore::V8TestNamedConstructor::wrapSlow):
798         * bindings/scripts/test/V8/V8TestNode.cpp:
799         (WebCore::V8TestNode::constructorCallback):
800         (WebCore::V8TestNode::wrapSlow):
801         * bindings/scripts/test/V8/V8TestObj.cpp:
802         (WebCore::V8TestObj::constructorCallback):
803         (WebCore::V8TestObj::wrapSlow):
804         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
805         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
806         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
807
808 2012-05-01  Eric Seidel  <eric@webkit.org>
809
810         Add <iframe seamless> navigation code (and pass all the navigation tests)
811         https://bugs.webkit.org/show_bug.cgi?id=85340
812
813         Reviewed by Adam Barth.
814
815         This code was primarily written by Adam Barth and then submitted to my
816         GitHub branch via a pull request:
817         https://github.com/eseidel/webkit/compare/master...seamless
818         https://github.com/eseidel/webkit/pull/2
819         https://github.com/eseidel/webkit/pull/3
820
821         I rewrote parts of it to use Docment::shouldDisplaySeamlesslyWithParent.
822
823         Other parts of the original change have already been committed to WebKit by Adam
824         as part of prep-work for making the loader seamless-ready.
825
826         * loader/FrameLoader.cpp:
827         (WebCore::FrameLoader::findFrameForNavigation):
828
829 2012-05-01  Vincent Scheib  <scheib@chromium.org>
830
831         Fullscreen pop-up logic restored to using processingUserGesture.
832         https://bugs.webkit.org/show_bug.cgi?id=85105
833
834         WebKit was recently updated to the new Fullscreen API:
835         http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
836         http://trac.webkit.org/changeset/111028
837
838         This change reverts back to using processingUserGesture() instead
839         of DOMWindow::allowPopUp(). This fixes incorrect behavior in
840         at least the Chromium port and is consistent with the cited
841         definition of "allowed to show a pop-up":
842           An algorithm is allowed to show a pop-up if, in the task in which the algorithm is running, either:
843           - an activation behavior is currently being processed whose click event was trusted, or
844           - the event listener for a trusted click event is being handled.
845
846         Reviewed by Dimitri Glazkov.
847
848         No new tests.
849
850         * dom/Document.cpp:
851         (WebCore::Document::requestFullScreenForElement):
852
853 2012-05-01  Xiaomei Ji  <xji@chromium.org>
854
855         enable ctrl-arrow move by word visually in non-Windows platforms.
856         https://bugs.webkit.org/show_bug.cgi?id=85017
857
858         Reviewed by Ryosuke Niwa.
859
860         Enable ctrl-arrow moves caret by word in visual order in non-Windows platforms that use ICU word
861         break iterator (it is not enabled for WinCE and Qt where ICU is not used). For those platforms, ctrl-arrow
862         moves caret to word break position before spaces. For example, given a logical text "abc def hij", the word
863         break positions using ctrl-left-arrow from rightmost position are "|abc |def |hij".
864         The word break positions using ctrl-right-arrow from leftmost position are "abc| def| hij|".
865
866         Test: editing/selection/move-by-word-visually-mac.html
867
868         * editing/EditingBehavior.h:
869         (EditingBehavior):
870         (WebCore::EditingBehavior::shouldEatSpaceToNextWord): To control different word break positions
871         (regards to space) for different platforms.
872         * editing/FrameSelection.cpp:
873         (WebCore::FrameSelection::modifyMovingRight): Enable visual word movement for all platforms that use ICU.
874         (WebCore::FrameSelection::modifyMovingLeft):
875         * editing/visible_units.cpp:
876         (WebCore::visualWordPosition): Determine the right word break position (regards to space) based on EditingBehavior.
877         (WebCore::leftWordPosition):
878         (WebCore::rightWordPosition):
879         * editing/visible_units.h:
880
881 2012-05-01  Raymond Liu  <raymond.liu@intel.com>
882
883         Modify RealtimeAnalyserNode pull mechanism
884         https://bugs.webkit.org/show_bug.cgi?id=77515
885
886         Reviewed by Chris Rogers.
887
888         Test: webaudio/automatic-pull-node.html
889
890         * GNUmakefile.list.am:
891         * Modules/webaudio/AudioBasicInspectorNode.cpp: Added.
892         (WebCore):
893         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
894         (WebCore::AudioBasicInspectorNode::pullInputs):
895         (WebCore::AudioBasicInspectorNode::connect):
896         (WebCore::AudioBasicInspectorNode::disconnect):
897         (WebCore::AudioBasicInspectorNode::checkNumberOfChannelsForInput):
898         (WebCore::AudioBasicInspectorNode::updatePullStatus):
899         * Modules/webaudio/AudioBasicInspectorNode.h: Added.
900         (WebCore):
901         (AudioBasicInspectorNode):
902         * Modules/webaudio/AudioContext.cpp:
903         (WebCore::AudioContext::AudioContext):
904         (WebCore::AudioContext::~AudioContext):
905         (WebCore::AudioContext::handlePreRenderTasks):
906         (WebCore::AudioContext::handlePostRenderTasks):
907         (WebCore::AudioContext::markForDeletion):
908         (WebCore):
909         (WebCore::AudioContext::addAutomaticPullNode):
910         (WebCore::AudioContext::removeAutomaticPullNode):
911         (WebCore::AudioContext::updateAutomaticPullNodes):
912         (WebCore::AudioContext::processAutomaticPullNodes):
913         * Modules/webaudio/AudioContext.h:
914         (AudioContext):
915         * Modules/webaudio/AudioDestinationNode.cpp:
916         (WebCore::AudioDestinationNode::provideInput):
917         * Modules/webaudio/AudioNode.h:
918         (AudioNode):
919         * Modules/webaudio/AudioNodeOutput.h:
920         (WebCore::AudioNodeOutput::isConnected):
921         (AudioNodeOutput):
922         * Modules/webaudio/RealtimeAnalyserNode.cpp:
923         (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
924         * Modules/webaudio/RealtimeAnalyserNode.h:
925         (RealtimeAnalyserNode):
926         * WebCore.gypi:
927         * WebCore.xcodeproj/project.pbxproj:
928
929 2012-05-01  Keishi Hattori  <keishi@webkit.org>
930
931         datalist: Form control in a <datalist> should be barred from constraint validation
932         https://bugs.webkit.org/show_bug.cgi?id=84359
933
934         Reviewed by Kent Tamura.
935
936         Tests: fast/forms/datalist/datalist-child-validation.html
937                fast/forms/form-control-element-crash.html
938
939         * html/HTMLFormControlElement.cpp:
940         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
941         (WebCore::HTMLFormControlElement::updateAncestors): Updates the ancestor information.
942         (WebCore::HTMLFormControlElement::insertedInto): Invalidate the ancestor information and call setNeedsWillValidateCheck because willValidate might have changed.
943         (WebCore::HTMLFormControlElement::removedFrom): Ditto.
944         (WebCore::HTMLFormControlElement::disabled):
945         (WebCore::HTMLFormControlElement::recalcWillValidate): Returns false if element has a datalist ancestor.
946         (WebCore::HTMLFormControlElement::willValidate): Check if ancestor information is valid too.
947         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
948         * html/HTMLFormControlElement.h:
949         (HTMLFormControlElement):
950
951 2012-05-01  Kent Tamura  <tkent@chromium.org>
952
953         Calendar Picker: Close the picker by ESC key
954         https://bugs.webkit.org/show_bug.cgi?id=85337
955
956         Reviewed by Kentaro Hara.
957
958         No new tests. Calendar picker is not testable in DRT yet.
959
960         * Resources/calendarPicker.js:
961         (handleGlobalKey): Close the popup by ESC key.
962
963 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
964
965         PNGImageDecoder: Handle interlace buffer allocation failure
966         https://bugs.webkit.org/show_bug.cgi?id=85276
967
968         Reviewed by Eric Seidel.
969
970         No new tests. Not something we can easily test (malloc failure).
971
972         * platform/image-decoders/png/PNGImageDecoder.cpp:
973         (WebCore::PNGImageDecoder::rowAvailable): Check interlace buffer allocations
974         and bail via longjmp on failure. Note PNG_INTERLACE_ADAM7 is the only libpng
975         supported interlace type so test for it explicitly.
976
977 2012-05-01  Kent Tamura  <tkent@chromium.org>
978
979         Calendar Picker: Too wide in Japanese locale
980         https://bugs.webkit.org/show_bug.cgi?id=85331
981
982         Reviewed by Kentaro Hara.
983
984         No new tests. This is a locale-specific behavior.
985
986         * Resources/calendarPicker.js:
987         (formatJapaneseImperialEra):
988         Do not show an imperial era later than 平成99年 to avoid very long
989         year string like "275760年(平成273772年)."
990         (YearMonthController.prototype.attachTo):
991         - Respect the maximum year specfied by <input max=...>
992           If <input max="9999-12-31"> is specified, we don't need to
993           secure space for the year 275,760.
994         - Check the width for 平成99年 as well as the maximum year because
995           "2087年(平成99年)" is usually wider than "275760年".
996
997 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
998
999         PNGImageDecoder: Add ENABLE(IMAGE_DECODER_DOWN_SAMPLING) guards to rowAvailable
1000         https://bugs.webkit.org/show_bug.cgi?id=85268
1001
1002         Reviewed by Eric Seidel.
1003
1004         PNGImageDecoder supports image downsampling. Add ENABLE guards to show where
1005         downsampling is applied when outputting decoded rows to the frame buffer. Most
1006         ports don't enable the flag: don't penalize them in terms speed in this tight
1007         row pixel write loop. s/y/destY/ to match setRGBA() and amend some comments.
1008
1009         No new tests. No change in behavior.
1010
1011         * platform/image-decoders/png/PNGImageDecoder.cpp:
1012         (WebCore::PNGImageDecoder::rowAvailable):
1013
1014 2012-05-01  Eric Seidel  <eric@webkit.org>
1015
1016         Remove uneeded min/max pref width assignment from RenderView
1017         https://bugs.webkit.org/show_bug.cgi?id=85325
1018
1019         Reviewed by Julien Chaffraix.
1020
1021         This code has been with us since the original import from KDE:
1022         http://trac.webkit.org/browser/trunk/WebCore/khtml/rendering/render_root.cpp?annotate=blame&rev=4#L93
1023         It's never been documented, or explained.  Removing it showed no
1024         effect on my local layout tests run.
1025         However this code blocks proper implementation of <iframe seamless>
1026         as we have to do proper min/max width negotiation across the iframe boundary.
1027
1028         I would remove the whole function, but doing so opens a whole can of worms
1029         as this override is public, yet normally this function is *private* (well protected on RenderBox).
1030         It seems plausible that frame flattening code needs this override since it doesn't always
1031         call the min/maxPreferredWidth() calls which normally automatically call this compute*
1032         function if the pref-widths are dirty.
1033         Instead of trying to track that all down, I'm just removing this line, and we'll go
1034         back and remove the whole function at a later date if possible.
1035
1036         * rendering/RenderView.cpp:
1037         (WebCore::RenderView::computePreferredLogicalWidths):
1038
1039 2012-05-01  Nate Chapin  <japhet@chromium.org>
1040
1041         REGRESSION(r115654): PDFs come up blank
1042         https://bugs.webkit.org/show_bug.cgi?id=85275
1043
1044         Reviewed by Alexey Proskuryakov.
1045
1046         Test: http/tests/loading/pdf-commit-load-callbacks.html
1047
1048         * loader/DocumentLoader.cpp:
1049         (WebCore::DocumentLoader::finishedLoading): The load needs to be
1050             committed before we call finishedLoading on the
1051             FrameLoaderClient.
1052         * loader/FrameLoader.cpp:
1053         (WebCore::FrameLoader::transitionToCommitted): We're guaranteeing
1054             that receivedFirstData() will be called other ways (namely,
1055             DocumentLoader won't finish without doing so). This call now
1056             causes custom representations to double-commit, which is bad.
1057
1058 2012-05-01  Eric Seidel  <eric@webkit.org>
1059
1060         Add support for seamless attribute as well as seamless sandbox flag and default CSS styling
1061         https://bugs.webkit.org/show_bug.cgi?id=85302
1062
1063         Reviewed by Ojan Vafai.
1064
1065         This also adds support for the seamless sandbox flag from HTML 5.
1066         The sandbox flag is not speficially overridable in the current HTML5,
1067         but it is set (like all sandbox flags) by default when sandbox is specified.
1068         Unfortunately this support is not yet observable in this patch, as
1069         this patch adds not observable features of seamless.
1070
1071         This patch also adds the html.css additions for seamless, as specified:
1072         http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#replaced-elements
1073
1074         I noticed that my previous testing did not confirm that iframes marked
1075         for seamless (but not possible to display as seamless due to sandbox, etc.)
1076         were still to have this seamless styling.  I've added additional testing for this case.
1077
1078         I also added another test for the about:blank FIXME added as part of this change.
1079
1080         In order to support srcdoc w/ seamless, we needed to move the srcdoc determination
1081         sooner in the initSecurityContext function (before the should-inherit early return).
1082
1083         The next patch will make seamless actually observable from JS/DOM, this one
1084         just lays down all the plumbing, and separates the security aspects for
1085         easy review.
1086
1087         Test: fast/frames/seamless/seamless-inherited-origin.html
1088
1089         * css/html.css:
1090         (iframe:not([seamless])):
1091         (iframe[seamless]):
1092         * dom/Document.cpp:
1093         (WebCore::isEligibleForSeamless):
1094         (WebCore):
1095         (WebCore::Document::initSecurityContext):
1096         (WebCore::Document::seamlessParentIFrame):
1097         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
1098         * dom/Document.h:
1099         (WebCore):
1100         (Document):
1101         * dom/SecurityContext.cpp:
1102         (WebCore::SecurityContext::SecurityContext):
1103         * dom/SecurityContext.h:
1104         (WebCore::SecurityContext::mayDisplaySeamlessWithParent):
1105         (SecurityContext):
1106         * html/HTMLAttributeNames.in:
1107         * html/HTMLIFrameElement.cpp:
1108         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
1109         (WebCore):
1110         * html/HTMLIFrameElement.h:
1111         (HTMLIFrameElement):
1112         * html/HTMLIFrameElement.idl:
1113
1114 2012-05-01  Min Qin  <qinmin@google.com>
1115
1116         use USE(NATIVE_FULLSCREEN_VIDEO) instead of ENABLE(NATIVE_FULLSCREEN_VIDEO)
1117         https://bugs.webkit.org/show_bug.cgi?id=85316
1118
1119         Reviewed by Kent Tamura.
1120
1121         NATIVE_FULLSCREEN_VIDEO means the fullscreen video is implemented by native
1122         system view instead of webkit.
1123         So it is more appropriate to use USE(NATIVE_FULLSCREEN_VIDEO).
1124         This chagne also disabled the rendering of the fullscreen video element in webkit
1125         when that flag is set.
1126         Just renaming the variable, no new tests.
1127
1128         * dom/Document.cpp:
1129         (WebCore::Document::webkitWillEnterFullScreenForElement):
1130         (WebCore):
1131         * platform/graphics/MediaPlayer.cpp:
1132         (WebCore):
1133         * platform/graphics/MediaPlayer.h:
1134         (MediaPlayer):
1135         * platform/graphics/MediaPlayerPrivate.h:
1136         (MediaPlayerPrivateInterface):
1137
1138 2012-05-01  Jeffrey Pfau  <jpfau@apple.com>
1139
1140         <rdar://problem/10422318> Support for web content filter delegate for filtering https content
1141         https://bugs.webkit.org/show_bug.cgi?id=85300
1142
1143         Reviewed by Alexey Proskuryakov.
1144
1145         No new tests.
1146
1147         * WebCore.exp.in:
1148         * loader/MainResourceLoader.cpp:
1149         (WebCore::MainResourceLoader::MainResourceLoader):
1150         (WebCore::MainResourceLoader::~MainResourceLoader):
1151         (WebCore::MainResourceLoader::didCancel):
1152         (WebCore::MainResourceLoader::didReceiveResponse):
1153         (WebCore::MainResourceLoader::didReceiveData):
1154         (WebCore::MainResourceLoader::didFinishLoading):
1155         (WebCore::MainResourceLoader::didFail):
1156         * loader/MainResourceLoader.h:
1157         (MainResourceLoader):
1158         * platform/mac/WebCoreSystemInterface.h:
1159         * platform/mac/WebCoreSystemInterface.mm:
1160
1161 2012-05-01  Kent Tamura  <tkent@chromium.org>
1162
1163         Calendar Picker: Add capability to add platform-specific style sheet
1164         https://bugs.webkit.org/show_bug.cgi?id=85272
1165
1166         Reviewed by Kentaro Hara.
1167
1168         Add RenderTheme::extraCalendarPickerStyleSheet(). The resultant string
1169         of the function is inserted into the calendar picker page.
1170
1171         No new tests. Calendar picker apperance is not testable yet.
1172
1173         * Resources/calendarPicker.css: Removed styles for year-month buttons.
1174         * Resources/calendarPickerMac.css:
1175         Moved from calendarPicker.css, and adjust styles so that they look
1176         standard Lion buttons.
1177         (.year-month-button):
1178         (.year-month-button:active):
1179         (.year-month-button:disabled):
1180         * WebCore.gyp/WebCore.gyp: Add a rule to produce CalendarPickerMac.{cpp,h}.
1181         * html/shadow/CalendarPickerElement.cpp:
1182         (WebCore::CalendarPickerElement::writeDocument):
1183         Add extraCalendarPickerStyleSheet() result to the document.
1184         * rendering/RenderTheme.cpp:
1185         (WebCore::RenderTheme::extraCalendarPickerStyleSheet):
1186         Added. Returns an empty CString by default.
1187         * rendering/RenderTheme.h:
1188         (RenderTheme): Added extraCalendarPickerStyleSheet().
1189         * rendering/RenderThemeChromiumMac.h: Added extraCalendarPickerStyleSheet().
1190         * rendering/RenderThemeChromiumMac.mm:
1191         (WebCore::RenderThemeChromiumMac::extraCalendarPickerStyleSheet):
1192         Added. Returns the content of Resources/calendarPickerMac.css.
1193
1194 2012-05-01  James Simonsen  <simonjam@chromium.org>
1195
1196         Ensure HTMLElementStack fails gracefully if it has a non-Element.
1197         https://bugs.webkit.org/show_bug.cgi?id=85167
1198
1199         Reviewed by Adam Barth.
1200
1201         Test: Added to html5lib/resources/webkit02.dat
1202
1203         * html/parser/HTMLElementStack.cpp:
1204         (WebCore::HTMLElementStack::oneBelowTop):
1205         * html/parser/HTMLTreeBuilder.cpp:
1206         (WebCore::HTMLTreeBuilder::processEndTag):
1207
1208 2012-05-01  Ryosuke Niwa  <rniwa@webkit.org>
1209
1210         *Command.h files shouldn't be exported to WebKit layer
1211         https://bugs.webkit.org/show_bug.cgi?id=74778
1212
1213         Reviewed by Eric Seidel.
1214
1215         Remove the dependency on *Command.h files from Mac port's WebKit layer.
1216         Also wrapped the call to TypingCommand::insertParagraphSeparatorInQuotedContent in the Editor class
1217         so that we can just expose Editor's method instead of directly exposing the said static method.
1218
1219         * WebCore.exp.in:
1220         * WebCore.xcodeproj/project.pbxproj:
1221         * editing/Editor.h:
1222         (Editor):
1223         * editing/mac/EditorMac.mm:
1224         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
1225         (WebCore):
1226
1227 2012-05-01  Julien Chaffraix  <jchaffraix@webkit.org>
1228
1229         Remove one bit from m_column to pack RenderTableCell bits more
1230         https://bugs.webkit.org/show_bug.cgi?id=85291
1231
1232         Reviewed by Ojan Vafai.
1233
1234         Memory improvement, covered by the existing unit tests.
1235
1236         * rendering/RenderTableCell.cpp:
1237         * rendering/RenderTableCell.h:
1238         Remove one bit from m_column (which should be fine as I wouldn't expect tables above 1 millions
1239         columns to render at all anyway) to pack the bitfields in 32 bits. Re-arranged the bits to have the bigger
1240         bitfield first.
1241
1242 2012-05-01  Anders Carlsson  <andersca@apple.com>
1243
1244         Slow scrolling on www.sholby.net
1245         https://bugs.webkit.org/show_bug.cgi?id=85304
1246         <rdar://problem/11138952>
1247
1248         Reviewed by Beth Dakin.
1249
1250         Fix two performance issues that showed up on the profiles.
1251
1252         * loader/FrameLoader.cpp:
1253         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1254         Reset the relevant painted object counter; it's only interesting when loading.
1255
1256         * page/Page.cpp:
1257         (WebCore::Page::startCountingRelevantRepaintedObjects):
1258         Set m_isCountingRelevantRepaintedObjects to true after calling reset, since reset now sets it to false.
1259
1260         (WebCore::Page::resetRelevantPaintedObjectCounter):
1261         Set m_isCountingRelevantRepaintedObjects to false.
1262
1263         (WebCore::Page::addRelevantRepaintedObject):
1264         Use HashSet::find to avoid an extra hash lookup.
1265
1266         * page/scrolling/ScrollingCoordinator.cpp:
1267         (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
1268         Remove the call to FrameView::updateCompositingLayersAfterLayout now, since FrameView::notifyScrollPositionChanged
1269         already calls this and was making us to a lot of work twice.
1270
1271 2012-05-01  Silvia Pfeiffer  <silviapf@chromium.org>
1272
1273         Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
1274         which needs overwriting.
1275         https://bugs.webkit.org/show_bug.cgi?id=84570
1276
1277         Reviewed by Eric Carlson.
1278
1279         No new tests - covered by existing audio rendering tests.
1280
1281         * rendering/RenderMedia.cpp:
1282         (WebCore::RenderMedia::paintReplaced): Overwrite inherited function.
1283         (WebCore):
1284         * rendering/RenderMedia.h:
1285         (RenderMedia):
1286
1287 2012-05-01  Terry Anderson  <tdanderson@chromium.org>
1288
1289         Allow a pre-targeted node to be specified when dispatching a GestureTap event
1290         https://bugs.webkit.org/show_bug.cgi?id=85296
1291
1292         Reviewed by Adam Barth.
1293
1294         https://bugs.webkit.org/show_bug.cgi?id=85101
1295             The new parameter will be used and tested in this patch.
1296
1297         * page/EventHandler.cpp:
1298         (WebCore::EventHandler::handleGestureTap):
1299             The new preTargetedNode parameter can be used to pass in the Node that is
1300             the target of the GestureTap event. If this parameter is used, adjustedPoint
1301             is changed to be the center of the Node's bounding rectangle.
1302         * page/EventHandler.h:
1303         (EventHandler):
1304
1305 2012-05-01  Jessie Berlin  <jberlin@apple.com>
1306
1307         Crash calling disconnectFrame on a DOMWindowExtension a second time.
1308         https://bugs.webkit.org/show_bug.cgi?id=85301
1309
1310         Reviewed by Darin Adler.
1311
1312         DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
1313         to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
1314         DOMWindowProperties, even if it already did so when it entered the page cache.
1315
1316         * page/DOMWindowExtension.cpp:
1317         (WebCore::DOMWindowExtension::disconnectFrame):
1318         Don't do anything if the frame has already been disconnected.
1319
1320 2012-05-01  Aaron Colwell  <acolwell@chromium.org>
1321
1322         Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
1323         until the rest of the Media Source v0.5 methods are implemented. This is
1324         to prevent ambiguity about whether v0.5 is fully supported or not.
1325         https://bugs.webkit.org/show_bug.cgi?id=85295
1326
1327         Reviewed by Eric Carlson.
1328
1329         No new tests. Removing methods from DOM so relevant tests are removed.
1330
1331         * html/HTMLMediaElement.idl:
1332
1333 2012-05-01  Douglas Stockwell  <dstockwell@chromium.org>
1334
1335         IndexedDB: stale index entries may not be removed in some cases
1336         https://bugs.webkit.org/show_bug.cgi?id=85224
1337
1338         Reviewed by Ojan Vafai.
1339
1340         Ensure that stale index entries are removed when the corresponding
1341         object store entry no longer exists.
1342
1343         No new tests. Addresses a performance / storage leak that is
1344         not amenable to verification in a layout test.
1345
1346         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1347         (WebCore):
1348
1349 2012-05-01  Igor Oliveira  <igor.o@sisa.samsung.com>
1350
1351         Use HashMap<OwnPtr> for CounterMap in RenderCounter
1352         https://bugs.webkit.org/show_bug.cgi?id=85294
1353
1354         Reviewed by Eric Seidel.
1355
1356         * rendering/RenderCounter.cpp:
1357         (WebCore):
1358         (WebCore::makeCounterNode):
1359         (WebCore::RenderCounter::destroyCounterNodes):
1360
1361 2012-05-01  Philip Rogers  <pdr@google.com>
1362
1363         Skip building instance tree for disallowed target
1364         https://bugs.webkit.org/show_bug.cgi?id=85202
1365
1366         Reviewed by Nikolas Zimmermann.
1367
1368         When the target of a use is disallowed (e.g., a mask element) we can
1369         skip building the instance tree because the shadow tree will be
1370         skipped as well.
1371
1372         Test: svg/custom/animate-disallowed-mask-element.svg
1373
1374         * svg/SVGUseElement.cpp:
1375         (WebCore::SVGUseElement::buildInstanceTree):
1376
1377 2012-04-29  Nikolas Zimmermann  <nzimmermann@rim.com>
1378
1379         Accumulation for values-animation is broken
1380         https://bugs.webkit.org/show_bug.cgi?id=85158
1381
1382         Reviewed by Darin Adler.
1383
1384         Example:
1385         <rect width="999" height="100" fill="green"/>
1386             <animate begin="0s" values="0; 30; 20" accumulate="sum" repeatCount="5" dur="2s"/>
1387         </rect>
1388
1389         The rect should animate like this:
1390         0.000s -> 0
1391         0.500s -> 15
1392         1.000s -> 30
1393         1.500s -> 25
1394         1.999s -> 20
1395         2.000s -> 20 (first accumulation, starts accumulating from the last set value, here '20').
1396         2.500s -> 45
1397         3.000s -> 50
1398         3.500s -> 45
1399         3.999s -> 40
1400         4.000s -> 40 (second accumulation)
1401         etc.
1402
1403         This is currently broken for values-animation. The accumulation should happen after a full cycle of the values animation ran (aka. at the end of the duration).
1404         A values animation works like this: iterate over the list of values, and calculate a 'from' and 'to' value for a given time. Example for values="0; 30; 20" dur="2s":
1405             - 0.0s .. 1.0s -> from=0, to=30
1406             - 1.0s .. 2.0s -> from=30, to=20
1407
1408         Accumulation currently is taken into account at each interval for a values-animation instead of the end of the cycle. Fix that
1409         by passing an additional 'toAtEndOfDuration' type to calculateAnimatedValue() which is used for accumulation instead of the
1410         current 'to' value.
1411
1412         Test: svg/animations/accumulate-values-width-animation.html
1413
1414         * svg/SVGAnimateElement.cpp:
1415         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1416         * svg/SVGAnimateElement.h:
1417         (SVGAnimateElement):
1418         * svg/SVGAnimateMotionElement.cpp:
1419         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
1420         * svg/SVGAnimateMotionElement.h:
1421         (SVGAnimateMotionElement):
1422         * svg/SVGAnimatedAngle.cpp:
1423         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
1424         * svg/SVGAnimatedAngle.h:
1425         (SVGAnimatedAngleAnimator):
1426         * svg/SVGAnimatedBoolean.cpp:
1427         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
1428         * svg/SVGAnimatedBoolean.h:
1429         (SVGAnimatedBooleanAnimator):
1430         * svg/SVGAnimatedColor.cpp:
1431         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
1432         * svg/SVGAnimatedColor.h:
1433         (SVGAnimatedColorAnimator):
1434         * svg/SVGAnimatedEnumeration.cpp:
1435         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
1436         * svg/SVGAnimatedEnumeration.h:
1437         (SVGAnimatedEnumerationAnimator):
1438         * svg/SVGAnimatedInteger.cpp:
1439         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
1440         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
1441         * svg/SVGAnimatedInteger.h:
1442         (SVGAnimatedIntegerAnimator):
1443         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1444         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
1445         * svg/SVGAnimatedIntegerOptionalInteger.h:
1446         (SVGAnimatedIntegerOptionalIntegerAnimator):
1447         * svg/SVGAnimatedLength.cpp:
1448         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
1449         * svg/SVGAnimatedLength.h:
1450         (SVGAnimatedLengthAnimator):
1451         * svg/SVGAnimatedLengthList.cpp:
1452         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
1453         * svg/SVGAnimatedLengthList.h:
1454         (SVGAnimatedLengthListAnimator):
1455         * svg/SVGAnimatedNumber.cpp:
1456         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
1457         * svg/SVGAnimatedNumber.h:
1458         (SVGAnimatedNumberAnimator):
1459         * svg/SVGAnimatedNumberList.cpp:
1460         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
1461         * svg/SVGAnimatedNumberList.h:
1462         (SVGAnimatedNumberListAnimator):
1463         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1464         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
1465         * svg/SVGAnimatedNumberOptionalNumber.h:
1466         (SVGAnimatedNumberOptionalNumberAnimator):
1467         * svg/SVGAnimatedPath.cpp:
1468         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1469         * svg/SVGAnimatedPath.h:
1470         (SVGAnimatedPathAnimator):
1471         * svg/SVGAnimatedPointList.cpp:
1472         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
1473         * svg/SVGAnimatedPointList.h:
1474         (SVGAnimatedPointListAnimator):
1475         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1476         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
1477         * svg/SVGAnimatedPreserveAspectRatio.h:
1478         (SVGAnimatedPreserveAspectRatioAnimator):
1479         * svg/SVGAnimatedRect.cpp:
1480         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
1481         * svg/SVGAnimatedRect.h:
1482         (SVGAnimatedRectAnimator):
1483         * svg/SVGAnimatedString.cpp:
1484         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
1485         * svg/SVGAnimatedString.h:
1486         (SVGAnimatedStringAnimator):
1487         * svg/SVGAnimatedTransformList.cpp:
1488         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
1489         * svg/SVGAnimatedTransformList.h:
1490         (SVGAnimatedTransformListAnimator):
1491         * svg/SVGAnimatedTypeAnimator.h:
1492         (SVGAnimatedTypeAnimator):
1493         * svg/SVGAnimationElement.cpp:
1494         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1495         (WebCore::SVGAnimationElement::updateAnimation):
1496         * svg/SVGAnimationElement.h:
1497         (WebCore::SVGAnimationElement::animateAdditiveNumber):
1498         (SVGAnimationElement):
1499
1500 2012-05-01  Beth Dakin  <bdakin@apple.com>
1501
1502         https://bugs.webkit.org/show_bug.cgi?id=85231
1503         Fixed position objects that are removed from the DOM don't kick off 
1504         fixed position recalculation
1505         -and corresponding-
1506         <rdar://problem/11297916>
1507
1508         Reviewed by Darin Adler.
1509
1510         * rendering/RenderBox.cpp:
1511         (WebCore::RenderBox::willBeDestroyed):
1512
1513 2012-05-01  Dana Jansens  <danakj@chromium.org>
1514
1515         Early-out for subtracting a non-intersecting region
1516         https://bugs.webkit.org/show_bug.cgi?id=85258
1517
1518         Reviewed by Hajime Morita.
1519
1520         Given regions A and B, if the bounds of the regions do not intersect,
1521         then the regions themselves do not intersect. If the intersection of
1522         A and B is empty, then A subtract B == A.
1523
1524         * platform/graphics/Region.cpp:
1525         (WebCore::Region::subtract):
1526
1527 2012-04-30  Kent Tamura  <tkent@chromium.org>
1528
1529         [Chromium/Windows] Add LocalizedDateWin
1530         https://bugs.webkit.org/show_bug.cgi?id=84935
1531
1532         Reviewed by Kentaro Hara.
1533
1534         LocalizedDateICU.cpp doesn't reflect system settings. So there were some
1535         problems such as <input type=date> doesn't use system's date format.
1536
1537         We need to use Windows API to get a date format and calendar parameters.
1538
1539         We obtain a date format like "MM/dd/yy" via Windows API, and
1540         format/parse dates for the format by our own code because Windows API
1541         can't handle years older than 1601 and doesn't have date parsing API.
1542
1543         Unit test: Source/WebKit/chromium/tests/LocaleWinTest.cpp
1544
1545         * WebCore.gypi: Add LocalizedDateWin.cpp.
1546         * WebCore.gyp/WebCore.gyp:
1547         For Windows, remove LocalizedDateICU.cpp and add LocalizedDateWin.cpp.
1548         All of *Win.cpp files are excluded by default.
1549
1550         * platform/text/LocaleWin.cpp: Added.
1551         (WebCore::LocaleWin::LocaleWin):
1552         (WebCore::LocaleWin::create):
1553         (WebCore::LocaleWin::currentLocale):
1554         (WebCore::LocaleWin::~LocaleWin):
1555         (WebCore::LocaleWin::getLocaleInfoString):
1556         A helper function to obtain a string by GetLocaleInfo().
1557         (WebCore::LocaleWin::initializeShortMonthLabels):
1558         Obtain short month names from Windows.
1559
1560         (WebCore::DateFormatToken): A struct to represent a token in a date format.
1561         e.g. A format string "MM/dd/yy" generates five DateFormatToken:
1562          Month2, Literal, Day2, Literal, Year2.
1563         (isEraSymbol): A readability helper function.
1564         (isYearSymbol): ditto.
1565         (isMonthSymbol): ditto.
1566         (isDaySymbol): ditto.
1567         (countContinuousLetters):
1568         (commitLiteralToken): A helper for parseDateFormat().
1569         (parseDateFormat):
1570         Parse a format string, and generate a list of DateFormatToken.
1571
1572         (WebCore::parseNumber): A helper for parseDate().
1573         (WebCore::LocaleWin::parseNumberOrMonth): ditto.
1574         (WebCore::LocaleWin::parseDate):
1575         Parse a user-provided date string by matching with a DateFormatToken list.
1576
1577         (WebCore::appendNumber): A helper for formatDate().
1578         (WebCore::appendTwoDigitsNumber): ditto. Write at least two digits.
1579         (WebCore::appendFourDigitsNumber): ditto. Write at least four digits.
1580         (WebCore::LocaleWin::formatDate):
1581         Format a DateComponents by iterating a DateFormatToken list.
1582
1583         (WebCore::LocaleWin::initializeShortDateTokens):
1584         (WebCore::substituteLabelsIntoFormat):
1585         Creates a user-visible format string by iterating a DateFormatToken list.
1586         (WebCore::LocaleWin::dateFormatText):
1587         (WebCore::LocaleWin::initializeMonthLabels):
1588         Creates month names by Windows API.
1589         (WebCore::LocaleWin::initializeWeekDayShortLabels):
1590          Creates day names by Windows API.
1591         (WebCore::LocaleWin::monthLabels):
1592         Public accessor function for month names.
1593         (WebCore::LocaleWin::weekDayShortLabels):
1594         Public accessor function for day names.
1595         * platform/text/LocaleWin.h: Added.
1596
1597         * platform/text/LocalizedDateWin.cpp:
1598         Added. The following functions simply delegate to LocaleWin::currentLocale().
1599         (WebCore::parseLocalizedDate):
1600         (WebCore::formatLocalizedDate):
1601         (WebCore::localizedDateFormatText):
1602         (WebCore::monthLabels):
1603         (WebCore::weekDayShortLabels):
1604         (WebCore::firstDayOfWeek):
1605
1606 2012-04-30  Kent Tamura  <tkent@chromium.org>
1607
1608         REGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
1609         https://bugs.webkit.org/show_bug.cgi?id=85176
1610
1611         Reviewed by Kentaro Hara.
1612
1613         Test: fast/forms/date/input-date-commit-valid-only.html
1614
1615         * platform/text/mac/LocalizedDateMac.mm:
1616         (WebCore::parseLocalizedDate):
1617         We should check nil for the result of NSDateFormtter::dateFromString.
1618
1619 2012-04-30  Mark Rowe  <mrowe@apple.com>
1620
1621         Fix another leak due to misuse of createCFString.
1622
1623         Reviewed by Darin Adler.
1624
1625         * plugins/mac/PluginPackageMac.cpp:
1626         (WebCore::PluginPackage::fetchInfo): Adopt the result of createCFString.
1627
1628 2012-04-30  Mark Rowe  <mrowe@apple.com>
1629
1630         <rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html
1631
1632         Reviewed by Darin Adler.
1633
1634         * platform/mac/ClipboardMac.mm:
1635         (WebCore::utiTypeFromCocoaType): Adopt the result of createCFString.
1636
1637 2012-04-30  Mark Rowe  <mrowe@apple.com>
1638
1639         <rdar://problem/11352575> Many CGImageRefs leaked during media layout tests
1640
1641         Reviewed by Brian Weinstein.
1642
1643         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1644         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Adopt the CGImageRef.
1645
1646 2012-04-30  Emil A Eklund  <eae@chromium.org>
1647
1648         Change RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
1649         https://bugs.webkit.org/show_bug.cgi?id=85249
1650
1651         Reviewed by Eric Seidel.
1652
1653         Prepare RenderBoxModelObject for FractionalLayoutUnits by adding rounding
1654         logic to calculateBackgroundImageGeometry. Background images, as all
1655         images, needs to be layed out on pixel boundaries thus we need to convert
1656         it to a integer value.
1657
1658         No new tests, no change in functionality.
1659
1660         * rendering/RenderBoxModelObject.cpp:
1661         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1662
1663 2012-04-30  Ilya Sherman  <isherman@chromium.org>
1664
1665         Unreviewed, rolling out r113511.
1666         http://trac.webkit.org/changeset/113511
1667         https://bugs.webkit.org/show_bug.cgi?id=66032
1668         https://bugs.webkit.org/show_bug.cgi?id=85150
1669
1670         Regression: Many autofilled form fields lack the default
1671         autofill background even when authors don’t override the
1672         autofill colors
1673
1674         * css/html.css:
1675         (input:-webkit-autofill): Restore !important modifiers
1676
1677 2012-04-30  Julien Chaffraix  <jchaffraix@webkit.org>
1678
1679         Move RenderTableCell's row index to RenderTableRow
1680         https://bugs.webkit.org/show_bug.cgi?id=85229
1681
1682         Reviewed by Ojan Vafai.
1683
1684         Covered by the existing table tests.
1685
1686         Row index is a RenderTableRow concept and as such this change moves
1687         the relevant logic into the class.
1688
1689         While touching the code, renamed row() -> rowIndex() as now RenderTableCell
1690         can return its parent RenderTableRow and we were returning an index, not the row
1691         itself.
1692
1693         * accessibility/AccessibilityTable.cpp:
1694         (WebCore::AccessibilityTable::cellForColumnAndRow):
1695         * accessibility/AccessibilityTableCell.cpp:
1696         (WebCore::AccessibilityTableCell::rowIndexRange):
1697         (WebCore::AccessibilityTableCell::titleUIElement):
1698         * rendering/RenderTable.cpp:
1699         (WebCore::RenderTable::cellAbove):
1700         (WebCore::RenderTable::cellBelow):
1701         (WebCore::RenderTable::cellBefore):
1702         (WebCore::RenderTable::cellAfter):
1703         * rendering/RenderTreeAsText.cpp:
1704         (WebCore::RenderTreeAsText::writeRenderObject):
1705         Updated after the renaming RenderTableCell::row() -> rowIndex().
1706
1707         * rendering/RenderTableCell.cpp:
1708         (WebCore::RenderTableCell::RenderTableCell):
1709         (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
1710         (WebCore::RenderTableCell::computeCollapsedAfterBorder):
1711         Updated after m_rowIndex removal and row() -> rowIndex() renaming.
1712
1713         (WebCore::RenderTableCell::styleDidChange):
1714         Switched the rowWasSet check to an ASSERT. The new logic guarantees that
1715         row index was set straight when we insert the row. The previous logic was
1716         opened to some race conditions as we could wait for a recalcCells call before
1717         setting the index on the rows which made this check necessary.
1718
1719         * rendering/RenderTableCell.h:
1720         (WebCore::RenderTableCell::row):
1721         Added this RenderTableRow getter.
1722
1723         (WebCore::RenderTableCell::rowIndex):
1724         Renamed from row().
1725
1726         * rendering/RenderTableRow.cpp:
1727         (WebCore::RenderTableRow::RenderTableRow):
1728         (WebCore::RenderTableRow::styleDidChange):
1729         Updated after adding m_rowIndex / rowIndex().
1730
1731         * rendering/RenderTableRow.h:
1732         (WebCore::RenderTableRow::setRowIndex):
1733         (WebCore::RenderTableRow::rowIndex):
1734         Added those getter / setter. Also kept m_rowIndex's smaller size
1735         for future optimization and for symmetry with the column index on
1736         RenderTableCell.
1737
1738         * rendering/RenderTableSection.cpp:
1739         (WebCore::RenderTableSection::addChild):
1740         (WebCore::RenderTableSection::recalcCells):
1741         Made sure that whenever we insert or update our row index
1742         we do call setRowIndex().
1743
1744         (WebCore::RenderTableSection::addCell):
1745         This logic now doesn't need to query insertionRow as the cell's
1746         should have the index of the row in which it is inserted.
1747
1748         (WebCore::RenderTableSection::calcRowLogicalHeight):
1749         (WebCore::RenderTableSection::layoutRows):
1750         (WebCore::compareCellPositionsWithOverflowingCells):
1751         More updates after row() -> rowIndex() renaming.
1752
1753         * rendering/RenderTableSection.h:
1754         Removed rowIndexForRenderer now that the row caches this informatin.
1755
1756 2012-04-30  Keishi Hattori  <keishi@webkit.org>
1757
1758         datalist: Inconsistent behavior of HTMLInputElement::list
1759         https://bugs.webkit.org/show_bug.cgi?id=84351
1760
1761         Each platform will have a different set of input types that support the datalist UI.
1762         This patch makes shouldRespectListAttribute ask the RenderTheme if it supports datalist UI for that input type.
1763         Thus making it possible to do feature detection with JS.
1764
1765         Reviewed by Kent Tamura.
1766
1767         * WebCore.gypi: Added RenderThemeChromiumCommon.{cpp,h}
1768         * html/ColorInputType.cpp:
1769         (WebCore::ColorInputType::shouldRespectListAttribute):
1770         (WebCore):
1771         * html/ColorInputType.h:
1772         (ColorInputType):
1773         * html/InputType.cpp:
1774         (WebCore::InputType::themeSupportsDataListUI): Static method used by TextFieldInputType, RangeInputType, and ColorInputType.
1775         (WebCore):
1776         * html/InputType.h:
1777         (InputType):
1778         * html/RangeInputType.cpp:
1779         (WebCore::RangeInputType::shouldRespectListAttribute):
1780         * html/TextFieldInputType.cpp:
1781         (WebCore::TextFieldInputType::shouldRespectListAttribute):
1782         * rendering/RenderTheme.h:
1783         (RenderTheme):
1784         (WebCore::RenderTheme::supportsDataListUI): Returns true if the platform can show the datalist suggestions for a given input type.
1785         * rendering/RenderThemeChromiumCommon.cpp: Added.
1786         (WebCore):
1787         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
1788         * rendering/RenderThemeChromiumCommon.h: Added.
1789         (WebCore):
1790         (RenderThemeChromiumCommon):
1791         * rendering/RenderThemeChromiumMac.h:
1792         (RenderThemeChromiumMac):
1793         * rendering/RenderThemeChromiumMac.mm:
1794         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
1795         (WebCore):
1796         * rendering/RenderThemeChromiumSkia.cpp:
1797         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
1798         (WebCore):
1799         * rendering/RenderThemeChromiumSkia.h:
1800         (RenderThemeChromiumSkia):
1801
1802 2012-04-30  Levi Weintraub  <leviw@chromium.org>
1803
1804         RenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
1805         https://bugs.webkit.org/show_bug.cgi?id=85248
1806
1807         Reviewed by Eric Seidel.
1808
1809         Reverting RenderObject::maximalOutlineSize to int. This is a slop value for repaint
1810         rects that doesn't affect layout. It also derives its value from RenderView's function
1811         of the same name, which is already an integer.
1812
1813         No new tests. No change in behavior.
1814
1815         * rendering/RenderObject.cpp:
1816         (WebCore::RenderObject::maximalOutlineSize):
1817         * rendering/RenderObject.h:
1818         (RenderObject):
1819
1820 2012-04-30  Xingnan Wang  <xingnan.wang@intel.com>
1821
1822         Add multichannel support for input of JavaScriptAudioNode
1823         https://bugs.webkit.org/show_bug.cgi?id=84687
1824
1825         Reviewed by Chris Rogers.
1826
1827         Tests: webaudio/javascriptaudionode-downmix8-2channel-input.html
1828                webaudio/javascriptaudionode-upmix2-8channel-input.html
1829
1830         * Modules/webaudio/JavaScriptAudioNode.cpp:
1831         (WebCore::JavaScriptAudioNode::create):
1832         (WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
1833         (WebCore::JavaScriptAudioNode::initialize):
1834         (WebCore::JavaScriptAudioNode::process):
1835         * Modules/webaudio/JavaScriptAudioNode.h:
1836         (JavaScriptAudioNode):
1837
1838 2012-04-30  Oliver Hunt  <oliver@apple.com>
1839
1840         Harden arithmetic in ImageBufferDataCG
1841         https://bugs.webkit.org/show_bug.cgi?id=61373
1842
1843         Reviewed by Gavin Barraclough.
1844
1845         We have a checked type that allows us to automate many of the
1846         bounds checks we want here, so let's replace the floating point
1847         math, and just use Checked<> throughout.  We use a non-recording
1848         Checked<> as no overflows should reach this point, so we'll take
1849         a hard early failure, over the cost of many branches when
1850         accessing the raw values in loops.
1851
1852         * platform/graphics/cg/ImageBufferDataCG.cpp:
1853         (WebCore::ImageBufferData::getData):
1854         (WebCore::ImageBufferData::putData):
1855
1856 2012-04-30  Levi Weintraub  <leviw@chromium.org>
1857
1858         Add absoluteValue method for LayoutUnits to allow overloading abs()
1859         https://bugs.webkit.org/show_bug.cgi?id=85214
1860
1861         Reviewed by Eric Seidel.
1862
1863         Adding an absoluteValue free inline function that operates on LayoutUnits, which
1864         allows us to have one function signature for ints or FractionalLayoutUnits. We
1865         can't simply add a FractionalLayoutUnit flavor of abs because it confuses
1866         some compilers due to the implicit FractionalLayoutUnit constructors that take
1867         ints and floats.
1868
1869         No new tests. No change in behavior.
1870
1871         * page/SpatialNavigation.cpp:
1872         (WebCore::distanceDataForNode):
1873         * rendering/LayoutTypes.h:
1874         (WebCore::absoluteValue):
1875         (WebCore):
1876         * rendering/RenderBlockLineLayout.cpp:
1877         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
1878         * rendering/RenderLineBoxList.cpp:
1879         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1880         * rendering/RenderObject.cpp:
1881         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1882
1883 2012-04-30  Levi Weintraub  <leviw@chromium.org>
1884
1885         Update LayoutUnit usage in InlineFlowBox and RenderWidget
1886         https://bugs.webkit.org/show_bug.cgi?id=85239
1887
1888         Reviewed by Eric Seidel.
1889
1890         Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching
1891         to FractionalLayoutUnits for layout instead of integers.
1892
1893         No new tests. No change in behavior.
1894
1895         * rendering/InlineFlowBox.cpp:
1896         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always
1897         set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this
1898         behavior affects text decorations, most notably underlines.
1899         * rendering/RenderWidget.cpp:
1900         (WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's
1901         not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox
1902         as an IntRect.
1903
1904 2012-04-30  Levi Weintraub  <leviw@chromium.org>
1905
1906         Prepare RenderDeprecatedFlexibleBox for sub-pixel layout
1907         https://bugs.webkit.org/show_bug.cgi?id=85217
1908
1909         Reviewed by Eric Seidel.
1910
1911         Bailing from the space distribution loop in layoutHorizontal/VerticalBox when
1912         the remaining space falls below one pixel. This has no effect in whole-pixel
1913         layout, but avoids unnecessary work/infinite loops in the sub-pixel case.
1914
1915         No new tests. No change in behavior.
1916
1917         * rendering/RenderDeprecatedFlexibleBox.cpp:
1918         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1919         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1920
1921 2012-04-30  Ryosuke Niwa  <rniwa@webkit.org>
1922
1923         NULL ptr in WebCore::Range::getBorderAndTextQuads
1924         https://bugs.webkit.org/show_bug.cgi?id=77218
1925
1926         Reviewed by Eric Seidel.
1927
1928         The crash was caused by a malformed range obtained within an event handler of mutation events
1929         (DOMNodeRemovedFromDocument). Because this range wasn't updated per node removal, range functions
1930         end up not behaving well.
1931
1932         Fixed the bug by changing the order of the notifications in ContainerNode::willRemoveChild.
1933         We now fire mutation events first before updating ranges so that any range created inside those
1934         event handlers can also be updated prior to the actual node removal.
1935
1936         Test: fast/dom/Range/range-created-in-mutation-event-crash.xhtml
1937
1938         * dom/ContainerNode.cpp:
1939         (WebCore::willRemoveChild):
1940
1941 2012-04-30  Anders Carlsson  <andersca@apple.com>
1942
1943         ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
1944         https://bugs.webkit.org/show_bug.cgi?id=85240
1945         <rdar://problem/11286609>
1946
1947         Reviewed by Sam Weinig.
1948
1949         The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
1950         on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
1951         position updates and remove the call to updateMainFrameScrollPosition.
1952
1953         * page/scrolling/ScrollingCoordinator.cpp:
1954         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1955
1956 2012-04-30  Anders Carlsson  <andersca@apple.com>
1957
1958         Add a way to asynchronously call a function once the scroll position of a page has been updated
1959         https://bugs.webkit.org/show_bug.cgi?id=85237
1960
1961         Reviewed by Sam Weinig.
1962
1963         * WebCore.exp.in:
1964         Export functions needed by WebKit2.
1965
1966         * page/scrolling/ScrollingCoordinator.h:
1967         Make commitTreeStateIfNeeded public.
1968
1969 2012-04-30  Kentaro Hara  <haraken@chromium.org>
1970
1971         WebGLRenderingContext methods should throw TypeError for not enough arguments
1972         https://bugs.webkit.org/show_bug.cgi?id=84787
1973
1974         Reviewed by Kenneth Russell.
1975
1976         Currently, WebGLRenderingcontext methods implement
1977         "Not enough arguments" error as SyntaxError. The Web IDL
1978         spec requires that it should be TypeError:
1979         http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
1980
1981         This patch changes SyntaxError to TypeError.
1982
1983         I wanted to confirm the behavior of Firefox and Opera,
1984         but they do not implement WebGL yet.
1985
1986         Test: fast/canvas/webgl/webgl-exceptions.html
1987
1988         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1989         (WebCore::getObjectParameter):
1990         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
1991         (WebCore::JSWebGLRenderingContext::getExtension):
1992         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
1993         (WebCore::JSWebGLRenderingContext::getParameter):
1994         (WebCore::JSWebGLRenderingContext::getProgramParameter):
1995         (WebCore::JSWebGLRenderingContext::getShaderParameter):
1996         (WebCore::JSWebGLRenderingContext::getUniform):
1997         (WebCore::dataFunctionf):
1998         (WebCore::dataFunctioni):
1999         (WebCore::dataFunctionMatrix):
2000         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2001         (WebCore::getObjectParameter):
2002         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
2003         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
2004         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
2005         (WebCore::V8WebGLRenderingContext::getParameterCallback):
2006         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
2007         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
2008         (WebCore::V8WebGLRenderingContext::getUniformCallback):
2009         (WebCore::vertexAttribAndUniformHelperf):
2010         (WebCore::uniformHelperi):
2011         (WebCore::uniformMatrixHelper):
2012
2013 2012-04-30  Emil A Eklund  <eae@chromium.org>
2014
2015         [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
2016         https://bugs.webkit.org/show_bug.cgi?id=85222
2017
2018         Reviewed by Eric Seidel.
2019
2020         Update platform code to use the pixel snapped values for painting rects
2021         to line up with device pixels and change platform specific hit testing
2022         code to use roundedPoint as hit testing is still mostly done on integer
2023         bounds.
2024
2025         No new tests, no change in functionality.
2026
2027         * platform/qt/RenderThemeQt.cpp:
2028         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
2029         * platform/win/PopupMenuWin.cpp:
2030         (WebCore::PopupMenuWin::paint):
2031         * rendering/RenderThemeChromiumSkia.cpp:
2032         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2033         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2034         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2035
2036 2012-04-30  Kentaro Hara  <haraken@chromium.org>
2037
2038         [V8][JSC] Remove hard-coded "Not enough arguments" errors
2039         https://bugs.webkit.org/show_bug.cgi?id=85207
2040
2041         Reviewed by Sam Weinig.
2042
2043         In bug 85022 and bug 85097, we implemented
2044         createNotEnoughArgumentsError() in JSC and
2045         V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
2046         removed hard-coded "Not enough arguments" errors.
2047         This patch removes hard-coded "Not enough arguments"
2048         errors by using the helper methods.
2049
2050         No tests. No change in behavior.
2051
2052         * bindings/js/JSAudioContextCustom.cpp:
2053         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2054         * bindings/js/JSSVGLengthCustom.cpp:
2055         (WebCore::JSSVGLength::convertToSpecifiedUnits):
2056         * bindings/js/JSWebSocketCustom.cpp:
2057         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
2058         (WebCore::JSWebSocket::send):
2059         * bindings/js/JSXMLHttpRequestCustom.cpp:
2060         (WebCore::JSXMLHttpRequest::open):
2061         * bindings/v8/ScriptController.cpp:
2062         (WebCore::setValueAndClosePopupCallback):
2063         * bindings/v8/custom/V8AudioContextCustom.cpp:
2064         (WebCore::V8AudioContext::constructorCallback):
2065         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2066         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
2067         * bindings/v8/custom/V8WebSocketCustom.cpp:
2068         (WebCore::V8WebSocket::constructorCallback):
2069         (WebCore::V8WebSocket::sendCallback):
2070         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2071         (WebCore::V8XMLHttpRequest::openCallback):
2072
2073 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
2074
2075         Add String::startsWith() and endsWith() for string literals
2076         https://bugs.webkit.org/show_bug.cgi?id=85154
2077
2078         Reviewed by Darin Adler.
2079
2080         Update WebCore to use the simpler startsWith() and endsWith() taking
2081         a UChar.
2082
2083         * css/CSSParser.cpp:
2084         (WebCore::CSSParser::markPropertyEnd):
2085         * css/WebKitCSSKeyframeRule.cpp:
2086         (WebCore::StyleKeyframe::parseKeyString):
2087         * editing/markup.cpp:
2088         (WebCore::createFragmentFromText):
2089         * html/HTMLObjectElement.cpp:
2090         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
2091         * html/HTMLTextFormControlElement.cpp:
2092         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2093         * inspector/ContentSearchUtils.cpp:
2094         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
2095         * inspector/InspectorCSSAgent.cpp:
2096         (WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
2097         * loader/MainResourceLoader.cpp:
2098         (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase):
2099         * loader/appcache/ManifestParser.cpp:
2100         (WebCore::parseManifest):
2101         * platform/blackberry/CookieManager.cpp:
2102         (WebCore::CookieManager::shouldRejectForSecurityReason):
2103         * platform/posix/FileSystemPOSIX.cpp:
2104         (WebCore::pathByAppendingComponent):
2105         * plugins/PluginDatabase.cpp:
2106         (WebCore::PluginDatabase::findPlugin):
2107         * svg/SVGStopElement.cpp:
2108         (WebCore::SVGStopElement::parseAttribute):
2109         * svg/animation/SVGSMILElement.cpp:
2110         (WebCore::SVGSMILElement::parseOffsetValue):
2111         (WebCore::SVGSMILElement::parseCondition):
2112
2113 2012-04-30  Abhishek Arya  <inferno@chromium.org>
2114
2115         Remove positioned float code.
2116         https://bugs.webkit.org/show_bug.cgi?id=84795
2117
2118         Reviewed by Dan Bernstein.
2119
2120         Backout r92004 and some pieces from r91702.
2121
2122         Test: fast/block/float/positioned-float-crash.html
2123
2124         * css/CSSParser.cpp:
2125         (WebCore::isValidKeywordPropertyAndValue):
2126         * css/CSSPrimitiveValueMappings.h:
2127         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2128         (WebCore::CSSPrimitiveValue::operator EFloat):
2129         * css/CSSValueKeywords.in:
2130         * rendering/RenderBlock.cpp:
2131         (WebCore::RenderBlock::RenderBlock):
2132         (WebCore::RenderBlock::layoutBlock):
2133         (WebCore::RenderBlock::addOverflowFromFloats):
2134         (WebCore::RenderBlock::layoutBlockChild):
2135         (WebCore::RenderBlock::simplifiedLayout):
2136         (WebCore::RenderBlock::layoutPositionedObjects):
2137         (WebCore::RenderBlock::insertFloatingObject):
2138         (WebCore::RenderBlock::positionNewFloats):
2139         (WebCore::RenderBlock::clearFloats):
2140         (WebCore::RenderBlock::FloatingObjects::clear):
2141         (WebCore::RenderBlock::FloatingObjects::increaseObjectsCount):
2142         (WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount):
2143         * rendering/RenderBlock.h:
2144         (RenderBlock):
2145         (WebCore::RenderBlock::forceLayoutInlineChildren):
2146         (FloatingObject):
2147         (WebCore::RenderBlock::FloatingObject::FloatingObject):
2148         (WebCore::RenderBlock::hasOverhangingFloats):
2149         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
2150         (FloatingObjects):
2151         * rendering/RenderBox.cpp:
2152         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
2153         * rendering/RenderDeprecatedFlexibleBox.cpp:
2154         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2155         * rendering/RenderDeprecatedFlexibleBox.h:
2156         (RenderDeprecatedFlexibleBox):
2157         * rendering/RenderFlexibleBox.cpp:
2158         (WebCore::RenderFlexibleBox::layoutBlock):
2159         * rendering/RenderFlexibleBox.h:
2160         (RenderFlexibleBox):
2161         * rendering/RenderLayer.cpp:
2162         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2163         * rendering/style/RenderStyleConstants.h:
2164
2165 2012-04-29  Sam Weinig  <sam@webkit.org>
2166
2167         Remove BlobBuilder
2168         https://bugs.webkit.org/show_bug.cgi?id=84036
2169
2170         Reviewed by Anders Carlsson.
2171
2172         * GNUmakefile.am:
2173         * fileapi/WebKitBlobBuilder.idl:
2174         * page/DOMWindow.idl:
2175         * workers/WorkerContext.idl:
2176         Make exposing the WebKitBlobBuilder JS object conditional on a new
2177         ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
2178         but do for everyone else.
2179
2180 2012-04-30  Anders Carlsson  <andersca@apple.com>
2181
2182         Add a barrier-style dispatch member function to ScrollingThread
2183         https://bugs.webkit.org/show_bug.cgi?id=85228
2184
2185         Reviewed by Sam Weinig.
2186
2187         Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread
2188         once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the
2189         scrolling thread and the main thread.
2190
2191         * page/scrolling/ScrollingThread.cpp:
2192         (WebCore::callFunctionOnMainThread):
2193         (WebCore):
2194         (WebCore::ScrollingThread::dispatchBarrier):
2195         * page/scrolling/ScrollingThread.h:
2196         (ScrollingThread):
2197
2198 2012-04-30  Min Qin  <qinmin@google.com>
2199
2200         Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
2201         https://bugs.webkit.org/show_bug.cgi?id=84414
2202
2203         Reviewed by Darin Fisher.
2204
2205         No tests, just exposing the flag, and will be used by android later.
2206         Sorry, there is a merge error during the previous commit, resolved now
2207
2208         * platform/graphics/MediaPlayer.cpp:
2209         (WebCore::MediaPlayer::setControls):
2210         (WebCore):
2211         (WebCore::MediaPlayer::enterFullscreen):
2212         (WebCore::MediaPlayer::exitFullscreen):
2213         * platform/graphics/MediaPlayer.h:
2214         (MediaPlayer):
2215         * platform/graphics/MediaPlayerPrivate.h:
2216         (MediaPlayerPrivateInterface):
2217         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
2218
2219 2012-04-30  Nate Chapin  <japhet@chromium.org>
2220
2221         Move more of committing and starting to write a Document
2222         to DocumentLoader.
2223         https://bugs.webkit.org/show_bug.cgi?id=83908
2224
2225         Reviewed by Adam Barth.
2226
2227         No new tests, refactor only.
2228
2229         * loader/DocumentLoader.cpp:
2230         (WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since
2231             it was always true here anyway.
2232         (WebCore::DocumentLoader::finishedLoading): If we are finishing an empty
2233             document, create the document now, so that FrameLoaderClient doesn't
2234             have to do it later (FrameLoaderClient code will be removed in a later
2235             patch).
2236         (WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and
2237             do some work receivedFirstData() used to do, setEncoding() only once per
2238             load.
2239         (WebCore::DocumentLoader::receivedData):
2240         (WebCore::DocumentLoader::maybeCreateArchive):
2241         * loader/DocumentLoader.h:
2242         * loader/DocumentWriter.cpp:
2243         (WebCore::DocumentWriter::setEncoding):
2244         * loader/FrameLoader.cpp:
2245         (WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls
2246             to DocumentLoader.
2247         * loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(),
2248             allow hasReceivedData() to be called directly.
2249         (FrameLoader):
2250
2251 2012-04-30  Kentaro Hara  <haraken@chromium.org>
2252
2253         Unreviewed. Fix test crashes in Win/Linux debug builds.
2254
2255         * bindings/v8/V8LazyEventListener.cpp:
2256         (WebCore::V8LazyEventListener::V8LazyEventListener):
2257         (WebCore::V8LazyEventListener::prepareListenerObject):
2258         * bindings/v8/V8LazyEventListener.h:
2259         (V8LazyEventListener):
2260
2261 2012-04-30  Tommy Widenflycht  <tommyw@google.com>
2262
2263         MediaStream API: Change LocalMediaStream::stop to be synchronous
2264         https://bugs.webkit.org/show_bug.cgi?id=84942
2265
2266         Reviewed by Dimitri Glazkov.
2267
2268         Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
2269         behaviour needs to change since it is no longer a good idea to start a timer when called.
2270
2271         Not possible to write a test for this.
2272
2273         * Modules/mediastream/LocalMediaStream.cpp:
2274         (WebCore::LocalMediaStream::LocalMediaStream):
2275         (WebCore::LocalMediaStream::stop):
2276         * Modules/mediastream/LocalMediaStream.h:
2277         (LocalMediaStream):
2278
2279 2012-04-28  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
2280
2281         Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
2282         https://bugs.webkit.org/show_bug.cgi?id=85146
2283
2284         Reviewed by Eric Seidel.
2285
2286         Add a new flag for controlling the fixed point denominator in
2287         FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
2288         Until we change the LayoutUnit typedef this change will have no effect.
2289
2290         No new tests, no change in functionality.
2291
2292         * platform/FractionalLayoutUnit.h:
2293         (WebCore):
2294         (WebCore::FractionalLayoutUnit::operator++):
2295         (WebCore::operator/):
2296         (WebCore::operator+):
2297         Add ++, / double and and + double operators. These are needed when
2298         ENABLE_SUBPIXEL_LAYOUT is not enabled.
2299         
2300         * platform/graphics/FractionalLayoutRect.cpp:
2301         (WebCore::enclosingFractionalLayoutRect):
2302
2303 2012-04-30  Justin Schuh  <jschuh@chromium.org>
2304
2305         loadOrRedirectSubframe should return the owner element's frame
2306         https://bugs.webkit.org/show_bug.cgi?id=84780
2307
2308         Reviewed by Nate Chapin.
2309
2310         Test: fast/loader/javascript-url-iframe-remove-on-navigate.html
2311
2312         * loader/SubframeLoader.cpp:
2313         (WebCore::SubframeLoader::loadOrRedirectSubframe):
2314
2315 2012-04-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2316
2317         Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
2318         https://bugs.webkit.org/show_bug.cgi?id=84413
2319
2320         Reviewed by Andreas Kling.
2321
2322         As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not
2323         usually subclass basic types like Vector. This patch changes code to use
2324         Vector<Attribute> directly and move around the functionality of the former
2325         methods to more specific helper functions or inline code at the callers.
2326
2327         * dom/Element.cpp:
2328         (WebCore::Element::parserSetAttributes):
2329         (WebCore::Element::normalizeAttributes):
2330         * dom/Element.h:
2331         (Element):
2332         * dom/ElementAttributeData.cpp:
2333         * dom/ElementAttributeData.h:
2334         (WebCore::findAttributeInVector):
2335         (WebCore::ElementAttributeData::getAttributeItem):
2336         (ElementAttributeData):
2337         (WebCore::ElementAttributeData::attributeVector):
2338         (WebCore::ElementAttributeData::clonedAttributeVector):
2339         (WebCore::ElementAttributeData::getAttributeItemIndex):
2340         (WebCore):
2341         * html/parser/HTMLConstructionSite.cpp:
2342         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2343         * html/parser/HTMLToken.h:
2344         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2345         * html/parser/HTMLTreeBuilder.cpp:
2346         (WebCore::HTMLTreeBuilder::processFakeStartTag):
2347         (WebCore::HTMLTreeBuilder::attributesForIsindexInput): Loop through the attributes
2348         backwards so we can remove items without affecting the rest of the loop run.
2349         * html/parser/HTMLTreeBuilder.h:
2350         * html/parser/TextDocumentParser.cpp:
2351         (WebCore::TextDocumentParser::insertFakePreElement):
2352         * xml/XMLErrors.cpp:
2353         (WebCore::createXHTMLParserErrorHeader):
2354         (WebCore::XMLErrors::insertErrorMessageBlock):
2355         * xml/parser/MarkupTokenBase.h:
2356         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
2357         (WebCore::AtomicMarkupTokenBase::getAttributeItem):
2358         (WebCore::AtomicMarkupTokenBase::attributes):
2359         (AtomicMarkupTokenBase):
2360         (WebCore::::initializeAttributes):
2361         * xml/parser/XMLToken.h:
2362         (WebCore::AtomicXMLToken::AtomicXMLToken):
2363
2364 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
2365
2366         [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly
2367         https://bugs.webkit.org/show_bug.cgi?id=85193
2368
2369         Reviewed by Kentaro Hara.
2370
2371         Part of a refactoring series. See tracking bug 82948.
2372
2373         * platform/audio/chromium/AudioBusChromium.cpp:
2374         (WebCore::AudioBus::loadPlatformResource):
2375         * platform/chromium/PlatformSupport.h:
2376         (PlatformSupport):
2377
2378 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
2379
2380         [Chromium] Call defaultLocale directly
2381         https://bugs.webkit.org/show_bug.cgi?id=85192
2382
2383         Reviewed by Kentaro Hara.
2384
2385         Part of a refactoring series. See tracking bug 82948.
2386
2387         * platform/chromium/LanguageChromium.cpp:
2388         (WebCore::platformLanguage):
2389         * platform/chromium/PlatformSupport.h:
2390         (PlatformSupport):
2391
2392 2012-04-30  Beth Dakin  <bdakin@apple.com>
2393
2394         https://bugs.webkit.org/show_bug.cgi?id=82922
2395         border-image with image-set does not render correctly when viewed at 
2396         2x
2397         -and corresponding-
2398         <rdar://problem/11167820>
2399
2400         Reviewed by Dan Bernstein.
2401
2402         StyleImage::computeIntrinsicDimensions() is only called from one 
2403         place: RenderBoxModelObject::calculateIntrinsicDimensions(), and that 
2404         is only used for background images and border images. In my original 
2405         image-set work, I decided that 
2406         StyleCachedImageSet::computeIntrinsicDimensions() would compute 
2407         "intrinsic" dimensions, meaning that they would compute the dimensions 
2408         that the image resource was pretending to be rather than the actual 
2409         dimensions of the resource. I chose to do this because it made 
2410         background images work great without changing the call-site. But border 
2411         images need to know the actual intrinsic dimensions, so this design 
2412         decision (which was admittedly questionable from the start) won't 
2413         stick.
2414         
2415         This patch makes StyleImage::computeIntrinsicDimensions() return 
2416         actual intrinsic dimensions. Then the border-image and background-
2417         image code is very lightly patched to account for the image's scale 
2418         factor.
2419
2420         These functions no longer need the scale factor parameter.
2421         * loader/cache/CachedImage.cpp:
2422         (WebCore::CachedImage::computeIntrinsicDimensions):
2423         * loader/cache/CachedImage.h:
2424         (CachedImage):
2425         * platform/graphics/GeneratedImage.h:
2426         (GeneratedImage):
2427         * platform/graphics/GeneratorGeneratedImage.cpp:
2428         (WebCore::GeneratedImage::computeIntrinsicDimensions):
2429         * platform/graphics/Image.cpp:
2430         (WebCore::Image::computeIntrinsicDimensions):
2431         * platform/graphics/Image.h:
2432         (Image):
2433         * platform/graphics/cg/PDFDocumentImage.cpp:
2434         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
2435         * platform/graphics/cg/PDFDocumentImage.h:
2436         (PDFDocumentImage):
2437         * svg/graphics/SVGImage.cpp:
2438         (WebCore::SVGImage::computeIntrinsicDimensions):
2439         * svg/graphics/SVGImage.h:
2440         (SVGImage):
2441         * rendering/style/StyleCachedImageSet.cpp:
2442         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
2443         
2444         New function on StyleImage returns the image's scale factor. 
2445         * rendering/style/StyleCachedImageSet.h:
2446         (WebCore::StyleCachedImageSet::imageScaleFactor):
2447         * rendering/style/StyleImage.h:
2448         (WebCore::StyleImage::imageScaleFactor):
2449
2450         Scale the intrinsic size of the background image down by the scale 
2451         factor.
2452         * rendering/RenderBoxModelObject.cpp:
2453         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2454         
2455         Slices should be multiplied by the image's scale factor since they are 
2456         always expected to the specified in the 1x image's coordinate space.
2457         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2458
2459 2012-04-30  Arko Saha  <arko@motorola.com>
2460
2461         Remove custom bindings code in JSHTMLCollectionCustom.cpp for HTMLPropertiesCollection.
2462         https://bugs.webkit.org/show_bug.cgi?id=85172
2463
2464         Reviewed by Kentaro Hara.
2465
2466         Use [JSGenerateToJSObject] in HTMLPropertiesCollection.idl, so that it can generate toJS()
2467         in JSHTMLPropertiesCollection.cpp automatically.
2468
2469         * bindings/js/JSHTMLCollectionCustom.cpp:
2470         (WebCore::toJS):
2471         * html/HTMLPropertiesCollection.idl:
2472
2473 2012-04-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
2474
2475         [Texmap] TextureMapperLayer uses intermediate surfaces too eagerly
2476         https://bugs.webkit.org/show_bug.cgi?id=85103
2477
2478         Reviewed by Kenneth Rohde Christiansen.
2479
2480         Instead of automatically using an intermediate surface for layers with opacity and
2481         children, we limit surface usage for layers with more than one child and for layers with
2482         one child and contents of its own.
2483
2484         This prevents us from using intermediate surfaces in cases where a single layer with
2485         opacity has a single descendant with content, in which case normal blending can be used.
2486
2487         Covered by existing compositing layout tests.
2488
2489         * platform/graphics/texmap/TextureMapperLayer.cpp:
2490         (WebCore):
2491         * platform/graphics/texmap/TextureMapperLayer.h:
2492
2493 2012-04-30  Yi Shen  <yi.4.shen@nokia.com>
2494
2495         Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work
2496         https://bugs.webkit.org/show_bug.cgi?id=78193
2497
2498         Reviewed by Ryosuke Niwa.
2499
2500         When pasting a copied portion of a blockquote with a newline at the end into an unquoted area,
2501         the newline is inserted after the blockquote since we don't want it also to be quoted. However,
2502         this behavior has also applied when we insert a paragraph between quoted lines, which is incorrect.
2503         To figure out the right place to insert a paragraph, we need providing more information to the
2504         InsertParagraphSeparatorCommand by introducing a boolean parameter "pasteBlockqutoeIntoUnquotedArea".
2505
2506         Tests: editing/inserting/insert-paragraph-separator-in-blockquote.html
2507                editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html
2508
2509         * editing/CompositeEditCommand.cpp:
2510         (WebCore::CompositeEditCommand::insertParagraphSeparator):
2511         * editing/CompositeEditCommand.h:
2512         (CompositeEditCommand):
2513         * editing/InsertParagraphSeparatorCommand.cpp:
2514         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
2515         (WebCore::InsertParagraphSeparatorCommand::doApply):
2516         * editing/InsertParagraphSeparatorCommand.h:
2517         (WebCore::InsertParagraphSeparatorCommand::create):
2518         (InsertParagraphSeparatorCommand):
2519         * editing/ReplaceSelectionCommand.cpp:
2520         (WebCore::ReplaceSelectionCommand::doApply):
2521
2522 2012-04-30  Antti Koivisto  <antti@apple.com>
2523
2524         Protect current element in HTMLLinkElement::setCSSStyleSheet
2525         https://bugs.webkit.org/show_bug.cgi?id=85166
2526
2527         Reviewed by Andreas Kling.
2528         
2529         Stylesheet loading can trigger script execution.
2530         
2531         Test: fast/css/cached-sheet-restore-crash.html
2532
2533         * html/HTMLLinkElement.cpp:
2534         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2535
2536 2012-04-29  Keishi Hattori  <keishi@webkit.org>
2537
2538         Build fix for LocalizedDateMac.mm
2539         https://bugs.webkit.org/show_bug.cgi?id=85164
2540
2541         Reviewed by Kent Tamura.
2542
2543         * platform/text/mac/LocalizedDateMac.mm:
2544         (WebCore::monthLabels):
2545
2546 2012-04-29  Luke Macpherson  <macpherson@chromium.org>
2547
2548         Initialize member variables in CSSParser's constructor.
2549         https://bugs.webkit.org/show_bug.cgi?id=84377
2550
2551         Reviewed by Kentaro Hara.
2552
2553         It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing
2554         repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds
2555         initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES
2556         so that the initial state is the same as the state after the properties are cleared.
2557
2558         No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls
2559         startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was
2560         originally detected by coverity.
2561
2562         * css/CSSParser.cpp:
2563         (WebCore::CSSParser::CSSParser):
2564
2565 2012-04-29  Kent Tamura  <tkent@chromium.org>
2566
2567         [Mac] Add LocalizedDateMac
2568         https://bugs.webkit.org/show_bug.cgi?id=85039
2569
2570         Reviewed by Kentaro Hara.
2571
2572         A date shown <input type=date> should be formatted for user's OS
2573         settings. Chromium-Mac used LocalizedDateICU.cpp to format/parse visible
2574         date strings and it didn't reflect user-settings.
2575
2576         Test: covered by fast/forms/date/date-appearance.html
2577
2578         * WebCore.gyp/WebCore.gyp:
2579         Use LocalizedDateMac.mm for OS X instead of LocalizedDateICU.cpp.
2580         * WebCore.gypi: Add LocalizedDateMac.mm
2581         * platform/text/mac/LocalizedDateMac.mm: Added.
2582         (WebCore::createShortDateFormatter):
2583         Creates a NSDateFormatter with desired settings.
2584         (WebCore::parseLocalizedDate): Impelment for tyep=date.
2585         (WebCore::formatLocalizedDate): ditto.
2586         (WebCore::isYearSymbol): A readability helper for format string parsing.
2587         (WebCore::isMonthSymbol): ditto.
2588         (WebCore::isDaySymbol): ditto.
2589         (WebCore::localizeDateFormat):
2590         Parse a format string, and replace symbols with user-friendly labels.
2591         (WebCore::localizedDateFormatText):
2592         Gets a format string, and apply localizeDateFormat().
2593         (WebCore::monthLabels): Obtain month names from the system.
2594         (WebCore::weekDayShortLabels): Obtain week day symbols from the system.
2595         (WebCore::firstDayOfWeek): Obtain first day of week from the system.
2596         * platform/text/ICULocale.cpp:
2597         (WebCore::createFallbackMonthLabels): Uses WTF::monthFullName.
2598
2599 2012-04-29  Sam Weinig  <sam@webkit.org>
2600
2601         Add support for the Blob constructor (Part 2)
2602         https://bugs.webkit.org/show_bug.cgi?id=84555
2603
2604         Address additional feedback on Blob construction.
2605         - Add exception when the dictionary is not an object.
2606         - Ensure the proper ordering of dictionary access. Tested via
2607           throwing exceptions in toString, and ensuring correct one is
2608           fired first.
2609         - Changed type of exception throw for invalid enumeration to a
2610           TypeError.
2611
2612         Reviewed by Kentaro Hara.
2613
2614         Updated fast/files/blob-constructor.html to be more comprehensive.
2615
2616         * bindings/js/JSBlobCustom.cpp:
2617         (WebCore::JSBlobConstructor::constructJSBlob):
2618         * bindings/v8/custom/V8BlobCustom.cpp:
2619         (WebCore::V8Blob::constructorCallback):
2620
2621 2012-04-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
2622
2623         [Texmap] Leaves demo: wrong geometry when opacity animation kicks in
2624         https://bugs.webkit.org/show_bug.cgi?id=85096
2625
2626         Reviewed by Kenneth Rohde Christiansen.
2627
2628         We should use combined() instead of combinedForChildren() since we don't allow
2629         intermediate surfaces for preserves-3d. Also, we should apply the offset before
2630         multiplying the transforms, otherwise the transform-origin is incorrect.
2631
2632         Covered by existing compositing tests.
2633
2634         * platform/graphics/texmap/TextureMapperLayer.cpp:
2635         (WebCore::TextureMapperLayer::paintSelf):
2636         (WebCore::TextureMapperLayer::paintRecursive):
2637
2638 2012-04-29  Mark Pilgrim  <pilgrim@chromium.org>
2639
2640         [Chromium] Call highUsageDeltaMB directly
2641         https://bugs.webkit.org/show_bug.cgi?id=84844
2642
2643         Reviewed by Kentaro Hara.
2644
2645         Part of a refactoring series. See tracking bug 82948.
2646
2647         * bindings/v8/V8GCController.cpp:
2648         (WebCore::V8GCController::checkMemoryUsage):
2649         * platform/MemoryUsageSupport.cpp:
2650         (WebCore):
2651         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2652         * platform/MemoryUsageSupport.h:
2653         (MemoryUsageSupport):
2654         * platform/chromium/MemoryUsageSupportChromium.cpp:
2655         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2656         (WebCore):
2657         * platform/chromium/PlatformSupport.h:
2658         (PlatformSupport):
2659
2660 2012-04-29  Kentaro Hara  <haraken@chromium.org>
2661
2662         REGRESSION(r113086): onresize event handler can be deleted in popup window
2663         https://bugs.webkit.org/show_bug.cgi?id=84908
2664
2665         Reviewed by Ojan Vafai.
2666
2667         In a nutshell, an onresize event handler in the popup window
2668         can be non-deterministically deleted. For more details, please
2669         look at Chromium issue 123642:
2670         http://code.google.com/p/chromium/issues/detail?id=123642
2671
2672         I confirmed that this bug is the regression caused by r113086.
2673
2674         r113086 introduced the following code:
2675
2676         void V8LazyEventListener::prepareListenerObject(...) {
2677             if (hasExistingListenerObject())
2678                 return;
2679             ...;
2680             // Since we only parse once, there's no need to keep data
2681             // used for parsing around anymore.
2682             m_functionName = String();
2683             m_code = String();
2684             m_eventParameterName = String();
2685             m_sourceURL = String();
2686
2687             setListenerObject(wrappedFunction);
2688         }
2689
2690         This is not correct. The parsing can be done more than once,
2691         and thus we cannot clear data. This patch removes the above code.
2692
2693         Consider the following situation:
2694
2695         (1) Assume '<body onresize="f()"></body>'.
2696         (2) prepareListenerObject() runs.
2697         (3) Since this is the first parsing, hasExistingListenerObject()
2698         returns false. After the parsing, the listener object is set
2699         by setListenerObject().
2700         (4) GC runs. Since there is no strong reference to the listener
2701         object, weakEventListenerCallback() is called back, and the listener
2702         object is disposed.
2703         (5) A resize event is triggered.
2704         (6) prepareListenerObject() is called again. Since the listener object
2705         is already disposed, hasExistingListenerObject() returns false,
2706         and the second parsing starts.
2707
2708         In my investigation, the above situation is happening in the reported
2709         Chromium bug. Anyway, I am sure that potentially the parsing can be
2710         done more than once, and thus we must keep m_xxxx data.
2711
2712         However, this is just a temporary fix. We should fix the code so that
2713         an alive event listener object is never reclaimed.
2714         See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details.
2715
2716         No tests: I tried hard to create a DRT test, but could not.
2717         The bug depends on the behavior of GC, and thus the reported bug is
2718         non-deterministic. For example, (as explained in the Chromium issue,)
2719         the bug does not happen if we load an HTML from network because
2720         the network latency hides the bug. Also the bug happens in the
2721         popup window only. If we open the reported HTML in the main window,
2722         we cannot reproduce the bug.
2723
2724         * bindings/v8/V8LazyEventListener.cpp:
2725         (WebCore::V8LazyEventListener::prepareListenerObject):
2726
2727 2012-04-28  Sam Weinig  <sam@webkit.org>
2728
2729         Smooth scrolling needs a new key
2730         <rdar://problem/11331632>
2731
2732         Reviewed by Geoffrey Garen.
2733
2734         * platform/mac/ScrollAnimatorMac.mm:
2735         (WebCore::scrollAnimationEnabledForSystem):
2736         (WebCore::ScrollAnimatorMac::scroll):
2737         Update for new key.
2738
2739 2012-04-28  Li Yin  <li.yin@intel.com>
2740
2741         MessagePort must set m_closed to be true at the end of MessagePort::close function
2742         https://bugs.webkit.org/show_bug.cgi?id=85139
2743
2744         In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning.
2745         Or, the m_entangledChannel->close() will not be executed.
2746         And it resulted in the failure of MS bench mark messagechannel_close.htm.
2747         http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm
2748
2749         Reviewed by Kentaro Hara.
2750
2751         Test: fast/events/message-port-close.html
2752
2753         * dom/MessagePort.cpp:
2754         (WebCore::MessagePort::close):
2755
2756 2012-04-28  Sam Weinig  <sam@webkit.org>
2757
2758         And again.
2759
2760         * bindings/v8/custom/V8BlobCustom.cpp:
2761         (WebCore::V8Blob::constructorCallback):
2762
2763 2012-04-28  Sam Weinig  <sam@webkit.org>
2764
2765         Once again, try to make these puppies work.
2766
2767         * bindings/v8/custom/V8BlobCustom.cpp:
2768
2769 2012-04-28  Sam Weinig  <sam@webkit.org>
2770
2771         Fix the Chromium build.
2772
2773         * bindings/v8/custom/V8BlobCustom.cpp:
2774         (WebCore::V8Blob::constructorCallback):
2775
2776 2012-04-27  Sam Weinig  <sam@webkit.org>
2777
2778         Add support for the Blob constructor
2779         https://bugs.webkit.org/show_bug.cgi?id=84555
2780
2781         Reviewed by Maciej Stachowiak.
2782
2783         Test: fast/files/blob-constructor.html
2784
2785         This adds an implementation of the Blob constructor that willfully
2786         violates the W3C Editor’s Draft 29 February 2012 in the following ways:
2787         - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 
2788         - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
2789         - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 
2790
2791         * bindings/js/JSBlobCustom.cpp:
2792         (WebCore::JSBlobConstructor::constructJSBlob):
2793         Implement blob constructor.
2794
2795         * bindings/v8/custom/V8BlobCustom.cpp:
2796         (WebCore::V8Blob::constructorCallback):
2797         Implement blob constructor.
2798
2799         * fileapi/Blob.idl:
2800         Add constructor to IDL.
2801
2802         * workers/WorkerContext.idl:
2803         Add Blob constructor to the worker global object.
2804
2805 2012-04-28  Igor Oliveira  <igor.o@sisa.samsung.com>
2806
2807         Move PropertyWrapper out of the  AnimationBase
2808         https://bugs.webkit.org/show_bug.cgi?id=84978
2809
2810         Reviewed by Dean Jackson.
2811
2812         AnimationBase is a complex class. It has a state machine and a bunch of
2813         property handlers. This patch moves the property handlers to a separate
2814         class making AnimationBase simpler.
2815
2816         * CMakeLists.txt:
2817         * GNUmakefile.list.am:
2818         * Target.pri:
2819         * WebCore.gypi:
2820         * WebCore.vcproj/WebCore.vcproj:
2821         * WebCore.xcodeproj/project.pbxproj:
2822         * page/animation/AnimationBase.cpp:
2823         * page/animation/AnimationBase.h:
2824         (AnimationBase):
2825         * page/animation/AnimationController.cpp:
2826         (WebCore::AnimationController::supportsAcceleratedAnimationOfProperty):
2827         * page/animation/CSSPropertyAnimation.cpp: Added.
2828         (WebCore):
2829         (WebCore::blendFunc):
2830         (WebCore::crossfadeBlend):
2831         (AnimationPropertyWrapperBase):
2832         (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
2833         (WebCore::AnimationPropertyWrapperBase::~AnimationPropertyWrapperBase):
2834         (WebCore::AnimationPropertyWrapperBase::isShorthandWrapper):
2835         (WebCore::AnimationPropertyWrapperBase::property):
2836         (WebCore::AnimationPropertyWrapperBase::animationIsAccelerated):
2837         (WebCore::addPropertyWrapper):
2838         (WebCore::wrapperForProperty):
2839         (PropertyWrapperGetter):
2840         (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
2841         (WebCore::PropertyWrapperGetter::equals):
2842         (PropertyWrapper):
2843         (WebCore::PropertyWrapper::PropertyWrapper):
2844         (WebCore::PropertyWrapper::blend):
2845         (RefCountedPropertyWrapper):
2846         (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
2847         (WebCore::RefCountedPropertyWrapper::blend):
2848         (StyleImagePropertyWrapper):
2849         (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
2850         (WebCore::StyleImagePropertyWrapper::equals):
2851         (PropertyWrapperColor):
2852         (WebCore::PropertyWrapperColor::PropertyWrapperColor):
2853         (WebCore::PropertyWrapperColor::blend):
2854         (PropertyWrapperAcceleratedOpacity):
2855         (WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity):
2856         (WebCore::PropertyWrapperAcceleratedOpacity::animationIsAccelerated):
2857         (WebCore::PropertyWrapperAcceleratedOpacity::blend):
2858         (PropertyWrapperAcceleratedTransform):
2859         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2860         (WebCore::PropertyWrapperAcceleratedTransform::animationIsAccelerated):
2861         (WebCore::PropertyWrapperAcceleratedTransform::blend):
2862         (PropertyWrapperAcceleratedFilter):
2863         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
2864         (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated):
2865         (WebCore::PropertyWrapperAcceleratedFilter::blend):
2866         (WebCore::shadowListLength):
2867         (WebCore::shadowForBlending):
2868         (PropertyWrapperShadow):
2869         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
2870         (WebCore::PropertyWrapperShadow::equals):
2871         (WebCore::PropertyWrapperShadow::blend):
2872         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
2873         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
2874         (PropertyWrapperMaybeInvalidColor):
2875         (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
2876         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
2877         (WebCore::PropertyWrapperMaybeInvalidColor::blend):
2878         (PropertyWrapperVisitedAffectedColor):
2879         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
2880         (WebCore::PropertyWrapperVisitedAffectedColor::equals):
2881         (WebCore::PropertyWrapperVisitedAffectedColor::blend):
2882         (FillLayerAnimationPropertyWrapperBase):
2883         (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase):
2884         (WebCore::FillLayerAnimationPropertyWrapperBase::~FillLayerAnimationPropertyWrapperBase):
2885         (FillLayerPropertyWrapperGetter):
2886         (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
2887         (WebCore::FillLayerPropertyWrapperGetter::equals):
2888         (FillLayerPropertyWrapper):
2889         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
2890         (WebCore::FillLayerPropertyWrapper::blend):
2891         (FillLayerRefCountedPropertyWrapper):
2892         (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
2893         (WebCore::FillLayerRefCountedPropertyWrapper::blend):
2894         (FillLayerStyleImagePropertyWrapper):
2895         (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
2896         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
2897         (FillLayersPropertyWrapper):
2898         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
2899         (WebCore::FillLayersPropertyWrapper::equals):
2900         (WebCore::FillLayersPropertyWrapper::blend):
2901         (ShorthandPropertyWrapper):
2902         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
2903         (WebCore::ShorthandPropertyWrapper::isShorthandWrapper):
2904         (WebCore::ShorthandPropertyWrapper::equals):
2905         (WebCore::ShorthandPropertyWrapper::blend):
2906         (WebCore::ShorthandPropertyWrapper::propertyWrappers):
2907         (PropertyWrapperFlex):
2908         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
2909         (WebCore::PropertyWrapperFlex::equals):
2910         (WebCore::PropertyWrapperFlex::blend):
2911         (PropertyWrapperSVGPaint):
2912         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
2913         (WebCore::PropertyWrapperSVGPaint::equals):
2914         (WebCore::PropertyWrapperSVGPaint::blend):
2915         (WebCore::addShorthandProperties):
2916         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
2917         (WebCore::gatherEnclosingShorthandProperties):
2918         (WebCore::CSSPropertyAnimation::blendProperties):
2919         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
2920         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
2921         (WebCore::CSSPropertyAnimation::propertiesEqual):
2922         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
2923         (WebCore::CSSPropertyAnimation::getNumProperties):
2924         * page/animation/CSSPropertyAnimation.h: Added.
2925         (WebCore):
2926         (CSSPropertyAnimation):
2927         * page/animation/CompositeAnimation.cpp:
2928         (WebCore::CompositeAnimation::updateTransitions):
2929         (WebCore::CompositeAnimation::pauseTransitionAtTime):
2930         * page/animation/ImplicitAnimation.cpp:
2931         (WebCore::ImplicitAnimation::animate):
2932         (WebCore::ImplicitAnimation::getAnimatedStyle):
2933         (WebCore::ImplicitAnimation::isTargetPropertyEqual):
2934         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
2935         (WebCore::ImplicitAnimation::timeToNextService):
2936         * page/animation/KeyframeAnimation.cpp:
2937         (WebCore::KeyframeAnimation::animate):
2938         (WebCore::KeyframeAnimation::getAnimatedStyle):
2939         (WebCore::KeyframeAnimation::timeToNextService):
2940         * rendering/style/RenderStyle.h:
2941
2942 2012-04-28  Geoffrey Garen  <ggaren@apple.com>
2943
2944         Clarified JSGlobalData (JavaScript VM) lifetime
2945         https://bugs.webkit.org/show_bug.cgi?id=85142
2946
2947         Reviewed by Anders Carlsson.
2948
2949         * bindings/js/WorkerScriptController.cpp:
2950         (WebCore::WorkerScriptController::~WorkerScriptController): Slightly 
2951         simpler than before. We can't just rely on our default destructor 
2952         because we need to hold the JSLock when we tear down the VM.
2953
2954         * bridge/NP_jsobject.cpp:
2955         (_NPN_InvokeDefault):
2956         (_NPN_Invoke):
2957         (_NPN_Evaluate):
2958         (_NPN_Construct): Don't RefPtr<> the JSGlobalData because it makes it 
2959         seem like you know something the rest of our code doesn't know. The 
2960         plugin JSGlobalData is immortal, anyway.
2961
2962         I also removed some timeout checker related code because that feature 
2963         doesn't work anymore, so it was effectively dead code.
2964
2965 2012-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
2966
2967         Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots.
2968         https://bugs.webkit.org/show_bug.cgi?id=85137
2969
2970         We can save a file with help of InspectorFrontendHost.save method,
2971         but it is suitable only for relatively small portions of data and
2972         can't process the 6Gb heap snapshot.
2973         These methods just pass the url and content into embedder.
2974
2975         Reviewed by Yury Semikhatsky.
2976
2977         * inspector/InspectorFrontendClient.h:
2978         (InspectorFrontendClient):
2979         * inspector/InspectorFrontendClientLocal.h:
2980         (WebCore::InspectorFrontendClientLocal::append):
2981         * inspector/InspectorFrontendHost.cpp:
2982         (WebCore::InspectorFrontendHost::append):
2983         (WebCore):
2984         * inspector/InspectorFrontendHost.h:
2985         (InspectorFrontendHost):
2986         * inspector/InspectorFrontendHost.idl:
2987
2988 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
2989
2990         [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
2991         https://bugs.webkit.org/show_bug.cgi?id=84321
2992
2993         Speculative build-fix for Qt 4.8.
2994         Use QGLContext for Qt 4.x instead of the platform-specific context.
2995
2996         Reviewed by Simon Hausmann.
2997
2998         No new tests, build fix.
2999
3000         * platform/graphics/texmap/TextureMapperGL.cpp:
3001         (SharedGLData):
3002         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
3003
3004 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
3005
3006         [Texmap] Falling leaves demo missing opacity fade out animation
3007         https://bugs.webkit.org/show_bug.cgi?id=83691
3008
3009         Reviewed by Martin Robinson.
3010
3011         The bug originated from clearing an intermediate surface with glClear while the scissor
3012         state was wrong.
3013         When using intermediate surfaces, maintain a clip-stack for each surface, rather than
3014         a single clip-stack for the whole scene. When a surface is bound, its clip stack should
3015         be applied.
3016
3017         Covered by existing compositing tests.
3018
3019         * platform/graphics/texmap/TextureMapperGL.cpp:
3020         (SharedGLData):
3021         (WebCore::TextureMapperGL::ClipStack::push):
3022         (WebCore):
3023         (WebCore::TextureMapperGL::ClipStack::pop):
3024         (WebCore::scissorClip):
3025         (WebCore::TextureMapperGL::ClipStack::apply):
3026         (WebCore::TextureMapperGL::clipStack):
3027         (WebCore::TextureMapperGL::beginPainting):
3028         (WebCore::TextureMapperGL::drawTexture):
3029         (WebCore::BitmapTextureGL::didReset):
3030         (WebCore::BitmapTextureGL::clearIfNeeded):
3031         (WebCore::BitmapTextureGL::createFboIfNeeded):
3032         (WebCore::BitmapTextureGL::bind):
3033         (WebCore::TextureMapperGL::bindDefaultSurface):
3034         (WebCore::TextureMapperGL::bindSurface):
3035         (WebCore::TextureMapperGL::beginScissorClip):
3036         (WebCore::TextureMapperGL::beginClip):
3037         (WebCore::TextureMapperGL::endClip):
3038         * platform/graphics/texmap/TextureMapperGL.h:
3039         (TextureMapperGL):
3040         (ClipState):
3041         (WebCore::TextureMapperGL::ClipState::ClipState):
3042         (ClipStack):
3043         (WebCore::TextureMapperGL::ClipStack::current):
3044         (WebCore::TextureMapperGL::ClipStack::clear):
3045         (BitmapTextureGL):
3046         (WebCore::BitmapTextureGL::BitmapTextureGL):
3047
3048 2012-04-26  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
3049
3050         Move Length and CSS length computation to float
3051         https://bugs.webkit.org/show_bug.cgi?id=84801
3052
3053         Reviewed by Eric Seidel.
3054
3055         Change Length and CSS length computation to floating point. This gets us
3056         closer to the goal of supporting subpixel layout and improves precision
3057         for SVG which already uses floating point for its layout.
3058
3059         This change makes computedStyle return fractional values for pixel values
3060         if a fraction is specified. It also changes the result of computations
3061         where two or more values with fractional precision. Prior to this change
3062         the result of Length(2.9) + Length(2.9) would be 4 as each value would be
3063         floored. With this change the result is 5 as the addition is done with
3064         floating point precision and then the result will be floored. Once we
3065         enable subpixel layout the resulting value in this example would be 5.8.
3066
3067         Updated existing layout tests.
3068
3069         * css/CSSComputedStyleDeclaration.cpp:
3070         (WebCore::zoomAdjustedPixelValue):
3071         * css/CSSPrimitiveValue.cpp:
3072         (WebCore::CSSPrimitiveValue::computeLength):
3073         * css/CSSPrimitiveValue.h:
3074         (WebCore):
3075         (WebCore::roundForImpreciseConversion):
3076         Add specialized float version of roundForImpreciseConversion that matches
3077         the int versions rounding logic.
3078         
3079         If a value is sufficiently close to the next integer round it up to
3080         ensure that a style rule such as "width: 4.999px" evaluates to 5px
3081         instead of 4px. This is needed as, although Lengths are using floating
3082         point, the layout system still uses integer precision and floors the
3083         Length values.
3084         This will change once we move to FractionalLayoutUnits but for now this
3085         is needed to ensure compatibility with the existing system and tests.
3086         
3087         Without this specialized rounding logic we fail a handful of tests
3088         including acid3.
3089         
3090         * platform/Length.h:
3091         (WebCore::Length::value):
3092         (Length):
3093         (WebCore::Length::intValue):
3094         * rendering/RenderTableCell.cpp:
3095         (WebCore::RenderTableCell::styleOrColLogicalWidth):
3096
3097 2012-04-28  Alexander Pavlov  <apavlov@chromium.org>
3098
3099         Web Inspector: Enable touch events feature fails touch feature detection
3100         https://bugs.webkit.org/show_bug.cgi?id=84397
3101
3102         Whenever the touch emulation is enabled, Inspector adds a script to evaluate on load,
3103         that adds ontouch(start|end|move|cancel) properties to window.__proto__ and document.__proto__.
3104
3105         Reviewed by Pavel Feldman.
3106
3107         * inspector/front-end/DOMAgent.js:
3108         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
3109         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.scriptAddedCallback):
3110         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged):
3111         * inspector/front-end/inspector.js:
3112
3113 2012-04-28  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3114
3115         Web Inspector: Shortcuts screen UI polish
3116         https://bugs.webkit.org/show_bug.cgi?id=84708
3117
3118           1) remove inconsistent shadow;
3119           2) reduce border radius;
3120           3) vertically center the “X” button;
3121           4) replace unreadable symbolic shortcuts with text;
3122           5) gaps / colors / opacity adjustments;
3123           6) section-to-column distribution algorithm is replaced with a fair one.
3124
3125         Reviewed by Pavel Feldman.
3126
3127         This is a UI polising patch, so no new tests added.
3128
3129         * English.lproj/localizedStrings.js: added keyboars arrow keys items
3130         * inspector/front-end/KeyboardShortcut.js: replace unreadable symbolic shortcuts with text
3131         * inspector/front-end/ShortcutsScreen.js:
3132         (WebInspector.ShortcutsScreen):
3133         (WebInspector.ShortcutsScreen.prototype.show): remove redundant parameter
3134         (WebInspector.ShortcutsScreen.prototype._buildTable): change section distributing algorithm
3135         (WebInspector.ShortcutsSection.prototype.renderSection): render colon with margins
3136         (WebInspector.ShortcutsSection.prototype._renderHeader): apply classname to th elements
3137         * inspector/front-end/helpScreen.css:
3138         (.help-window-main): reduce radius, remove shadow; tune color and opacity
3139         (.help-window-caption): fix spacing; add ruler
3140         (.help-window-title): fix spacing; remove ruler
3141         (.help-content): fix spacing
3142         (.help-close-button): fix spacing; adjust background color
3143         (.help-column-table): fix spacing
3144         (.help-table > tr > th): fix color
3145         (.help-key): fix color
3146         (.help-combine-keys, .help-key-delimiter): extract common style
3147         (.help-combine-keys): remove dupe
3148         (.help-section-title): add space between sections
3149
3150 2012-04-28  Noel Gordon  <noel.gordon@gmail.com>
3151
3152         Remove PlatformTouchPointQt.cpp PlatformTouchEventQt.cpp from the gyp projects
3153         https://bugs.webkit.org/show_bug.cgi?id=85132
3154
3155         Unreviewed VS2010 gyp project generation fix.
3156
3157         PlatformTouchPointQt.cpp and PlatformTouchEventQt.cpp were removed in r115312,
3158         so remove them from the gyp projects.
3159
3160         * WebCore.gypi:
3161
3162 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3163
3164         <animateTransform type="scale"> should use '0' as effective from value not '1', if no base value is specified and from is not given
3165         https://bugs.webkit.org/show_bug.cgi?id=85133
3166
3167         It should start from scale=0. I had that fixed before, but it got lost during merging. Restore the fix.
3168         See bug 85051, for more context why this is correct.
3169
3170         Tests: svg/animations/animateTransform-by-scale-1-expected.svg
3171                svg/animations/animateTransform-by-scale-1.svg
3172
3173         * svg/SVGAnimatedTransformList.cpp:
3174         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
3175
3176 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3177
3178         SVGAnimateColorElement doesn't support by/to animations properly
3179         https://bugs.webkit.org/show_bug.cgi?id=36704
3180
3181         Reviewed by Antti Koivisto.
3182
3183         Switch AnimatedColorAnimator to use the standard animateAdditiveNumber() method, taking progress & repeatCount into account.
3184         This gives us accumulation/repeatCount support for free.
3185
3186         We just animate the four color components on their own now and clamp once at the end after addition/accumulation finished.
3187         Import <animateColor> tests from Dr. Olaf Hoffmanns SVG Animation test suite, which all pass now.
3188
3189         While I was at it, remove the includeSMILProperties boolean from computeCSSPropertyValue - we always use the computed style
3190         without SMIL effects included, whenever we want to retrieve the "base value", or handle "inherit/currentColor".
3191
3192         Tests: svg/animations/animateColor-additive-2a-expected.svg
3193                svg/animations/animateColor-additive-2a.svg
3194                svg/animations/animateColor-additive-2b-expected.svg
3195                svg/animations/animateColor-additive-2b.svg
3196                svg/animations/animateColor-additive-2c-expected.svg
3197                svg/animations/animateColor-additive-2c.svg
3198                svg/animations/animateColor-additive-2d-expected.svg
3199                svg/animations/animateColor-additive-2d.svg
3200
3201         * svg/ColorDistance.cpp:
3202         (WebCore::ColorDistance::clampColor):
3203         (WebCore::ColorDistance::addColors):
3204         (WebCore::ColorDistance::addToColor):
3205         * svg/ColorDistance.h:
3206         (ColorDistance):
3207         * svg/SVGAnimateElement.cpp:
3208         (WebCore::SVGAnimateElement::resetToBaseValue):
3209         * svg/SVGAnimatedColor.cpp:
3210         (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
3211         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
3212         * svg/SVGAnimationElement.cpp:
3213         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
3214         (WebCore::SVGAnimationElement::adjustForInheritance):
3215         * svg/SVGAnimationElement.h:
3216         (SVGAnimationElement):
3217
3218 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3219
3220         Not reviewed. Fix Qt build -- I was too quick.
3221
3222         * rendering/svg/SVGPathData.cpp: Add back Path.h include.
3223
3224 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3225
3226         Rename SVGPathParserFactory to SVGPathUtilities and remove the obsolete singleton
3227         https://bugs.webkit.org/show_bug.cgi?id=85129
3228
3229         SVGPathParserFactory implements the singleton pattern, but stores no members.
3230         Remove the singleton and move all functions to free-functions into SVGPathUtilities.h.
3231
3232         Makes the code easier to read - doesn't affect any tests.
3233
3234         * CMakeLists.txt:
3235         * GNUmakefile.list.am:
3236         * Target.pri:
3237         * WebCore.gypi:
3238         * WebCore.vcproj/WebCore.vcproj:
3239         * WebCore.xcodeproj/project.pbxproj:
3240         * rendering/svg/SVGPathData.cpp:
3241         (WebCore::updatePathFromPathElement):
3242         * rendering/svg/SVGRenderTreeAsText.cpp:
3243         (WebCore::operator<<):
3244         * svg/SVGAllInOne.cpp:
3245         * svg/SVGAnimateMotionElement.cpp:
3246         (WebCore::SVGAnimateMotionElement::parseAttribute):
3247         * svg/SVGAnimatedPath.cpp:
3248         (WebCore::SVGAnimatedPathAnimator::constructFromString):
3249         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
3250         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
3251         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
3252         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
3253         * svg/SVGAnimatedType.cpp:
3254         * svg/SVGGlyphElement.cpp:
3255         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
3256         * svg/SVGPathBlender.cpp: Fix typo s/;;/;/
3257         * svg/SVGPathElement.cpp:
3258         (WebCore::SVGPathElement::getTotalLength):
3259         (WebCore::SVGPathElement::getPointAtLength):
3260         (WebCore::SVGPathElement::getPathSegAtLength):
3261         (WebCore::SVGPathElement::parseAttribute):
3262         (WebCore::SVGPathElement::svgAttributeChanged):
3263         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
3264         (WebCore::SVGPathElement::pathSegListChanged):
3265         * svg/SVGPathParserFactory.h: Removed.
3266         * svg/SVGPathSegList.cpp:
3267         (WebCore::SVGPathSegList::valueAsString):
3268         * svg/SVGPathUtilities.cpp: Renamed from Source/WebCore/svg/SVGPathParserFactory.cpp.
3269         (WebCore):
3270         (WebCore::globalSVGPathBuilder):
3271         (WebCore::globalSVGPathSegListBuilder):
3272         (WebCore::globalSVGPathByteStreamBuilder):
3273         (WebCore::globalSVGPathStringBuilder):
3274         (WebCore::globalSVGPathTraversalStateBuilder):
3275         (WebCore::globalSVGPathParser):
3276         (WebCore::globalSVGPathBlender):
3277         (WebCore::buildPathFromString):
3278         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
3279         (WebCore::buildPathFromByteStream):
3280         (WebCore::buildSVGPathSegListFromByteStream):
3281         (WebCore::buildStringFromByteStream):
3282         (WebCore::buildStringFromSVGPathSegList):
3283         (WebCore::buildSVGPathByteStreamFromString):
3284         (WebCore::buildAnimatedSVGPathByteStream):
3285         (WebCore::addToSVGPathByteStream):
3286         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
3287         (WebCore::getTotalLengthOfSVGPathByteStream):
3288         (WebCore::getPointAtLengthOfSVGPathByteStream):
3289         * svg/SVGPathUtilities.h: Added.
3290         (WebCore):
3291         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
3292         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
3293
3294 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3295
3296         Fix repetitions & by animation support for path animations
3297         https://bugs.webkit.org/show_bug.cgi?id=85071
3298
3299         Rubber-stamped by Antti Koivisto.
3300
3301         Cleanup SVGPathBlender, to make it more readable.
3302
3303         * svg/SVGPathBlender.cpp:
3304         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
3305         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
3306         (WebCore::SVGPathBlender::blendArcToSegment):
3307         (WebCore::SVGPathBlender::blendAnimatedPath):
3308
3309 2012-04-28  Yury Semikhatsky  <yurys@chromium.org>
3310
3311         Unreviewed. Qt build fix: added new exported symbols.
3312
3313         * WebCore.exp.in:
3314
3315 2012-04-28  Yury Semikhatsky  <yurys@chromium.org>
3316
3317         Unreviewed. Fix Qt minimal build after r115553.
3318
3319         * inspector/InspectorConsoleAgent.h:
3320
3321 2012-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
3322
3323         Fix repetitions & by animation support for path animations
3324         https://bugs.webkit.org/show_bug.cgi?id=85071
3325
3326         Reviewed by Antti Koivisto.
3327
3328         Implement additive="sum" / by-animation support for path animations, eg.
3329         <path d="M 10 10 L 10 100 Z">
3330             <animate attributeName="d" begin="0s" dur="4s" by="M 0 0 L 90 0 Z"/>
3331         <path>
3332
3333         animates the d attribute to "M 10 10 L 100 100 0 Z".
3334
3335         Now only <animateColor> and <animateMotion> are left to be fixed, all other types are working as expected now in all additive/accumulate/from-by/by/from-to animations.
3336
3337         Tests: svg/animations/path-animation-expected.svg
3338                svg/animations/repeating-path-animation-expected.svg
3339                svg/animations/repeating-path-animation.svg
3340
3341         * svg/SVGAnimatedPath.cpp:
3342         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): Implemented, to support by-animations, instead of falling back to to-animations.
3343         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): Handle repetitions, accumulation & addition.
3344         * svg/SVGPathBlender.cpp: Allow empty from source everywhere, use default values if no from value is specified, needed for by-animations.
3345         (WebCore::SVGPathBlender::SVGPathBlender):
3346         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
3347         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
3348         (WebCore::SVGPathBlender::blendMoveToSegment):
3349         (WebCore::SVGPathBlender::blendLineToSegment):
3350         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
3351         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
3352         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
3353         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
3354         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
3355         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
3356         (WebCore::SVGPathBlender::blendArcToSegment):
3357         (WebCore::SVGPathBlender::addAnimatedPath):
3358         (WebCore::SVGPathBlender::blendAnimatedPath):
3359         * svg/SVGPathBlender.h: Add new addAnimatedPath function.
3360         (SVGPathBlender):
3361         * svg/SVGPathByteStream.h:
3362         (SVGPathByteStream): Make SVGPathByteStreams copyable, needed for SVGAnimatedPathAnimator.
3363         (WebCore::SVGPathByteStream::size): Returns size of the SVGPathByteStream.
3364         * svg/SVGPathParserFactory.cpp:
3365         (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): Allow empty from streams, needed for by animations. 
3366         (WebCore::SVGPathParserFactory::addToSVGPathByteStream): Add 'byStream' 'repeatCount' times to 'toStream'. Both streams must match in size.
3367         * svg/SVGPathParserFactory.h: Add new addToSVGPathByteStream function.
3368         * svg/SVGPointList.cpp: Remove dead code.
3369         * svg/SVGPointList.h: Ditto.
3370         (SVGPointList):
3371
3372 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3373
3374         SVGAnimateMotion does not handle accumulation
3375         https://bugs.webkit.org/show_bug.cgi?id=18564
3376
3377         Reviewed by Antti Koivisto.
3378
3379         Implement accumulation for <animateMotion>. Add lots of new
3380         reftests, verifying additive/accumulate behavior is correct.
3381
3382         Tests: svg/animations/animateMotion-additive-1-expected.svg
3383                svg/animations/animateMotion-additive-1.svg
3384                svg/animations/animateMotion-additive-2a-expected.svg
3385                svg/animations/animateMotion-additive-2a.svg
3386                svg/animations/animateMotion-additive-2b-expected.svg
3387                svg/animations/animateMotion-additive-2b.svg
3388                svg/animations/animateMotion-additive-2c-expected.svg
3389                svg/animations/animateMotion-additive-2c.svg
3390                svg/animations/animateMotion-additive-2d-expected.svg
3391                svg/animations/animateMotion-additive-2d.svg
3392                svg/animations/mozilla/animateMotion-by-1-expected.svg
3393                svg/animations/mozilla/animateMotion-by-1.svg
3394                svg/animations/mozilla/animateMotion-from-to-1-expected.svg
3395                svg/animations/mozilla/animateMotion-from-to-1.svg
3396                svg/animations/mozilla/animateMotion-indefinite-to-1-expected.svg
3397                svg/animations/mozilla/animateMotion-indefinite-to-1.svg
3398                svg/animations/mozilla/animateMotion-indefinite-to-2-expected.svg
3399                svg/animations/mozilla/animateMotion-indefinite-to-2.svg
3400                svg/animations/mozilla/animateMotion-mpath-pathLength-1-expected.svg
3401                svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg
3402                svg/animations/mozilla/animateMotion-mpath-targetChange-1-expected.svg
3403                svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg
3404                svg/animations/mozilla/animateMotion-to-overridden-1-expected.svg
3405                svg/animations/mozilla/animateMotion-to-overridden-1.svg
3406
3407         * svg/SVGAnimateMotionElement.cpp:
3408         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
3409         (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
3410         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
3411         * svg/SVGAnimateMotionElement.h:
3412
3413 2012-04-27  Yury Semikhatsky  <yurys@chromium.org>
3414
3415         ScriptStateProtectedPtr should not keep a strong reference to the context
3416         https://bugs.webkit.org/show_bug.cgi?id=85009
3417
3418         Delete console message arguments when DOMWindow where the messages were created
3419         is reset on its frame.
3420
3421         Reviewed by Pavel Feldman.
3422
3423         Test: http/tests/inspector-enabled/console-clear-arguments-on-frame-navigation.html
3424
3425         * inspector/ConsoleMessage.cpp:
3426         (WebCore::ConsoleMessage::addToFrontend):
3427         (WebCore::ConsoleMessage::windowCleared):
3428         (WebCore::ConsoleMessage::argumentCount):
3429         (WebCore):
3430         * inspector/ConsoleMessage.h:
3431         (ConsoleMessage):
3432         * inspector/InspectorConsoleAgent.cpp:
3433         (WebCore::InspectorConsoleAgent::consoleMessageArgumentCounts):
3434         (WebCore):
3435         * inspector/InspectorConsoleAgent.h:
3436         (InspectorConsoleAgent):
3437         * page/Frame.cpp:
3438         (WebCore::Frame::clearDOMWindow):
3439         (WebCore::Frame::setDOMWindow):
3440         * testing/Internals.cpp:
3441         (WebCore):
3442         (WebCore::Internals::consoleMessageArgumentCounts):
3443         * testing/Internals.h:
3444         (Internals):
3445         * testing/Internals.idl:
3446
3447 2012-04-27  Jochen Eisinger  <jochen@chromium.org>
3448
3449         Ensure that there's always a provisional document loader if the frame loader is in provisional state
3450         https://bugs.webkit.org/show_bug.cgi?id=83894
3451
3452         Reviewed by Nate Chapin.
3453
3454         We're still seeing crashes in the FrameLoader where the FrameLoader's
3455         state is "provisional" but there is no provisional document loader. I
3456         added code to update the FrameLoader's state everytime the provisional
3457         document loader is cleared, and added checks that the FrameLoader's
3458         state can't be set to provisional without a provisional loader.
3459