Fix inconsistent text selection behavior with option-shift-left/right/up/down.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-19  Pablo Flouret  <pablof@motorola.com>
2
3         Fix inconsistent text selection behavior with option-shift-left/right/up/down.
4         https://bugs.webkit.org/show_bug.cgi?id=75652
5
6         Reviewed by Enrica Casucci.
7
8         On Mac, selecting backwards by word, line or paragraph from the middle
9         of some text, and then going forward leaves the caret back in the middle
10         with no selection, instead of directly selecting to the other end of the
11         word/line/paragraph (Unix/Windows behavior). Fix this by adding a new
12         editing behavior to control whether the selection should go across the
13         initial position of the caret directly or not in situations like the one
14         outlined above.
15
16         Test: editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
17
18         * editing/EditingBehavior.h:
19         (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
20         * editing/FrameSelection.cpp:
21         (WebCore::FrameSelection::modify):
22
23 2012-01-19  Simon Fraser  <simon.fraser@apple.com>
24
25         Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
26         https://bugs.webkit.org/show_bug.cgi?id=75682
27
28         Reviewed by James Robinson.
29         
30         RenderLayerBacking::isSimpleContainerCompositingLayer() gave incorret
31         results in the case where the layer itself was visibility:hidden, but
32         where it had visible, non-composited descendant layers.
33         
34         Fix by breaking RenderLayerBacking::hasVisibleNonCompositingDescendants()
35         into two methods, one that tests for renderers in this layer which
36         render stuff (and are thus affected by visibility on this layer), and
37         another which walks descendant, non-composited layers looking for those
38         which are visible.
39         
40         Removed an early return in the "renderObject->node()->isDocumentNode()"
41         clause, because we want to run the same code that we run for non-document
42         nodes.
43
44         Test: compositing/visibility/layer-visible-content.html
45
46         * rendering/RenderLayerBacking.cpp:
47         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
48         (WebCore::RenderLayerBacking::containsNonEmptyRenderers):
49         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
50         * rendering/RenderLayerBacking.h:
51
52 2012-01-19  Alexandre Elias  <aelias@google.com>
53
54         [chromium] Draw gutter quads outside root content layer
55         https://bugs.webkit.org/show_bug.cgi?id=76328
56
57         Reviewed by James Robinson.
58
59         Add new layer property "backgroundCoversViewport".  If the content
60         layers don't fully cover the render surface, this code calculates the
61         difference between the root clip rect and the root content layer and
62         draws up to four background-color quads in exactly the area that would
63         be undrawn.
64
65         Test: CCTiledLayerImplTest::backgroundCoversViewport
66
67         * platform/graphics/chromium/LayerChromium.cpp:
68         (WebCore::LayerChromium::LayerChromium):
69         (WebCore::LayerChromium::setBackgroundCoversViewport):
70         (WebCore::LayerChromium::pushPropertiesTo):
71         * platform/graphics/chromium/LayerChromium.h:
72         (WebCore::LayerChromium::backgroundCoversViewport):
73         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
74         (WebCore::CCLayerImpl::CCLayerImpl):
75         (WebCore::CCLayerImpl::setBackgroundCoversViewport):
76         * platform/graphics/chromium/cc/CCLayerImpl.h:
77         (WebCore::CCLayerImpl::backgroundCoversViewport):
78         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
79         (WebCore::CCTiledLayerImpl::appendQuads):
80
81 2012-01-19  Cary Clark  <caryclark@google.com>
82
83         [Skia Mac] Match style of platform error underline for misspellings
84         https://bugs.webkit.org/show_bug.cgi?id=76556
85
86         Reviewed by Stephen White.
87
88         Add Darwin-specific code in Skia to draw the error underline so that
89         it matches the CoreGraphics style.
90
91         Many existing layout tests inadvertantly trigger the misspelling
92         underline by including the word 'foo' in an editable field. Those
93         tests are temporarily suppressed separately in an edit to
94         test_expectations.txt.
95
96         * platform/graphics/skia/GraphicsContextSkia.cpp:
97         (WebCore::GraphicsContext::drawLineForTextChecking):
98
99 2012-01-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
100
101         [Texmap] TextureMapper creates two many big intermediate surfaces
102         https://bugs.webkit.org/show_bug.cgi?id=76336
103
104         Reviewed by Simon Hausmann.
105
106         The following has been done to optimize surface allocation:
107         1. Instead of using a viewport-size surface, use a surface in the size of the layer's
108            bounding rect and apply the transform after the content has been rendered into it.
109         2. Avoid generating intermediate surface for occasions where they're not necessary,
110            such as nested reflections without opacity.
111         3. Releasing of textures from the pool is now implicit, based on refCount.
112         4. Do not use intermediate surfaces for preserve-3d layers. This is in alignment with
113            other ports.
114
115         Tests in LayoutTests/compositing/masks and LayoutTests/compositing/reflection cover this.
116
117         * platform/graphics/texmap/TextureMapper.cpp:
118         (WebCore::TextureMapper::acquireTextureFromPool):
119         * platform/graphics/texmap/TextureMapper.h:
120         * platform/graphics/texmap/TextureMapperNode.cpp:
121         (WebCore::TextureMapperNode::paintSelf):
122         (WebCore::TextureMapperNode::paintSelfAndChildren):
123         (WebCore::TextureMapperNode::intermediateSurfaceRect):
124         (WebCore::TextureMapperNode::shouldPaintToIntermediateSurface):
125         (WebCore::TextureMapperNode::isVisible):
126         (WebCore::TextureMapperNode::paintSelfAndChildrenWithReplica):
127         (WebCore::TextureMapperNode::paintRecursive):
128         (WebCore::TextureMapperNode::syncCompositingStateSelf):
129         (WebCore::TextureMapperNode::syncCompositingState):
130         * platform/graphics/texmap/TextureMapperNode.h:
131         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
132
133 2012-01-19  Eric Seidel  <eric@webkit.org>
134
135         Assertion failure in WebCore::HTMLFrameElementBase::insertedIntoDocument()
136         https://bugs.webkit.org/show_bug.cgi?id=50312
137
138         Reviewed by Alexey Proskuryakov.
139
140         Removed the ASSERT and updated the comment.
141
142         Test: fast/frames/assert-on-insertedIntoDocument.html
143
144         * html/HTMLFrameElementBase.cpp:
145         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
146
147 2012-01-19  James Robinson  <jamesr@chromium.org>
148
149         [chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting
150         https://bugs.webkit.org/show_bug.cgi?id=76663
151
152         Reviewed by Kenneth Russell.
153
154         CCLayerDelegate used to be an interface with a half-dozen callbacks on it, but now it has only one call -
155         paintContents() - and that one call is only valid for one subclass of LayerChromium, ContentLayerChromium. This
156         removes the CCLayerDelegate pointer from LayerChromium and adds a ContentLayerDelegate for the paint call.
157
158         The majority of the code changes in this patch are removing the nil parameter from various places that construct
159         LayerChromium instances. Also tightens the type of GraphicsLayerChromium::m_layer to ContentLayerChromium.
160
161         Refactoring/removing dead code, so no new tests.
162
163         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
164         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
165         * platform/graphics/chromium/CanvasLayerChromium.cpp:
166         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
167         * platform/graphics/chromium/CanvasLayerChromium.h:
168         * platform/graphics/chromium/ContentLayerChromium.cpp:
169         (WebCore::ContentLayerPainter::create):
170         (WebCore::ContentLayerPainter::ContentLayerPainter):
171         (WebCore::ContentLayerChromium::create):
172         (WebCore::ContentLayerChromium::ContentLayerChromium):
173         * platform/graphics/chromium/ContentLayerChromium.h:
174         (WebCore::ContentLayerDelegate::~ContentLayerDelegate):
175         (WebCore::ContentLayerChromium::clearDelegate):
176         * platform/graphics/chromium/DrawingBufferChromium.cpp:
177         (WebCore::DrawingBuffer::platformLayer):
178         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
179         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
180         (WebCore::GraphicsLayerChromium::setContentsToImage):
181         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
182         (WebCore::GraphicsLayerChromium::setContentsToMedia):
183         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
184         * platform/graphics/chromium/GraphicsLayerChromium.h:
185         * platform/graphics/chromium/ImageLayerChromium.cpp:
186         (WebCore::ImageLayerChromium::create):
187         (WebCore::ImageLayerChromium::ImageLayerChromium):
188         * platform/graphics/chromium/ImageLayerChromium.h:
189         * platform/graphics/chromium/LayerChromium.cpp:
190         (WebCore::LayerChromium::create):
191         (WebCore::LayerChromium::LayerChromium):
192         * platform/graphics/chromium/LayerChromium.h:
193         * platform/graphics/chromium/PluginLayerChromium.cpp:
194         (WebCore::PluginLayerChromium::create):
195         (WebCore::PluginLayerChromium::PluginLayerChromium):
196         * platform/graphics/chromium/PluginLayerChromium.h:
197         * platform/graphics/chromium/TiledLayerChromium.cpp:
198         (WebCore::TiledLayerChromium::TiledLayerChromium):
199         (WebCore::TiledLayerChromium::drawsContent):
200         * platform/graphics/chromium/TiledLayerChromium.h:
201         * platform/graphics/chromium/VideoLayerChromium.cpp:
202         (WebCore::VideoLayerChromium::create):
203         (WebCore::VideoLayerChromium::VideoLayerChromium):
204         * platform/graphics/chromium/VideoLayerChromium.h:
205         * platform/graphics/chromium/WebGLLayerChromium.cpp:
206         (WebCore::WebGLLayerChromium::create):
207         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
208         * platform/graphics/chromium/WebGLLayerChromium.h:
209
210 2012-01-19  Greg Billock  <gbillock@google.com>
211
212         [Coverity] Fix uninitialized constructor defects in .../html
213         https://bugs.webkit.org/show_bug.cgi?id=74965
214
215         Reviewed by Simon Fraser.
216
217         Test: fast/canvas/script-tests/canvas-webkitLineDash.js
218
219         * html/HTMLFormCollection.cpp:
220         (WebCore::HTMLFormCollection::HTMLFormCollection):
221         * html/StepRange.cpp:
222         (WebCore::StepRange::StepRange):
223         * html/canvas/CanvasRenderingContext2D.cpp:
224         (WebCore::CanvasRenderingContext2D::State::State):
225         * html/canvas/CanvasStyle.h:
226         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
227         * html/canvas/WebGLGetInfo.cpp:
228         (WebCore::WebGLGetInfo::WebGLGetInfo):
229         * html/parser/CSSPreloadScanner.cpp:
230         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
231         * html/track/WebVTTParser.cpp:
232         (WebCore::WebVTTParser::WebVTTParser):
233
234 2012-01-19  Alexandru Chiculita  <achicu@adobe.com>
235
236         CSS Shaders: Remove the setTimeout from the layout tests
237         https://bugs.webkit.org/show_bug.cgi?id=76535
238
239         Reviewed by Tony Chang.
240
241         We had setTimeout on old tests because the snapshot picture was taken too early, before the shaders were loaded.
242         The problem was that the RenderLayer was notified that the shader was loaded only after the onload event was triggered,
243         so a simple setTimeout(0) would have fixed the issue, but better than that would be to to always call CachedResource::data 
244         in CachedShader::data, which notifies the load earlier (before onload).
245
246         No new tests, just removed the setTimeout from old ones.
247
248         * loader/cache/CachedShader.cpp:
249         (WebCore::CachedShader::data):
250
251 2012-01-19  Min Qin  <qinmin@google.com>
252
253         Improve touch handling performance by reusing the hitTest result
254         https://bugs.webkit.org/show_bug.cgi?id=75506
255
256         Reviewed by Adam Barth.
257
258         This is a performance optimization and should not cause behavior changes. Existing tests should cover it.
259
260         * page/EventHandler.cpp:
261         (WebCore::EventHandler::handleTouchEvent):
262
263 2012-01-19  Jon Lee  <jonlee@apple.com>
264
265         Add text-overflow support that allows placeholder and value text to show an ellipsis when not focused
266         https://bugs.webkit.org/show_bug.cgi?id=76118
267         <rdar://problem/9271742>
268
269         Reviewed by Dan Bernstein.
270
271         Tests: fast/css/text-overflow-input-focus-placeholder-expected.html
272                fast/css/text-overflow-input-focus-placeholder.html
273                fast/css/text-overflow-input-focus-value-expected.html
274                fast/css/text-overflow-input-focus-value.html
275                fast/css/text-overflow-input.html
276
277         * rendering/RenderTextControlSingleLine.cpp:
278         (WebCore::RenderTextControlSingleLine::styleDidChange): When the style of the text control
279         changes, we update the text overflow property of the placeholder.
280         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): When the style of the text control
281         changes, we update the text overflow property of the inner text block.
282         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): The text of the value and placeholder should
283         only contain the ellipsis if the input's text-overflow property is set to ellipsis, and the input is not focused.
284         * rendering/RenderTextControlSingleLine.h:
285
286 2012-01-19  Mark Hahnenberg  <mhahnenberg@apple.com>
287
288         Implement a new allocator for backing stores
289         https://bugs.webkit.org/show_bug.cgi?id=75181
290
291         Reviewed by Filip Pizlo.
292
293         No new tests.
294
295         Added forwarding header for new CheckedBoolean used in the bump allocator.
296
297         * ForwardingHeaders/wtf/CheckedBoolean.h: Added.
298
299 2012-01-13  Ryosuke Niwa  <rniwa@webkit.org>
300
301         Crash in CompositeEditCommand::ensureComposition
302         https://bugs.webkit.org/show_bug.cgi?id=76207
303
304         Reviewed by Chang Shu.
305
306         The crash was caused by TypingCommand not kept alive when new editing commands are executed
307         during adding more typings to the open last typing command since m_lastEditCommand is replaced
308         by the new command. Fixed the bug by keeping them alive a little longer with RefPtr.
309
310         Test: editing/execCommand/editing-command-while-executing-typing-command-crash.html
311
312         * editing/FrameSelection.cpp:
313         (WebCore::shouldStopBlinkingDueToTypingCommand):
314         (WebCore::FrameSelection::updateAppearance):
315         * editing/TypingCommand.cpp:
316         (WebCore::TypingCommand::deleteSelection):
317         (WebCore::TypingCommand::deleteKeyPressed):
318         (WebCore::TypingCommand::forwardDeleteKeyPressed):
319         (WebCore::TypingCommand::insertText):
320         (WebCore::TypingCommand::insertLineBreak):
321         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
322         (WebCore::TypingCommand::insertParagraphSeparator):
323         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
324         (WebCore::TypingCommand::closeTyping):
325         * editing/TypingCommand.h:
326
327 2012-01-19  Andreas Kling  <awesomekling@apple.com>
328
329         Unreviewed debug build fix.
330
331         Remove ASSERT that the cached match is cacheable (we don't store that flag anymore.)
332
333         * css/CSSStyleSelector.cpp:
334         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
335
336 2012-01-19  Robert Hogan  <robert@webkit.org>
337
338         Fix Debug build after r105433
339
340         Unreviewed, build fix.
341
342         * rendering/RenderTable.cpp:
343         (WebCore::RenderTable::recalcCollapsedBorders):
344
345 2012-01-19  Andreas Kling  <awesomekling@apple.com>
346
347         CSSStyleSelector: Factor 'isCacheable' flag out of MatchedResult.
348         <http://webkit.org/b/76376>
349
350         Reviewed by Antti Koivisto.
351
352         Break up the MatchResult struct into MatchResult and MatchRanges. The matched
353         declaration cache only needs the ranges, so we save 4 bytes per entry.
354
355         * css/CSSStyleSelector.cpp:
356         (WebCore::CSSStyleSelector::matchAllRules):
357         (WebCore::CSSStyleSelector::matchUARules):
358         (WebCore::CSSStyleSelector::pseudoStyleForElement):
359         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
360         (WebCore::operator==):
361         (WebCore::operator!=):
362         (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
363         (WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
364         (WebCore::CSSStyleSelector::applyMatchedDeclarations):
365         * css/CSSStyleSelector.h:
366         (WebCore::CSSStyleSelector::MatchRanges::MatchRanges):
367         (WebCore::CSSStyleSelector::MatchResult::MatchResult):
368
369 2012-01-19  Eric Carlson  <eric.carlson@apple.com>
370
371         https://bugs.webkit.org/show_bug.cgi?id=75192
372
373         Reviewed by Darin Adler.
374
375         Notify the media element when tracks are added to and removed from a document instead of
376         a tree because we don't want to trigger loading unless a track element is in the document.
377
378         Test: media/track/track-delete-during-setup.html
379
380         * html/HTMLMediaElement.cpp:
381         (WebCore::HTMLMediaElement::trackWasRemoved): Renamed from trackWillBeRemoved because it is
382             now called after removal.
383         * html/HTMLMediaElement.h:
384
385         * html/HTMLTrackElement.cpp:
386         (WebCore::HTMLTrackElement::insertedIntoDocument): Was insertedIntoTree. Use this instead
387             because we care about when a track is inserted and removed from a document, not a tree.
388         (WebCore::HTMLTrackElement::removedFromDocument): Ditto.
389         * html/HTMLTrackElement.h:
390
391 2012-01-18  Robert Hogan  <robert@webkit.org>
392
393         Hit ASSERTION FAILED: table()->collapseBorders() on techcrunch.com
394         https://bugs.webkit.org/show_bug.cgi?id=76405
395
396         Reviewed by Julien Chaffraix.
397
398         Tests: fast/css/nested-table-with-collapsed-borders.html
399
400         Change recalcCollapsedBorders() so that it only collects border values for the current
401         table. Calculating the borders for nested tables was wrong as well as wasting cycles, though it would never
402         have impacted rendering since a cell only paints the borders that match its own.
403
404         * rendering/RenderTable.cpp:
405         (WebCore::RenderTable::recalcCollapsedBorders):
406
407 2012-01-18  Jer Noble  <jer.noble@apple.com>
408
409         Make WebAudio API const-correct.
410         https://bugs.webkit.org/show_bug.cgi?id=76573
411
412         Reviewed by Daniel Bates.
413
414         No new tests; no net change in functionality, so covered by existing tests.
415
416         The non-const data() accessor was renamed mutableData() to expose const-correctness
417         bugs during compile time:
418         * platform/audio/AudioChannel.h:
419         (WebCore::AudioChannel::mutableData):
420
421         The following functions were made const correct:
422         * platform/audio/AudioArray.h:
423         (WebCore::AudioArray::copyToRange):
424         * platform/audio/AudioBus.h:
425         (WebCore::AudioBus::createBufferFromRange):
426         (WebCore::AudioBus::createBySampleRateConverting):
427         (WebCore::AudioBus::createByMixingToMono):
428         * platform/audio/FFTConvolver.cpp:
429         (WebCore::FFTConvolver::process):
430         * platform/audio/FFTConvolver.h:
431         * platform/audio/FFTFrame.cpp:
432         (WebCore::FFTFrame::doPaddedFFT):
433         (WebCore::FFTFrame::doFFT):
434         * platform/audio/FFTFrame.h:
435         * platform/audio/ReverbConvolverStage.cpp:
436         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
437         (WebCore::ReverbConvolverStage::process):
438         * platform/audio/ReverbConvolverStage.h:
439         * platform/audio/ReverbInputBuffer.cpp:
440         (WebCore::ReverbInputBuffer::write):
441         * platform/audio/ReverbInputBuffer.h:
442         * platform/audio/SincResampler.cpp:
443         (WebCore::SincResampler::process):
444         * platform/audio/SincResampler.h:
445         * platform/audio/ZeroPole.cpp:
446         (WebCore::ZeroPole::process):
447         * platform/audio/ZeroPole.h:
448         * platform/audio/AudioBus.cpp:
449         (WebCore::AudioBus::channelByType):
450         * platform/audio/AudioBus.h:
451         (WebCore::AudioBus::gain):
452         * platform/audio/AudioDSPKernelProcessor.cpp:
453         (WebCore::AudioDSPKernelProcessor::process):
454         * platform/audio/AudioDSPKernelProcessor.h:
455         * platform/audio/AudioProcessor.h:
456         * platform/audio/DynamicsCompressor.cpp:
457         (WebCore::DynamicsCompressor::process):
458         * platform/audio/DynamicsCompressor.h:
459         * platform/audio/DynamicsCompressorKernel.cpp:
460         (WebCore::DynamicsCompressorKernel::process):
461         * platform/audio/DynamicsCompressorKernel.h:
462         * platform/audio/EqualPowerPanner.cpp:
463         (WebCore::EqualPowerPanner::pan):
464         * platform/audio/EqualPowerPanner.h:
465         * platform/audio/HRTFElevation.h:
466         (WebCore::HRTFElevation::numberOfAzimuths):
467         * platform/audio/HRTFPanner.cpp:
468         (WebCore::HRTFPanner::pan):
469         * platform/audio/HRTFPanner.h:
470         * platform/audio/Panner.h:
471         * platform/audio/Reverb.cpp:
472         (WebCore::Reverb::process):
473         * platform/audio/Reverb.h:
474         * platform/audio/ReverbConvolver.cpp:
475         (WebCore::ReverbConvolver::process):
476         * platform/audio/ReverbConvolver.h:
477         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
478         (WebCore::FFTFrame::doFFT):
479         * platform/audio/mkl/FFTFrameMKL.cpp:
480         (WebCore::FFTFrame::doFFT):
481
482         The following functions were modified to use the renamed mutableData() accessor:
483         * platform/audio/AudioBus.cpp:
484         (WebCore::AudioBus::processWithGainFromMonoStereo):
485         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
486         * platform/audio/AudioChannel.cpp:
487         (WebCore::AudioChannel::scale):
488         (WebCore::AudioChannel::copyFrom):
489         (WebCore::AudioChannel::copyFromRange):
490         (WebCore::AudioChannel::sumFrom):
491         * platform/audio/AudioDSPKernelProcessor.cpp:
492         (WebCore::AudioDSPKernelProcessor::process):
493         * platform/audio/AudioResampler.cpp:
494         (WebCore::AudioResampler::process):
495         * platform/audio/DynamicsCompressor.cpp:
496         (WebCore::DynamicsCompressor::process):
497         * platform/audio/EqualPowerPanner.cpp:
498         (WebCore::EqualPowerPanner::pan):
499         * platform/audio/HRTFKernel.cpp:
500         (WebCore::extractAverageGroupDelay):
501         (WebCore::HRTFKernel::HRTFKernel):
502         (WebCore::HRTFKernel::createImpulseResponse):
503         * platform/audio/HRTFPanner.cpp:
504         (WebCore::HRTFPanner::pan):
505         * platform/audio/MultiChannelResampler.cpp:
506         (WebCore::MultiChannelResampler::process):
507         * platform/audio/Reverb.cpp:
508         (WebCore::Reverb::process):
509         * platform/audio/ReverbConvolver.cpp:
510         (WebCore::ReverbConvolver::ReverbConvolver):
511         (WebCore::ReverbConvolver::process):
512         * platform/audio/mac/AudioFileReaderMac.cpp:
513         (WebCore::AudioFileReader::createBus):
514         * platform/audio/mac/FFTFrameMac.cpp:
515         (WebCore::FFTFrame::doFFT):
516         * webaudio/AudioBufferSourceNode.cpp:
517         (WebCore::AudioBufferSourceNode::process):
518         (WebCore::AudioBufferSourceNode::renderFromBuffer):
519         * webaudio/BiquadProcessor.cpp:
520         (WebCore::BiquadProcessor::process):
521         * webaudio/JavaScriptAudioNode.cpp:
522         (WebCore::JavaScriptAudioNode::process):
523         * webaudio/OfflineAudioDestinationNode.cpp:
524         (WebCore::OfflineAudioDestinationNode::render):
525         * webaudio/RealtimeAnalyser.cpp:
526         (WebCore::RealtimeAnalyser::writeInput):
527         * webaudio/WaveShaperProcessor.cpp:
528         (WebCore::WaveShaperProcessor::process):
529
530 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
531
532         Unreviewed, inspector closure compilation fix.
533
534         * inspector/front-end/ScriptsPanel.js:
535         * inspector/front-end/TabbedEditorContainer.js:
536
537 2012-01-19  David Hyatt  <hyatt@apple.com>
538
539         https://bugs.webkit.org/show_bug.cgi?id=76644
540
541         Before landing support for centering, fix the keyword value to match the latest draft.
542         The new keyword is "contain" instead of "bounds."
543
544         Revised the existing parsing tests to reflect the updated value.
545
546         Reviewed by Dan Bernstein.
547
548         * css/CSSParser.cpp:
549         (WebCore::CSSParser::parseValue):
550         * css/CSSPrimitiveValueMappings.h:
551         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
552         (WebCore::CSSPrimitiveValue::operator LineGridSnap):
553         * css/CSSValueKeywords.in:
554         * rendering/style/RenderStyleConstants.h:
555
556 2012-01-19  Joi Sigurdsson  <joi@chromium.org>
557
558         Enable use of precompiled headers in Chromium port on Windows.
559
560         Bug 76381 - Use precompiled headers in Chromium port on Windows
561         https://bugs.webkit.org/show_bug.cgi?id=76381
562
563         Reviewed by Tony Chang.
564
565         No new tests needed; if the change builds and existing tests pass
566         that should provide enough coverage.
567
568         * WebCore.gyp/WebCore.gyp: Include WinPrecompile.gypi.
569
570 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
571
572         Web Inspector: Switching tabs in TabbedEditorContainer should reveal selected script in navigator.
573         https://bugs.webkit.org/show_bug.cgi?id=76636
574
575         Reviewed by Pavel Feldman.
576
577         Renamed FileSelector's ScriptSelected event into FileSelected, added EditorSelected
578         event to EditorContainer.
579         Renamed _showSourceFrame into _showFile.
580         Made _uiSourceCodeRemoved reuse _removeSourceFrame.
581
582         * inspector/front-end/ScriptsNavigator.js:
583         (WebInspector.ScriptsNavigator.prototype.scriptSelected):
584         * inspector/front-end/ScriptsPanel.js:
585         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
586         (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector):
587         (WebInspector.ScriptsPanel.prototype._editorSelected):
588         (WebInspector.ScriptsPanel.prototype._fileSelected):
589         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
590         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
591         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
592         * inspector/front-end/TabbedEditorContainer.js:
593         (WebInspector.TabbedEditorContainer):
594         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
595
596 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
597
598         [CSSRegions]Add support for background-color in region styling
599         https://bugs.webkit.org/show_bug.cgi?id=71488
600
601         Reviewed by David Hyatt.
602
603         This patch enables region styling again. The region styling tests were also added back. 
604         With the improvements from https://bugs.webkit.org/show_bug.cgi?id=76265, hopefully we will not see the same 3% regressions
605         in performance.
606
607         * rendering/RenderObject.h:
608         (WebCore::RenderObject::style):
609
610 2012-01-16  Jer Noble  <jer.noble@apple.com>
611
612         Crash at WebCore::MediaControlRootElement::makeOpaque + 97
613         https://bugs.webkit.org/show_bug.cgi?id=76391
614
615         Reviewed by John Sullivan.
616
617         No new tests; Speculative fix for crash.
618
619         Crash report data suggests this crash is occurring as the document is being
620         closed.  Check the nullity of document()->page() before deref-ing.
621
622         * html/shadow/MediaControlElements.cpp:
623         (WebCore::MediaControlPanelElement::makeOpaque):
624
625 2012-01-19  Ken Buchanan <kenrb@chromium.org>
626
627         Layout Test fast/text/international/spaces-combined-in-vertical-text.html is failing
628         https://bugs.webkit.org/show_bug.cgi?id=75787
629
630         Reviewed by Simon Fraser.
631
632         This is a tweak to my patch in r104322. On some platforms
633         RenderCombineText::combineText() can abort early during inline
634         iteration, causing this loop in skipLeadingWhitespace to spin,
635         hence the layout test timeouts. This patch accounts for that
636         condition and makes the loop iteration more robust.
637
638         No new test because this is fixing a failure on an existing test.
639
640         * rendering/RenderBlockLineLayout.cpp:
641         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
642
643 2012-01-19  Jer Noble  <jer.noble@apple.com>
644
645         HRTFPanner not rendering correctly on mac port
646         https://bugs.webkit.org/show_bug.cgi?id=76397
647
648         Reviewed by Eric Carlson.
649
650         No new tests; HRTF results are currently not testable.
651
652         Re-generate the Composite.wav file from its constituent azimuth & elevation files.
653
654         * platform/audio/resources/Composite.wav:
655
656 2012-01-19  David Hyatt  <hyatt@apple.com>
657
658         https://bugs.webkit.org/show_bug.cgi?id=76577
659         
660         Fix crash when nested line grids are used. Make sure to bail out if no line grid
661         is found rather than crashing.
662
663         Reviewed by Dan Bernstein.
664
665         Added fast/line-grid/line-grid-nested.html.
666
667         * rendering/LayoutState.cpp:
668         (WebCore::LayoutState::establishLineGrid):
669
670 2012-01-18  Enrica Casucci  <enrica@apple.com>
671
672         editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyleAttributeName.
673         https://bugs.webkit.org/show_bug.cgi?id=76588
674         <rdar://problem/9325183>
675
676         Reviewed by Dan Bernstein.
677
678         Added TestWebKitAPI test.
679
680         * platform/mac/HTMLConverter.mm:
681         (+[WebHTMLConverter editingAttributedStringFromRange:]):
682
683 2012-01-18  Alexander Pavlov  <apavlov@chromium.org>
684
685         Web Inspector: Implement screen resolution emulation backend
686         https://bugs.webkit.org/show_bug.cgi?id=76532
687
688         Reviewed by Pavel Feldman.
689
690         The emulation affects [min-|max-]device-(width|height) media queries, window.screen.(width|height),
691         and window.inner(Width|Height).
692
693         Test: inspector/styles/override-screen-size.html
694
695         * css/MediaQueryEvaluator.cpp:
696         (WebCore::device_heightMediaFeatureEval): Apply device-height override if necessary.
697         (WebCore::device_widthMediaFeatureEval): Apply device-width override if necessary.
698         * inspector/Inspector.json:
699         * inspector/InspectorCSSAgent.cpp:
700         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
701         (WebCore::InspectorCSSAgent::startSelectorProfiler):
702         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
703         (WebCore::InspectorCSSAgent::willMatchRule):
704         (WebCore::InspectorCSSAgent::didMatchRule):
705         (WebCore::InspectorCSSAgent::willProcessRule):
706         (WebCore::InspectorCSSAgent::didProcessRule):
707         * inspector/InspectorInstrumentation.cpp:
708         (WebCore::InspectorInstrumentation::applyScreenWidthOverrideImpl):
709         (WebCore::InspectorInstrumentation::applyScreenHeightOverrideImpl):
710         * inspector/InspectorInstrumentation.h:
711         (WebCore::InspectorInstrumentation::applyScreenWidthOverride):
712         (WebCore::InspectorInstrumentation::applyScreenHeightOverride):
713         * inspector/InspectorPageAgent.cpp:
714         (WebCore::InspectorPageAgent::InspectorPageAgent):
715         (WebCore::InspectorPageAgent::restore):
716         (WebCore::InspectorPageAgent::disable):
717         (WebCore::InspectorPageAgent::setScreenSizeOverride):
718         (WebCore::InspectorPageAgent::applyScreenWidthOverride):
719         (WebCore::InspectorPageAgent::applyScreenHeightOverride):
720         (WebCore::InspectorPageAgent::updateFrameViewFixedLayout):
721         (WebCore::InspectorPageAgent::clearFrameViewFixedLayout):
722         (WebCore::InspectorPageAgent::setFrameViewFixedLayout):
723         * inspector/InspectorPageAgent.h:
724         * page/DOMWindow.cpp:
725         (WebCore::DOMWindow::innerHeight): Apply height override if necessary.
726         (WebCore::DOMWindow::innerWidth): Apply width override if necessary.
727         * page/Screen.cpp:
728         (WebCore::Screen::height): Apply height override if necessary.
729         (WebCore::Screen::width): Apply width override if necessary.
730
731 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
732
733         [Qt] Handle the layers visible rect calculation on the web process.
734         https://bugs.webkit.org/show_bug.cgi?id=74720
735
736         Reviewed by Noam Rosenthal.
737
738         Remove all visible rect calculation related code from TextureMapperNode.
739
740         * platform/graphics/texmap/TextureMapperNode.cpp:
741         * platform/graphics/texmap/TextureMapperNode.h:
742
743 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
744
745         Web Inspector: Improve focus switching in scripts panel.
746         https://bugs.webkit.org/show_bug.cgi?id=76628
747
748         Reviewed by Pavel Feldman.
749
750         * inspector/front-end/Dialog.js:
751         (WebInspector.Dialog.prototype._hide):
752         * inspector/front-end/FilteredItemSelectionDialog.js:
753         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
754         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
755         * inspector/front-end/ScriptsNavigator.js:
756         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
757         * inspector/front-end/ScriptsPanel.js:
758         (WebInspector.ScriptsPanel.prototype._showSourceLine):
759
760 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
761
762         Web Inspector: Add isSelfOrAnsector and isSelfOrDescendant methods to utilities.
763         https://bugs.webkit.org/show_bug.cgi?id=76618
764
765         Added isSelfOrAncestor, isSelfOrDescendant and WebInspector.restoreFocusFromElement methods.
766
767         Reviewed by Pavel Feldman.
768
769         * inspector/front-end/Drawer.js:
770         * inspector/front-end/HelpScreen.js:
771         (WebInspector.HelpScreen.prototype._onBlur):
772         * inspector/front-end/MetricsSidebarPane.js:
773         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
774         * inspector/front-end/Popover.js:
775         * inspector/front-end/ScriptsPanel.js:
776         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
777         * inspector/front-end/StylesSidebarPane.js:
778         ():
779         * inspector/front-end/TextPrompt.js:
780         (WebInspector.TextPrompt.prototype.detach):
781         (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
782         * inspector/front-end/TextViewer.js:
783         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
784         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
785         * inspector/front-end/UIUtils.js:
786         (WebInspector.startEditing.cleanUpAfterEditing):
787         (WebInspector.restoreFocusFromElement):
788         * inspector/front-end/utilities.js:
789         (Element.prototype.isInsertionCaretInside):
790         ():
791
792 2012-01-19  Andreas Kling  <awesomekling@apple.com>
793
794         DynamicNodeList: Simplify internal Caches object.
795         <http://webkit.org/b/76600>
796
797         Reviewed by Ryosuke Niwa.
798
799         Move m_caches from DynamicSubtreeNodeList and ChildNodeList up into DynamicNodeList.
800         Remove the inheritance from RefCounted and store it simply as "Caches m_caches"
801         This avoids one heap allocation per DynamicNodeList. Also reordered the Caches members
802         to pack slightly better on 64-bit.
803
804         * dom/ChildNodeList.cpp:
805         (WebCore::ChildNodeList::ChildNodeList):
806         (WebCore::ChildNodeList::length):
807         (WebCore::ChildNodeList::item):
808         * dom/ChildNodeList.h:
809         * dom/DynamicNodeList.cpp:
810         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
811         (WebCore::DynamicSubtreeNodeList::length):
812         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
813         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
814         (WebCore::DynamicSubtreeNodeList::item):
815         * dom/DynamicNodeList.h:
816         (WebCore::DynamicNodeList::invalidateCache):
817         * dom/Node.cpp:
818         (WebCore::NodeRareData::clearChildNodeListCache):
819
820 2012-01-19  Vsevolod Vlasov  <vsevik@chromium.org>
821
822         Web Inspector: TabbedPane closeAllTabs does not close all tabs.
823         https://bugs.webkit.org/show_bug.cgi?id=76624
824
825         Reviewed by Pavel Feldman.
826
827         * inspector/front-end/ScriptsPanel.js:
828         * inspector/front-end/TabbedPane.js:
829         (WebInspector.TabbedPane.prototype.closeAllTabs):
830
831 2012-01-18  Rob Buis  <rbuis@rim.com>
832
833         image/pjpeg not supported for decoding on BlackBerry platform
834         https://bugs.webkit.org/show_bug.cgi?id=76595
835
836         Reviewed by Antonio Gomes.
837
838         Add image/pjpeg as one of the supported types for image decoding on BlackBerry platform.
839
840         * platform/MIMETypeRegistry.cpp:
841         (WebCore::initializeSupportedImageMIMETypes):
842
843 2012-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
844
845         Unreviewed, rolling out r105402.
846         http://trac.webkit.org/changeset/105402
847         https://bugs.webkit.org/show_bug.cgi?id=76623
848
849         Layout test problems (Requested by WildFox on #webkit).
850
851         * css/svg.css:
852         (svg):
853         * rendering/RenderBox.h:
854         (WebCore::RenderBox::computeIntrinsicRatioInformation):
855         * rendering/RenderBoxModelObject.cpp:
856         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
857         * rendering/RenderImage.cpp:
858         (WebCore::RenderImage::computeReplacedLogicalWidth):
859         (WebCore::RenderImage::computeIntrinsicRatioInformation):
860         * rendering/RenderImage.h:
861         * rendering/RenderReplaced.cpp:
862         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
863         (WebCore::RenderReplaced::logicalHeightIsAuto):
864         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
865         * rendering/RenderReplaced.h:
866         * rendering/svg/RenderSVGRoot.cpp:
867         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
868         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
869         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
870         * rendering/svg/RenderSVGRoot.h:
871         * rendering/svg/RenderSVGViewportContainer.h:
872         * svg/SVGLengthContext.cpp:
873         (WebCore::SVGLengthContext::determineViewport):
874         * svg/SVGSVGElement.cpp:
875         (WebCore::SVGSVGElement::viewport):
876         (WebCore::SVGSVGElement::parseMappedAttribute):
877         (WebCore::updateCSSForAttribute):
878         (WebCore::SVGSVGElement::svgAttributeChanged):
879         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
880         (WebCore::SVGSVGElement::currentViewBoxRect):
881         * svg/SVGSVGElement.h:
882         * svg/graphics/SVGImage.cpp:
883         (WebCore::SVGImage::size):
884         (WebCore::SVGImage::computeIntrinsicDimensions):
885         * svg/graphics/SVGImage.h:
886
887 2012-01-19  Alexis Menard  <alexis.menard@openbossa.org>
888
889         Strange Result for getComputedStyle on borderWidth set in em
890         https://bugs.webkit.org/show_bug.cgi?id=18294
891
892         Reviewed by Tony Chang.
893
894         BorderValue stores its width on a 12 bits unsigned. This patch 
895         increase it to 27. The patch also modify the way to set the 
896         width or to get it, we now use a unsigned rather than a short.
897
898         Test: fast/css/border-width-large.html
899
900         * css/CSSPrimitiveValue.cpp:
901         (WebCore::CSSPrimitiveValue::computeLength):
902         * css/CSSStyleApplyProperty.cpp:
903         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
904         * page/animation/AnimationBase.cpp:
905         (WebCore::blendFunc):
906         (WebCore::AnimationBase::ensurePropertyMap):
907         * platform/animation/AnimationUtilities.h:
908         (WebCore::blend):
909         * rendering/RenderTheme.cpp:
910         (WebCore::RenderTheme::adjustStyle):
911         * rendering/style/BorderData.h:
912         (WebCore::BorderData::borderLeftWidth):
913         (WebCore::BorderData::borderRightWidth):
914         (WebCore::BorderData::borderTopWidth):
915         (WebCore::BorderData::borderBottomWidth):
916         * rendering/style/BorderValue.h:
917         (WebCore::BorderValue::width):
918         * rendering/style/RenderStyle.cpp:
919         * rendering/style/RenderStyle.h:
920         (WebCore::RenderStyleBitfields::borderLeftWidth):
921         (WebCore::RenderStyleBitfields::borderRightWidth):
922         (WebCore::RenderStyleBitfields::borderTopWidth):
923         (WebCore::RenderStyleBitfields::borderBottomWidth):
924         (WebCore::RenderStyleBitfields::setBorderLeftWidth):
925         (WebCore::RenderStyleBitfields::setBorderRightWidth):
926         (WebCore::RenderStyleBitfields::setBorderTopWidth):
927         (WebCore::RenderStyleBitfields::setBorderBottomWidth):
928         (WebCore::RenderStyleBitfields::initialBorderWidth):
929         (WebCore::RenderStyleBitfields::initialColumnRuleWidth):
930         (WebCore::RenderStyleBitfields::initialOutlineWidth):
931
932 2012-01-18  Nikolas Zimmermann  <nzimmermann@rim.com>
933
934         Differentiate between SVG/CSS width/height attributes/properties
935         https://bugs.webkit.org/show_bug.cgi?id=76447
936
937         Reviewed by Antti Koivisto.
938
939         Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
940         SVG width/height attributes and the CSS width/height properties. They need to be treated independently
941         when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.
942
943         Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.
944
945         * css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
946         * rendering/RenderBox.h:
947         (WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
948         * rendering/RenderBoxModelObject.cpp:
949         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
950         * rendering/RenderImage.cpp:
951         (WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
952         (WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
953         * rendering/RenderImage.h: Ditto.
954         * rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
955         (WebCore::firstContainingBlockWithLogicalWidth): Refactored.
956         (WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
957         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
958         (WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
959         (WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
960         (WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
961         * rendering/RenderReplaced.h:
962         * rendering/svg/RenderSVGRoot.cpp:
963         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
964         (WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
965         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
966         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
967         * rendering/svg/RenderSVGRoot.h:
968         * rendering/svg/RenderSVGViewportContainer.h:
969         (WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
970         * svg/SVGLengthContext.cpp:
971         (WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
972         * svg/SVGSVGElement.cpp: 
973         (WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
974         (WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
975         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
976         (WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
977         (WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
978         (WebCore::SVGSVGElement::currentViewportSize): Ditto.
979         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
980         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
981         (WebCore::SVGSVGElement::intrinsicWidth): Helper.
982         (WebCore::SVGSVGElement::intrinsicHeight): Ditto.
983         * svg/SVGSVGElement.h:
984         * svg/graphics/SVGImage.cpp:
985         (WebCore::SVGImage::size): Cleanup code.
986         (WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
987         (WebCore::SVGImage::hasRelativeHeight): Ditto.
988         (WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
989         * svg/graphics/SVGImage.h:
990
991 2012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
992
993         drop event isn't fired for contentEditable in edit drag
994         https://bugs.webkit.org/show_bug.cgi?id=57185
995
996         Reviewed by Adam Barth.
997
998         Dispatch drop and dragend events after edit drag per HTML5 spec:
999         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model
1000
1001         There are two major differences between the spec and WebKit's new behavior:
1002
1003         While the spec says we have to insert the dragged contents immediately after dispatching drop event
1004         and delete the source in the default event handler of dragend event, doing so in WebKit is extremely
1005         difficult because of the way we manage the selection. Instead, we continue to delete the source
1006         and insert the dragged contents immediately after the drop event; this behavior matches that of Firefox 9.
1007
1008         When the dragged contents and the destination of the move is in the same text node, ReplaceSelectionCommand
1009         may end up replacing it with a new text node. But this removal causes a problem when EventHandler uses
1010         the node to dispatch dragend event because the node is "orphaned" from its parent at that point. To mitigate
1011         this issue, we update the dragState's m_dragSrc when the node is orphaned by the edit drag. While this behavior
1012         may differ from the spec and other browsers, not delivering dragend to the editing host seems strictly worse than
1013         dispatching it at the slightly wrong target.
1014
1015         Tests: fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
1016                fast/events/moving-text-should-fire-drop-and-dragend-events.html
1017
1018         * page/DragController.cpp:
1019         (WebCore::DragController::performDrag): Dispatch drop event even when m_isHandlingDrag is true as long
1020         as DragDestinationActionDHTML is an acceptable action.
1021         (WebCore::DragController::concludeEditDrag): Call updateDragStateAfterEditDragIfNeeded after inserting
1022         the dragged contents. This is necessary when ReplaceSelectionCommand or MoveSelectionCommand modifies
1023         the source node while inserting the dragged contents.
1024         * page/EventHandler.cpp:
1025         (WebCore::EventHandler::performDragAndDrop): Clear the drag state only if drop event's default action
1026         was prevented so that we dispatch dragevent event later.
1027         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Update dragState's m_dragSrc when the node
1028         is orphaned. See above for the rationale.
1029         * page/EventHandler.h:
1030
1031 2012-01-18  Kinuko Yasuda  <kinuko@chromium.org>
1032
1033         Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory
1034         https://bugs.webkit.org/show_bug.cgi?id=76551
1035
1036         Reviewed by Darin Fisher.
1037
1038         Moved the implementation of crackFileSystemURL() and toURL() from
1039         WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
1040         so that each platform can extend/implement their behavior if necessary.
1041
1042         No new tests since this patch has no functionality changes. (Existing
1043         tests should pass)
1044
1045         * fileapi/DOMFileSystemBase.cpp: Moved the implementation of
1046         crackFileSystemURL() to AsyncFileSystem
1047         (WebCore::DOMFileSystemBase::crackFileSystemURL):
1048         * fileapi/DOMFileSystemBase.h:
1049         * fileapi/EntryBase.cpp: Moved the implementation of toURL() to AsyncFileSystem
1050         (WebCore::EntryBase::toURL):
1051         * page/DOMWindow.cpp: Removed chrome-specific type handling code.
1052         (WebCore::DOMWindow::webkitRequestFileSystem):
1053         * page/DOMWindow.h: Removed chrome-specific filesystem type
1054         (EXTERNAL).
1055         * platform/AsyncFileSystem.cpp: Added default implementation of toURL() and crackFileSystemURL()
1056         (WebCore::AsyncFileSystem::toURL):
1057         (WebCore::AsyncFileSystem::crackFileSystemURL):
1058         * platform/AsyncFileSystem.h:
1059         * workers/WorkerContext.cpp: Removed chrome-specific type handling code.
1060         (WebCore::WorkerContext::webkitRequestFileSystem):
1061         (WebCore::WorkerContext::webkitRequestFileSystemSync):
1062
1063 2012-01-19  Mihnea Ovidenie  <mihnea@adobe.com>
1064
1065         Cache RenderStyle pointer as a method to avoid performance regression for region styling
1066         https://bugs.webkit.org/show_bug.cgi?id=76265
1067
1068         Reviewed by David Hyatt.
1069
1070         No new tests since this is just refactoring.
1071         When region styling was enabled in https://bugs.webkit.org/show_bug.cgi?id=71488,
1072         it introduced a performance regression due to the change of RenderObject::style() method.
1073         This patch tries to avoid a new performance regression when region styling will be enabled again.
1074
1075         * rendering/RenderBlock.cpp:
1076         (WebCore::RenderBlock::MarginInfo::MarginInfo):
1077         (WebCore::RenderBlock::styleWillChange):
1078         (WebCore::RenderBlock::layoutBlock):
1079         (WebCore::RenderBlock::layoutBlockChildren):
1080         (WebCore::RenderBlock::layoutBlockChild):
1081         (WebCore::RenderBlock::computePreferredLogicalWidths):
1082         (WebCore::getBorderPaddingMargin):
1083         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1084         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1085         * rendering/RenderBlockLineLayout.cpp:
1086         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1087         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1088         * rendering/RenderBox.cpp:
1089         (WebCore::RenderBox::willBeDestroyed):
1090         (WebCore::RenderBox::styleWillChange):
1091         (WebCore::RenderBox::styleDidChange):
1092         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
1093         (WebCore::RenderBox::computeRectForRepaint):
1094         (WebCore::RenderBox::computeLogicalWidthInRegion):
1095         (WebCore::RenderBox::computeLogicalWidthUsing):
1096         (WebCore::RenderBox::computeLogicalHeight):
1097         (WebCore::RenderBox::computePercentageLogicalHeight):
1098         (WebCore::RenderBox::computePositionedLogicalHeight):
1099         * rendering/RenderBoxModelObject.cpp:
1100         (WebCore::RenderBoxModelObject::styleWillChange):
1101         (WebCore::RenderBoxModelObject::updateBoxModelInfoFromStyle):
1102         * rendering/RenderInline.cpp:
1103         (WebCore::RenderInline::styleDidChange):
1104         * rendering/RenderText.cpp:
1105         (WebCore::RenderText::styleDidChange):
1106         (WebCore::RenderText::computePreferredLogicalWidths):
1107
1108 2012-01-19  Kazuhiro Inaba  <kinaba@chromium.org>
1109
1110         [Chromium] Random characters got rendered as empty boxes or with incorrect glyphs even when a font is present
1111         https://bugs.webkit.org/show_bug.cgi?id=76508
1112
1113         Reviewed by Kent Tamura.
1114
1115         Wrapped GetGlyphIndices() API calls so that when they failed we trigger font
1116         loading outside the sandbox and retry the call.
1117
1118         No new auto tests since the bug involves the system's occasional cache behavior
1119         and thus there's no reliable way to reproduce and test the situation.
1120
1121         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
1122         (WebCore::getGlyphIndices):
1123         GDI call wrapper ensuring fonts to be loaded.
1124         (WebCore::initSpaceGlyph):
1125         Changed to use the wrapper function.
1126         (WebCore::fillBMPGlyphs):
1127         Changed to use the wrapper function.
1128         Introduced scoped HDC management by HWndDC.
1129         (WebCore::GlyphPage::fill):
1130
1131 2012-01-19  Adam Barth  <abarth@webkit.org>
1132
1133         createAttributeNS should understand that "xmlns" is allowed in the http://www.w3.org/2000/xmlns/
1134         https://bugs.webkit.org/show_bug.cgi?id=76579
1135
1136         Reviewed by Eric Seidel.
1137
1138         This patch cleans up a tiny corner case involving the (somewhat
1139         magical) xmlns attribute that we uncovered when working on
1140         setAttributeNS.
1141
1142         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
1143
1144         * dom/Document.cpp:
1145         (WebCore::Document::importNode):
1146         (WebCore::Document::hasValidNamespaceForElements):
1147         (WebCore::Document::hasValidNamespaceForAttributes):
1148         (WebCore::Document::createElementNS):
1149         (WebCore::Document::createAttributeNS):
1150         * dom/Document.h:
1151         * dom/Element.cpp:
1152         (WebCore::Element::setAttributeNS):
1153
1154 2012-01-19  Roland Steiner  <rolandsteiner@chromium.org>
1155
1156         Unreviewed build fix for DEBUG: remove comparison of an unsigned variable with '>= 0' in ASSERT.
1157
1158         No new tests. (no functionality change)
1159
1160         * webaudio/AudioNodeOutput.cpp:
1161         (WebCore::AudioNodeOutput::AudioNodeOutput):
1162
1163 2012-01-18  Li Yin  <li.yin@intel.com>
1164
1165         [v8] Low efficiency of writing long string from web application to plugin.
1166         https://bugs.webkit.org/show_bug.cgi?id=76592
1167
1168         The efficiency will be improved by 300 times in the best case, when the
1169         size of string reaches 1MB.
1170
1171         Reviewed by Adam Barth.
1172
1173         * bindings/v8/V8NPUtils.cpp:
1174         (WebCore::convertV8ObjectToNPVariant):
1175
1176 2012-01-18  Adam Barth  <abarth@webkit.org>
1177
1178         Assigning to Element.prefix should throw exception when using illegal characters
1179         https://bugs.webkit.org/show_bug.cgi?id=76589
1180
1181         Reviewed by Eric Seidel.
1182
1183         This patch fixes a FIXME and implements the INVALID_CHARACTER_ERR
1184         exception described in
1185         http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix
1186
1187         Tests: fast/dom/Element/prefix-setter-exception.html
1188
1189         * dom/Node.cpp:
1190         (WebCore::isValidNameStartCharacter):
1191         (WebCore::isValidNameCharacter):
1192         (WebCore::hasInvalidValidNameCharacters):
1193         (WebCore::Node::checkSetPrefix):
1194
1195 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
1196
1197         ShadowContent query should be able to have fallback elements.
1198         https://bugs.webkit.org/show_bug.cgi?id=75306
1199
1200         Reviewed by Hajime Morita.
1201
1202         When no elements are selected by a shadow content element selector query,
1203         light children are selected as a fallback elements.
1204
1205         Test: fast/dom/shadow/shadow-contents-fallback.html
1206
1207         * dom/NodeRenderingContext.cpp:
1208         (WebCore::NodeRenderingContext::NodeRenderingContext):
1209           Considers fallback phase. When no elements are chosen, the phase is set to 'fallback'.
1210         (WebCore::NodeRenderingContext::nextRenderer):
1211           Takes fallback phase into account.
1212         (WebCore::NodeRenderingContext::previousRenderer): ditto.
1213         * dom/NodeRenderingContext.h:
1214         * html/shadow/HTMLContentElement.cpp:
1215         (WebCore::HTMLContentElement::attach):
1216           Calculates inclusions before attaching light children.
1217         * html/shadow/HTMLContentElement.h:
1218         (WebCore::HTMLContentElement::hasInclusion):
1219
1220 2012-01-18  Kent Tamura  <tkent@chromium.org>
1221
1222         REGRESSION(r100111): A 'change' event does not fire when a mouse drag
1223         occurs to switch elements in a listbox <select>
1224         https://bugs.webkit.org/show_bug.cgi?id=76244
1225
1226         Reviewed by Hajime Morita.
1227
1228         Test: fast/forms/select/listbox-drag-in-non-multiple.html
1229
1230         * html/HTMLSelectElement.cpp:
1231         (WebCore::HTMLSelectElement::updateSelectedState):
1232         Do not update m_activeSelectionState for non-multiple <select>.
1233         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1234         Use setActiveSelection*Index() and updateListBoxSelection(true) instead
1235         of updateSelectedState() because updateSelectedState() updates
1236         m_lastOnChangeSelection and will prevent the mouseup handler from
1237         dispatching 'change' event.
1238         We should not call listBoxOnChange() in the mousemove handler in order
1239         to align the behavior of IE and Firefox.
1240
1241 2012-01-18  Eric Seidel  <eric@webkit.org>
1242
1243         setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do
1244         https://bugs.webkit.org/show_bug.cgi?id=76143
1245
1246         Reviewed by Adam Barth.
1247
1248         Test: fast/dom/Element/setAttributeNS-namespace-err.html
1249
1250         * dom/Element.cpp:
1251         (WebCore::Element::setAttributeNS):
1252
1253 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1254
1255         Unreviewed, rolling out r105376.
1256         http://trac.webkit.org/changeset/105376
1257         https://bugs.webkit.org/show_bug.cgi?id=76601
1258
1259         Roll 76493 back in after discussion with jsbell (Requested by
1260         rolandsteiner on #webkit).
1261
1262         * bindings/v8/IDBBindingUtilities.cpp:
1263         (WebCore::injectIDBKeyIntoSerializedValue):
1264
1265 2012-01-18  Ian Vollick  <vollick@chromium.org>
1266
1267         [chromium] Create a base-class CCAnimation to represent compositor animations
1268         https://bugs.webkit.org/show_bug.cgi?id=73233
1269
1270         Adds a kernel for running animations on the chromium compositor
1271         thread.
1272
1273         Reviewed by Kenneth Russell.
1274
1275         * WebCore.gypi:
1276         * platform/graphics/chromium/cc/CCActiveAnimation.cpp: Added.
1277         (WebCore::CCActiveAnimation::CCActiveAnimation):
1278         (WebCore::CCActiveAnimation::setRunState):
1279         (WebCore::CCActiveAnimation::isFinishedAt):
1280         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
1281         * platform/graphics/chromium/cc/CCActiveAnimation.h: Added.
1282         (WebCore::CCActiveAnimation::create):
1283         (WebCore::CCActiveAnimation::~CCActiveAnimation):
1284         (WebCore::CCActiveAnimation::group):
1285         (WebCore::CCActiveAnimation::targetProperty):
1286         (WebCore::CCActiveAnimation::runState):
1287         (WebCore::CCActiveAnimation::iterations):
1288         (WebCore::CCActiveAnimation::setIterations):
1289         (WebCore::CCActiveAnimation::startTime):
1290         (WebCore::CCActiveAnimation::setStartTime):
1291         (WebCore::CCActiveAnimation::isFinished):
1292         (WebCore::CCActiveAnimation::animationCurve):
1293         * platform/graphics/chromium/cc/CCAnimationCurve.cpp: Added.
1294         (WebCore::CCAnimationCurve::toFloatAnimationCurve):
1295         (WebCore::CCAnimationCurve::toTransformAnimationCurve):
1296         * platform/graphics/chromium/cc/CCAnimationCurve.h: Added.
1297         (WebCore::CCAnimationCurve::~CCAnimationCurve):
1298         (WebCore::CCFloatAnimationCurve::~CCFloatAnimationCurve):
1299         (WebCore::CCFloatAnimationCurve::type):
1300         (WebCore::CCTransformAnimationCurve::~CCTransformAnimationCurve):
1301         (WebCore::CCTransformAnimationCurve::type):
1302         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp: Added.
1303         (WebCore::CCLayerAnimationControllerImpl::create):
1304         (WebCore::CCLayerAnimationControllerImpl::CCLayerAnimationControllerImpl):
1305         (WebCore::CCLayerAnimationControllerImpl::animate):
1306         (WebCore::CCLayerAnimationControllerImpl::add):
1307         (WebCore::CCLayerAnimationControllerImpl::getActiveAnimation):
1308         (WebCore::CCLayerAnimationControllerImpl::hasActiveAnimation):
1309         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForNextTick):
1310         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForStartTime):
1311         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForTargetAvailability):
1312         (WebCore::CCLayerAnimationControllerImpl::resolveConflicts):
1313         (WebCore::CCLayerAnimationControllerImpl::purgeFinishedAnimations):
1314         (WebCore::CCLayerAnimationControllerImpl::tickAnimations):
1315         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h: Added.
1316         (WebCore::CCLayerAnimationControllerImplClient::~CCLayerAnimationControllerImplClient):
1317
1318 2012-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1319
1320         Unreviewed, rolling out r105331.
1321         http://trac.webkit.org/changeset/105331
1322         https://bugs.webkit.org/show_bug.cgi?id=76599
1323
1324         May have broken Chromium InjectIDBKey browser_test (Requested
1325         by rolandsteiner on #webkit).
1326
1327         * bindings/v8/IDBBindingUtilities.cpp:
1328         (WebCore::injectIDBKeyIntoSerializedValue):
1329
1330 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
1331
1332         Remove some unused code in AudioContext
1333         https://bugs.webkit.org/show_bug.cgi?id=76506
1334
1335         Reviewed by Kenneth Russell.
1336
1337         No new tests required.
1338
1339         * webaudio/AudioContext.cpp:
1340         (WebCore::AudioContext::constructCommon):
1341         (WebCore::AudioContext::uninitialize):
1342         * webaudio/AudioContext.h:
1343
1344 2012-01-18  Raymond Liu  <raymond.liu@intel.com>
1345
1346         Only create AudioBus with required number of channels for AudioNodeOutput
1347         https://bugs.webkit.org/show_bug.cgi?id=76417
1348
1349         Reviewed by Kenneth Russell.
1350
1351         No new tests required.
1352
1353         * webaudio/AudioNodeOutput.cpp:
1354         (WebCore::AudioNodeOutput::AudioNodeOutput):
1355         (WebCore::AudioNodeOutput::setNumberOfChannels):
1356         (WebCore::AudioNodeOutput::updateInternalBus):
1357         (WebCore::AudioNodeOutput::updateNumberOfChannels):
1358         (WebCore::AudioNodeOutput::pull):
1359         * webaudio/AudioNodeOutput.h:
1360
1361 2012-01-18  Andreas Kling  <awesomekling@apple.com>
1362
1363         Cache and reuse the NodeList returned by Node::childNodes().
1364         <http://webkit.org/b/76591>
1365
1366         Reviewed by Ryosuke Niwa.
1367
1368         Instead of only caching the DynamicNodeList::Caches for .childNodes on NodeRareData,
1369         cache the full ChildNodeList object. Lifetime management is left to wrappers who
1370         invalidate the cached (raw) pointer via Node::removeCachedChildNodeList(), called
1371         from ~ChildNodeList().
1372
1373         This is a slight behavior change, in that Node.childNodes === Node.childNodes will
1374         now be true. This matches the behavior of both Firefox and Opera.
1375
1376         This reduces memory consumption by 192 kB (on 32-bit) when viewing the full
1377         HTML5 spec at <http://whatwg.org/c>
1378
1379         Test: fast/dom/gc-9.html
1380               fast/dom/node-childNodes-idempotence.html
1381
1382         * dom/Node.cpp:
1383         (WebCore::Node::childNodes):
1384         * dom/NodeRareData.h:
1385         (WebCore::NodeRareData::NodeRareData):
1386         (WebCore::NodeRareData::childNodeList):
1387         (WebCore::NodeRareData::setChildNodeList):
1388
1389             Only construct one ChildNodeList per Node and store it on NodeRareData for
1390             retrieval across childNodes() calls.
1391
1392         * dom/ChildNodeList.h:
1393         (WebCore::ChildNodeList::create):
1394         * dom/ChildNodeList.cpp:
1395         (WebCore::ChildNodeList::ChildNodeList):
1396
1397             Construct the Caches at creation instead of passing it to the constructor.
1398
1399         (WebCore::ChildNodeList::reset):
1400
1401             Added, resets the internal cache.
1402
1403         (WebCore::ChildNodeList::~ChildNodeList):
1404
1405             Call Node::removeCachedChildNodeList().
1406
1407         * dom/DynamicNodeList.cpp:
1408         * dom/DynamicNodeList.h:
1409
1410             Have DynamicNodeList (and subclasses) respond "true" to isDynamicNodeList().
1411             Previously only DynamicSubtreeNodeList (and subclasses) were doing this.
1412             Without it, JSC may GC our ChildNodeLists prematurely (due to NodeList's
1413             isReachableFromOpaqueRoots() implementation checking isDynamicNodeList().)
1414
1415         * dom/Node.h:
1416         * dom/Node.cpp:
1417         (WebCore::Node::removeCachedChildNodeList):
1418
1419             Added for ~ChildNodeList() to remove the pointer to itself from the Node.
1420
1421         (WebCore::NodeRareData::clearChildNodeListCache):
1422
1423             Call ChildNodeList::reset().
1424
1425 2012-01-18  James Robinson  <jamesr@chromium.org>
1426
1427         Unreviewed, rolling out r105366.
1428         http://trac.webkit.org/changeset/105366
1429         https://bugs.webkit.org/show_bug.cgi?id=76015
1430
1431         Breaks CCLayerTreeHostImplTest unit test
1432
1433         * platform/graphics/chromium/TiledLayerChromium.cpp:
1434         (WebCore::TiledLayerChromium::pushPropertiesTo):
1435         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1436         * platform/graphics/chromium/cc/CCDrawQuad.h:
1437         (WebCore::CCDrawQuad::drawsOpaque):
1438         (WebCore::CCDrawQuad::needsBlending):
1439         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1440         (WebCore::CCQuadCuller::cullOccludedQuads):
1441         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
1442         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
1443         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
1444         (WebCore::CCTileDrawQuad::create):
1445         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
1446         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
1447         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1448         (WebCore::CCTiledLayerImpl::appendQuads):
1449         (WebCore::CCTiledLayerImpl::syncTextureId):
1450         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1451
1452 2012-01-18  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
1453
1454         Save two ID checks on CSS Min/Width property validation
1455         https://bugs.webkit.org/show_bug.cgi?id=76565
1456
1457         The same validation is done again in the next case statement. Check for
1458         CSSValueIntrinsic and CSSValueMinIntrinsic was done twice when the value
1459         is a number.
1460
1461         Reviewed by Andreas Kling.
1462
1463         * css/CSSParser.cpp:
1464         (WebCore::CSSParser::parseValue):
1465
1466 2012-01-18  Dana Jansens  <danakj@chromium.org>
1467
1468         [chromium] Use region reported painted opaque for draw culling
1469         https://bugs.webkit.org/show_bug.cgi?id=76015
1470
1471         Reviewed by James Robinson.
1472
1473         New unit tests in CCQuadCullerTest.cpp and CCTiledLayerImplTest.cpp
1474
1475         * platform/graphics/chromium/TiledLayerChromium.cpp:
1476         (WebCore::TiledLayerChromium::pushPropertiesTo):
1477         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1478         * platform/graphics/chromium/cc/CCDrawQuad.h:
1479         (WebCore::CCDrawQuad::opaqueRect):
1480         (WebCore::CCDrawQuad::needsBlending):
1481         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1482         (WebCore::CCQuadCuller::cullOccludedQuads):
1483         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
1484         (WebCore::CCTileDrawQuad::create):
1485         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
1486         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
1487         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1488         (WebCore::DrawableTile::opaqueRect):
1489         (WebCore::DrawableTile::setOpaqueRect):
1490         (WebCore::CCTiledLayerImpl::appendQuads):
1491         (WebCore::CCTiledLayerImpl::pushTileProperties):
1492         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1493
1494 2012-01-18  Victoria Kirst  <vrk@chromium.org>
1495
1496         HTMLMediaElement should fire 'progress' event before 'idle' if it was previously loading
1497         https://bugs.webkit.org/show_bug.cgi?id=76568
1498
1499         Reviewed by Eric Carlson.
1500
1501         This fires a progress event when going from a non-empty state to idle,
1502         for the same reason that a progress event is fired when going from a
1503         non-idle state to loaded. Also consolidated logic in a single helper method.
1504
1505         No new tests because the decision of if/when a user agent sets the network state
1506         to idle is up to the user agent in this scenario.
1507
1508         * html/HTMLMediaElement.cpp:
1509         (WebCore::HTMLMediaElement::setNetworkState):
1510         (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
1511         * html/HTMLMediaElement.h:
1512
1513 2012-01-18  Jon Lee  <jonlee@apple.com>
1514
1515         [WK2] Sync call for notifications permissions causes flashes on gmail.com
1516         https://bugs.webkit.org/show_bug.cgi?id=76570
1517         <rdar://problem/10647155>
1518
1519         Reviewed by Anders Carlsson and Sam Weinig.
1520
1521         * WebCore.exp.in: Export SecurityOrigin::toString().
1522
1523         Add runtime setting to enable/disable notifications.
1524
1525         * page/Settings.cpp:
1526         (WebCore::Settings::Settings):
1527         * page/Settings.h: Add new bit for whether notifications are enabled.
1528         (WebCore::Settings::setNotificationsEnabled):
1529         (WebCore::Settings::notificationsEnabled):
1530
1531 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
1532
1533         Provide access to user's list of preferred languages
1534         https://bugs.webkit.org/show_bug.cgi?id=76138
1535
1536         Reviewed by Timothy Hatcher.
1537
1538         No new tests, tested by fast/harness/user-preferred-language.html.
1539
1540         * platform/mac/Language.mm:
1541         (WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by 
1542             CFLocaleCopyPreferredLanguages.
1543
1544 2012-01-18  Joshua Bell  <jsbell@chromium.org>
1545
1546         IndexedDB: Implement create-intermediate-objects semantics when injecting values via keyPaths
1547         https://bugs.webkit.org/show_bug.cgi?id=76493
1548
1549         Reviewed by Tony Chang.
1550
1551         Tests: storage/indexeddb/objectstore-autoincrement.html
1552
1553         * bindings/v8/IDBBindingUtilities.cpp:
1554         (WebCore::injectIDBKeyIntoSerializedValue):
1555
1556 2012-01-18  Joshua Bell  <jsbell@chromium.org>
1557
1558         IndexedDB: Invalid keys yielded by key paths should raise exceptions, not error callbacks
1559         https://bugs.webkit.org/show_bug.cgi?id=76075
1560
1561         Reviewed by Tony Chang.
1562
1563         Tests: storage/indexeddb/objectstore-basics.html
1564
1565         * storage/IDBObjectStoreBackendImpl.cpp:
1566         (WebCore::IDBObjectStoreBackendImpl::put):
1567
1568 2012-01-18  Dana Jansens  <danakj@chromium.org>
1569
1570         [chromium] Fix compile error from bug #76211
1571         https://bugs.webkit.org/show_bug.cgi?id=76575
1572
1573         Reviewed by James Robinson.
1574
1575         No new tests. Fixing compile only.
1576
1577         * platform/graphics/chromium/ImageLayerChromium.cpp:
1578         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
1579
1580 2012-01-18  Adam Barth  <abarth@webkit.org>
1581
1582         REGRESSION (r104000): AdBlock extension fails to load/function
1583         https://bugs.webkit.org/show_bug.cgi?id=75554
1584
1585         Reviewed by Andy Estes.
1586
1587         Previously, we would claim the documentElement was available before
1588         we'd actually attached it to the DOM (which we now do via the
1589         attachment queue).  This issue was noted in the code with a FIXME
1590         comment, but there was no test coverage for the issue.  This patch
1591         resolves the FIXME and adds a test.
1592
1593         Test: userscripts/document-element-available-at-start.html
1594
1595         * html/parser/HTMLConstructionSite.cpp:
1596         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1597
1598 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
1599
1600         Provide access to user's list of preferred languages
1601         https://bugs.webkit.org/show_bug.cgi?id=76138
1602
1603         Reviewed by Alexey Proskuryakov.
1604
1605         Test: fast/harness/user-preferred-language.html
1606
1607         * WebCore.exp.in: Export the new functions.
1608         * WebCore.order: Ditto.
1609
1610         * Target.pri: Include new files.
1611         * WebCore.gypi: Ditto.
1612         * WebCore.vcproj/WebCoreTestSupport.vcproj: Ditto.
1613         * WebCore.xcodeproj/project.pbxproj: Ditto.
1614
1615         * platform/Language.cpp:
1616         (WebCore::defaultLanguage): Return userPreferredLanguages[0].
1617         (WebCore::preferredLanguagesOverride): New, return the languages override.
1618         (WebCore::overrideUserPreferredLanguages): New, set the languages override.
1619         (WebCore::userPreferredLanguages): New, return the languages array.
1620         * platform/Language.h:
1621
1622         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1623         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1624         (WebCore::platformUserPreferredLanguages): New.
1625
1626         * platform/chromium/LanguageChromium.cpp:
1627         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1628         (WebCore::platformUserPreferredLanguages): New.
1629
1630         * platform/efl/LanguageEfl.cpp:
1631         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1632         (WebCore::platformUserPreferredLanguages): New.
1633
1634         * platform/gtk/LanguageGtk.cpp:
1635         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1636         (WebCore::platformUserPreferredLanguages): New.
1637
1638         * platform/mac/Language.mm:
1639         (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]): Flag the user languages
1640             as invalid.
1641         (WebCore::platformLanguage): Removed.
1642         (WebCore::platformUserPreferredLanguages): New, return the list of user preferred languages.
1643
1644         * platform/qt/LanguageQt.cpp:
1645         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1646         (WebCore::platformUserPreferredLanguages): New.
1647
1648         * platform/win/LanguageWin.cpp:
1649         (WebCore::platformLanguage): Renamed from platformDefaultLanguage, now static.
1650         (WebCore::platformUserPreferredLanguages): New.
1651
1652         * testing/Internals.cpp:
1653         (WebCore::Internals::userPreferredLanguages): New, return the platform's user preferred languages.
1654         (WebCore::Internals::setUserPreferredLanguages): New, override the user's preferred languages.
1655         * testing/Internals.h:
1656         * testing/Internals.idl: Add userPreferredLanguages.
1657
1658         * testing/js/JSInternalsCustom.cpp:
1659         (WebCore::JSInternals::userPreferredLanguages): New.
1660         (WebCore::JSInternals::setUserPreferredLanguages): New.
1661
1662         * testing/v8/V8InternalsCustom.cpp:
1663         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter): New.
1664         (WebCore::V8Internals::userPreferredLanguagesAccessorSetter): New.
1665
1666 2012-01-18  Dana Jansens  <danakj@chromium.org>
1667
1668         [chromium] Enable tracking opaque region in Skia graphics context, return it from LayerTextureUpdater
1669         https://bugs.webkit.org/show_bug.cgi?id=76211
1670
1671         Reviewed by James Robinson.
1672
1673         New unit tests in LayerTextureUpdaterTest.cpp
1674
1675         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1676         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
1677         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1678         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1679         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1680         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1681         * platform/graphics/chromium/ContentLayerChromium.cpp:
1682         (WebCore::ContentLayerChromium::createTextureUpdater):
1683         * platform/graphics/chromium/LayerTextureUpdater.h:
1684         (WebCore::LayerTextureUpdater::prepareToUpdate):
1685         * platform/graphics/chromium/PlatformCanvas.h:
1686         (WebCore::PlatformCanvas::Painter::skiaContext):
1687         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
1688         (WebCore::SkPictureCanvasLayerTextureUpdater::SkPictureCanvasLayerTextureUpdater):
1689         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1690         (WebCore::SkPictureCanvasLayerTextureUpdater::setOpaque):
1691         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
1692         * platform/graphics/chromium/TiledLayerChromium.cpp:
1693         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1694
1695 2012-01-18  Tim Dresser  <tdresser@chromium.org>
1696
1697         [chromium] Refactor canvas, plugin, and video drawing to be more data-driven
1698         https://bugs.webkit.org/show_bug.cgi?id=76274
1699
1700         Reviewed by James Robinson.
1701
1702         This is the first step in refactoring canvas, plugin, and video drawing.
1703         The CCCustomLayerDrawQuad implementation has been copied to CCCanvasDrawQuad, CCPluginDrawQuad and CCVideoDrawQuad.
1704         All references to CustomLayer have been removed.
1705
1706         As this is a refactor, no new tests were added. CCLayerTreeHostImplTest.blendingOffWhenDrawingOpaqueLayers was modified to
1707         no longer test culling.
1708
1709         * WebCore.gypi:
1710         * platform/graphics/chromium/LayerRendererChromium.cpp:
1711         (WebCore::LayerRendererChromium::drawQuad):
1712         (WebCore::LayerRendererChromium::drawCanvasQuad):
1713         (WebCore::LayerRendererChromium::drawVideoQuad):
1714         (WebCore::LayerRendererChromium::drawPluginQuad):
1715         * platform/graphics/chromium/LayerRendererChromium.h:
1716         * platform/graphics/chromium/cc/CCCanvasDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
1717         (WebCore::CCCanvasDrawQuad::create):
1718         (WebCore::CCCanvasDrawQuad::CCCanvasDrawQuad):
1719         * platform/graphics/chromium/cc/CCCanvasDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
1720         (WebCore::CCCanvasDrawQuad::layer):
1721         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
1722         (WebCore::CCCanvasLayerImpl::appendQuads):
1723         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
1724         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
1725         (WebCore::CCDrawQuad::toCanvasDrawQuad):
1726         (WebCore::CCDrawQuad::toVideoDrawQuad):
1727         (WebCore::CCDrawQuad::toPluginDrawQuad):
1728         * platform/graphics/chromium/cc/CCDrawQuad.h:
1729         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1730         (WebCore::CCLayerImpl::appendQuads):
1731         * platform/graphics/chromium/cc/CCPluginDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
1732         (WebCore::CCPluginDrawQuad::create):
1733         (WebCore::CCPluginDrawQuad::CCPluginDrawQuad):
1734         * platform/graphics/chromium/cc/CCPluginDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
1735         (WebCore::CCPluginDrawQuad::layer):
1736         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
1737         (WebCore::CCPluginLayerImpl::appendQuads):
1738         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
1739         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1740         * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp.
1741         (WebCore::CCVideoDrawQuad::create):
1742         (WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
1743         * platform/graphics/chromium/cc/CCVideoDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h.
1744         (WebCore::CCVideoDrawQuad::layer):
1745         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1746         (WebCore::CCVideoLayerImpl::appendQuads):
1747         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1748
1749 2012-01-18  Vsevolod Vlasov  <vsevik@chromium.org>
1750
1751         Web Inspector: Unsafe cross origin access errors should show stack trace in console.
1752         https://bugs.webkit.org/show_bug.cgi?id=73099
1753
1754         Reviewed by Pavel Feldman.
1755
1756         Test: http/tests/inspector/console-cross-origin-iframe-logging.html
1757
1758         * bindings/v8/V8Proxy.cpp:
1759         (WebCore::V8Proxy::reportUnsafeAccessTo):
1760         * dom/ScriptExecutionContext.cpp:
1761         (WebCore::ScriptExecutionContext::addConsoleMessage):
1762         * dom/ScriptExecutionContext.h:
1763         * loader/FrameLoader.cpp:
1764         (WebCore::FrameLoader::shouldAllowNavigation):
1765         * page/Console.cpp:
1766         (WebCore::Console::addMessage):
1767         * page/Console.h:
1768         * page/DOMWindow.cpp:
1769         (WebCore::PostMessageTimer::PostMessageTimer):
1770         (WebCore::PostMessageTimer::stackTrace):
1771         (WebCore::DOMWindow::postMessage):
1772         (WebCore::DOMWindow::postMessageTimerFired):
1773         (WebCore::DOMWindow::printErrorMessage):
1774
1775 2012-01-18  Pablo Flouret  <pablof@motorola.com>
1776
1777         Add [CallWith] support for attributes in JSC/V8 idl code generators.
1778         Part of https://bugs.webkit.org/show_bug.cgi?id=76035
1779
1780         Reviewed by Adam Barth.
1781
1782         * bindings/scripts/CodeGeneratorJS.pm:
1783         (GenerateImplementation):
1784         (GenerateAttributeCallWith):
1785         * bindings/scripts/CodeGeneratorV8.pm:
1786         (GenerateNormalAttrGetter):
1787         (GenerateNormalAttrSetter):
1788         (GenerateAttributeCallWith):
1789         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1790         (WebDOMTestObj::withScriptStateAttribute):
1791         (WebDOMTestObj::setWithScriptStateAttribute):
1792         (WebDOMTestObj::withScriptExecutionContextAttribute):
1793         (WebDOMTestObj::setWithScriptExecutionContextAttribute):
1794         (WebDOMTestObj::withScriptStateAttributeRaises):
1795         (WebDOMTestObj::setWithScriptStateAttributeRaises):
1796         (WebDOMTestObj::withScriptExecutionContextAttributeRaises):
1797         (WebDOMTestObj::setWithScriptExecutionContextAttributeRaises):
1798         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1799         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1800         (webkit_dom_test_obj_get_with_script_state_attribute):
1801         (webkit_dom_test_obj_set_with_script_state_attribute):
1802         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
1803         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
1804         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1805         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
1806         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1807         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
1808         (webkit_dom_test_obj_set_property):
1809         (webkit_dom_test_obj_get_property):
1810         (webkit_dom_test_obj_class_init):
1811         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1812         * bindings/scripts/test/JS/JSTestObj.cpp:
1813         (WebCore::jsTestObjWithScriptStateAttribute):
1814         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
1815         (WebCore::jsTestObjWithScriptStateAttributeRaises):
1816         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
1817         (WebCore::setJSTestObjWithScriptStateAttribute):
1818         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1819         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1820         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1821         * bindings/scripts/test/JS/JSTestObj.h:
1822         * bindings/scripts/test/ObjC/DOMTestObj.h:
1823         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1824         (-[DOMTestObj withScriptStateAttribute]):
1825         (-[DOMTestObj setWithScriptStateAttribute:]):
1826         (-[DOMTestObj withScriptExecutionContextAttribute]):
1827         (-[DOMTestObj setWithScriptExecutionContextAttribute:]):
1828         (-[DOMTestObj withScriptStateAttributeRaises]):
1829         (-[DOMTestObj setWithScriptStateAttributeRaises:]):
1830         (-[DOMTestObj withScriptExecutionContextAttributeRaises]):
1831         (-[DOMTestObj setWithScriptExecutionContextAttributeRaises:]):
1832         * bindings/scripts/test/TestObj.idl:
1833         * bindings/scripts/test/V8/V8TestObj.cpp:
1834         (WebCore::TestObjInternal::withScriptStateAttributeAttrGetter):
1835         (WebCore::TestObjInternal::withScriptStateAttributeAttrSetter):
1836         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrGetter):
1837         (WebCore::TestObjInternal::withScriptExecutionContextAttributeAttrSetter):
1838         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrGetter):
1839         (WebCore::TestObjInternal::withScriptStateAttributeRaisesAttrSetter):
1840         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrGetter):
1841         (WebCore::TestObjInternal::withScriptExecutionContextAttributeRaisesAttrSetter):
1842
1843 2012-01-18  Tim Horton  <timothy_horton@apple.com>
1844
1845         [CG] Rasterized scaling of transformed SVG shapes with gradient fill and -webkit-svg-shadow applied
1846         https://bugs.webkit.org/show_bug.cgi?id=76482
1847         <rdar://problem/10415483>
1848
1849         Reviewed by Simon Fraser.
1850
1851         Scale the CGLayer used when filling or stroking a shadowed path or rect with
1852         a gradient in GraphicsContextCG. Previously, the CGLayer was created and rendered
1853         into at the untransformed size of the shape, leading to pixelation when it was
1854         then scaled up and drawn into the destination.
1855
1856         Add AffineTransform::mapSize() to map a size through a transformation.
1857
1858         Test: svg/custom/transform-with-shadow-and-gradient.svg
1859
1860         * platform/graphics/cg/GraphicsContextCG.cpp:
1861         (WebCore::GraphicsContext::fillPath):
1862         (WebCore::GraphicsContext::strokePath):
1863         (WebCore::GraphicsContext::fillRect):
1864         (WebCore::GraphicsContext::strokeRect):
1865         * platform/graphics/transforms/AffineTransform.cpp:
1866         (WebCore::AffineTransform::mapSize): Added.
1867         * platform/graphics/transforms/AffineTransform.h:
1868
1869 2012-01-18  Dominic Mazzoni  <dmazzoni@google.com>
1870
1871         Accessibility: Chromium needs methods to scroll an object into view or to a specific location.
1872         https://bugs.webkit.org/show_bug.cgi?id=73460
1873
1874         Reviewed by Chris Fleizach.
1875
1876         Tests: platform/chromium/accessibility/scroll-to-global-point-main-window.html
1877                platform/chromium/accessibility/scroll-to-global-point-nested.html
1878                platform/chromium/accessibility/scroll-to-global-point-iframe.html
1879                platform/chromium/accessibility/scroll-to-global-point-iframe-nested.html
1880                platform/chromium/accessibility/scroll-to-make-visible-div-overflow.html
1881                platform/chromium/accessibility/scroll-to-make-visible-iframe.html
1882                platform/chromium/accessibility/scroll-to-make-visible-main-window.html
1883                platform/chromium/accessibility/scroll-to-make-visible-nested.html
1884                platform/chromium/accessibility/scroll-to-make-visible-with-subfocus.html
1885
1886         * accessibility/AccessibilityObject.cpp:
1887         (WebCore::computeBestScrollOffset):
1888         (WebCore::AccessibilityObject::scrollToMakeVisible):
1889         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
1890         (WebCore::AccessibilityObject::scrollToGlobalPoint):
1891         * accessibility/AccessibilityObject.h:
1892         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
1893         (WebCore::AccessibilityObject::scrollTo):
1894         * accessibility/AccessibilityRenderObject.cpp:
1895         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
1896         (WebCore::AccessibilityRenderObject::scrollTo):
1897         * accessibility/AccessibilityRenderObject.h:
1898         * accessibility/AccessibilityScrollView.cpp:
1899         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
1900         (WebCore::AccessibilityScrollView::scrollTo):
1901         * accessibility/AccessibilityScrollView.h:
1902
1903 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
1904
1905         file:// doesn't work as base URL
1906         https://bugs.webkit.org/show_bug.cgi?id=76496
1907
1908         Reviewed by Darin Adler.
1909
1910         Test: fast/url/degenerate-file-base.html
1911
1912         * platform/KURL.cpp: (WebCore::KURL::parse): Handle degenerate file URLs properly.
1913
1914 2012-01-18  Ilya Tikhonovsky  <loislo@chromium.org>
1915
1916         [chromium] Web Inspector: highlight DOM nodes from detached DOM trees.
1917         https://bugs.webkit.org/show_bug.cgi?id=76545
1918
1919         Reviewed by Yury Semikhatsky.
1920
1921         * inspector/front-end/DetailedHeapshotGridNodes.js:
1922         (WebInspector.HeapSnapshotGenericObjectNode):
1923         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1924         * inspector/front-end/HeapSnapshot.js:
1925         (WebInspector.HeapSnapshotNode.prototype.get isNativeRoot):
1926         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
1927         (WebInspector.HeapSnapshot.prototype._init):
1928         (WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes):
1929         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
1930         (WebInspector.HeapSnapshot.prototype._calculateFlags):
1931         * inspector/front-end/heapProfiler.css:
1932         (.detached-dom-tree-node):
1933
1934 2012-01-18  Pavel Feldman  <pfeldman@google.com>
1935
1936         Web Inspector: there should be a way to set HTML for given frame.
1937         https://bugs.webkit.org/show_bug.cgi?id=76548
1938
1939         Reviewed by Yury Semikhatsky.
1940
1941         * inspector/Inspector.json:
1942         * inspector/InspectorPageAgent.cpp:
1943         (WebCore::InspectorPageAgent::setDocumentContent):
1944         * inspector/InspectorPageAgent.h:
1945         * inspector/front-end/DOMAgent.js:
1946         (WebInspector.DOMModelResourceBinding.prototype.setContent.callbackWrapper):
1947         (WebInspector.DOMModelResourceBinding.prototype.setContent):
1948
1949 2012-01-18  Sergio Villar Senin  <svillar@igalia.com>
1950
1951         [GTK] [regression] A couple of tests failing after r105253
1952         https://bugs.webkit.org/show_bug.cgi?id=76549
1953
1954         Reviewed by Gustavo Noronha Silva.
1955
1956         Fixes a regression added by r105253. The method that
1957         RenderThemeGtk needs to overwrite is popsMenuBySpaceOrReturn()
1958         instead of popsMenuByArrowKeys().
1959
1960         No new tests as it's already covered by
1961         fast/forms/select-popup-pagekeys.html and
1962         fast/forms/select/menulist-onchange-fired-with-key-up-down.html
1963         that started to fail after the revision mentioned above.
1964
1965         * platform/gtk/RenderThemeGtk.h:
1966         (WebCore::RenderThemeGtk::popsMenuBySpaceOrReturn):
1967
1968 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
1969
1970         Web Inspector: omit compression field in HAR entries for resources coming from cache
1971         https://bugs.webkit.org/show_bug.cgi?id=76543
1972
1973         Reviewed by Yury Semikhatsky.
1974
1975         * inspector/front-end/HAREntry.js:
1976         (WebInspector.HAREntry.prototype._buildContent):
1977         (WebInspector.HAREntry.prototype.get responseCompression):
1978
1979 2012-01-18  Mihnea Ovidenie  <mihnea@adobe.com>
1980
1981         [CSSRegions]Fix region style code in CSSStyleSelector
1982         https://bugs.webkit.org/show_bug.cgi?id=76453
1983
1984         Reviewed by Antti Koivisto.
1985
1986         Follow up after comments in https://bugs.webkit.org/show_bug.cgi?id=76064.
1987         With the new approach, the css rule specificity is correctly taken into account
1988         when applying the region style rule.
1989         No new tests, the region style tests are still disabled.
1990
1991         * css/CSSStyleSelector.cpp:
1992         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
1993         (WebCore::CSSStyleSelector::CSSStyleSelector):
1994         (WebCore::CSSStyleSelector::addMatchedDeclaration):
1995         (WebCore::CSSStyleSelector::collectMatchingRules):
1996         (WebCore::CSSStyleSelector::collectMatchingRulesForRegion):
1997         (WebCore::CSSStyleSelector::matchRules):
1998         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1999         (WebCore::CSSStyleSelector::matchAllRules):
2000         (WebCore::CSSStyleSelector::styleForElement):
2001         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2002         (WebCore::CSSStyleSelector::checkRegionStyle):
2003         (WebCore::CSSStyleSelector::checkRegionSelector):
2004         (WebCore::RuleData::RuleData):
2005         (WebCore::RuleSet::RuleSet):
2006         (WebCore::RuleSet::addRule):
2007         (WebCore::RuleSet::addRegionRule):
2008         (WebCore::RuleSet::addRulesFromSheet):
2009         (WebCore::isInsideRegionRule):
2010         (WebCore::CSSStyleSelector::applyDeclaration):
2011         (WebCore::CSSStyleSelector::applyDeclarations):
2012         (WebCore::CSSStyleSelector::isValidRegionStyleProperty):
2013         (WebCore::CSSStyleSelector::applyProperty):
2014         * css/CSSStyleSelector.h:
2015
2016 2012-01-17  Jer Noble  <jer.noble@apple.com>
2017
2018         Mac fails to fire an 'error' event for a <video> <source> having an URL with no file extension
2019         https://bugs.webkit.org/show_bug.cgi?id=76494
2020
2021         Reviewed by Eric Carlson.
2022
2023         No new tests; fixes compositing/video/video-with-invalid-source.html. Modified 
2024         media/video-source-error-no-candidate.html to check error condition.
2025
2026         When we run out of media engines for a given resource, inform the media player client
2027         that resource loading failed by calling mediaPlayerResourceNotSupported().
2028
2029         * html/HTMLMediaElement.cpp:
2030         (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
2031         * html/HTMLMediaElement.h:
2032         * platform/graphics/MediaPlayer.cpp:
2033         (WebCore::MediaPlayer::loadWithNextMediaEngine):
2034         * platform/graphics/MediaPlayer.h:
2035         (WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
2036
2037 2012-01-18  Alexandru Chiculita  <achicu@adobe.com>
2038
2039         CSS Shaders: Parse float parameters for the custom() filter syntax
2040         https://bugs.webkit.org/show_bug.cgi?id=76253
2041
2042         Reviewed by Nikolas Zimmermann.
2043
2044         Custom CSS filters allow passing parameters from CSS to the underlying rendering technology (in this case WebGL Shaders).
2045         This patch adds support for parameters of types float, vec2, vec3 and vec4.
2046
2047         https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustomParamsAttribute
2048
2049         Tests: css3/filters/effect-custom-combined-missing.html
2050                css3/filters/effect-custom-parameters.html
2051
2052         * GNUmakefile.list.am:
2053         * Target.pri:
2054         * WebCore.gypi:
2055         * WebCore.vcproj/WebCore.vcproj:
2056         * WebCore.xcodeproj/project.pbxproj:
2057             Added CustomFilterParameter.h, CustomFilterNumberParameter.h and CustomFilterOperation.cpp to the projects.
2058
2059         * css/CSSComputedStyleDeclaration.cpp:
2060         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter):
2061         (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterParameter):
2062         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2063             Added the computed parameters in alphabetic order (CustomFilterOperation always keeps the parameters sorted).
2064         * css/CSSComputedStyleDeclaration.h:
2065         * css/CSSStyleSelector.cpp:
2066         (WebCore::sortParametersByNameComparator):
2067         (WebCore::CSSStyleSelector::parseCustomFilterNumberParamter):
2068         (WebCore::CSSStyleSelector::parseCustomFilterParameterList):
2069         (WebCore::CSSStyleSelector::createCustomFilterOperation):
2070             Added parsing for float, vec2, vec3 and vec4. The values are space separated.
2071
2072         * css/CSSStyleSelector.h:
2073         * platform/graphics/filters/CustomFilterNumberParameter.h: Added.
2074         (WebCore::CustomFilterNumberParameter::create):
2075         (WebCore::CustomFilterNumberParameter::size):
2076         (WebCore::CustomFilterNumberParameter::valueAt):
2077         (WebCore::CustomFilterNumberParameter::addValue):
2078         (WebCore::CustomFilterNumberParameter::CustomFilterNumberParameter):
2079
2080         * platform/graphics/filters/CustomFilterOperation.cpp: Added.
2081         (WebCore::CustomFilterOperation::CustomFilterOperation):
2082         (WebCore::CustomFilterOperation::~CustomFilterOperation):
2083             Moved constructor and destructor in CustomFilterOperation.cpp to avoid including CustomFilterParameter everywhere.
2084         (WebCore::CustomFilterOperation::hasSortedParameterList):
2085             Debug runtime check that we always have parameters in alphabetic order.
2086
2087         * platform/graphics/filters/CustomFilterOperation.h:
2088         (WebCore::CustomFilterOperation::create):
2089         (WebCore::CustomFilterOperation::parameters):
2090             Just added the parameters list. Not using a map, but keeping the items sorted by name. We need them sorted
2091             to make it easy and fast to merge two CustomFilterOperations during animations.
2092
2093         * platform/graphics/filters/CustomFilterParameter.h: Added.
2094         (WebCore::CustomFilterParameter::~CustomFilterParameter):
2095         (WebCore::CustomFilterParameter::parameterType):
2096         (WebCore::CustomFilterParameter::name):
2097         (WebCore::CustomFilterParameter::CustomFilterParameter):
2098         * platform/graphics/filters/CustomFilterShader.cpp:
2099         (WebCore::CustomFilterShader::uniformLocationByName):
2100         * platform/graphics/filters/CustomFilterShader.h:
2101
2102         * platform/graphics/filters/FECustomFilter.cpp:
2103         (WebCore::FECustomFilter::FECustomFilter):
2104         (WebCore::FECustomFilter::create):
2105         (WebCore::FECustomFilter::platformApplySoftware):
2106         (WebCore::FECustomFilter::bindProgramNumberParameters):
2107         (WebCore::FECustomFilter::bindProgramParameters):
2108             Added code that maps the parameters from CSS to WebGL.
2109         (WebCore::FECustomFilter::bindProgramAndBuffers):
2110         * platform/graphics/filters/FECustomFilter.h:
2111
2112         * rendering/FilterEffectRenderer.cpp:
2113         (WebCore::FilterEffectRenderer::build):
2114             Fixed a case when the filter was not created, letting the filter add itself as a source of its own. 
2115             Also added a test case for this particular case: css3/filters/effect-custom-combined-missing.html.
2116
2117 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
2118
2119         Web Inspector: resource tree model leaks frames
2120         https://bugs.webkit.org/show_bug.cgi?id=76533
2121
2122         Reviewed by Pavel Feldman.
2123
2124         * inspector/front-end/ResourceTreeModel.js:
2125         (WebInspector.ResourceTreeModel.prototype._frameDetached):
2126         (WebInspector.ResourceTreeModel.prototype._removeFrame):
2127         (WebInspector.ResourceTreeFrame.prototype._removeChildFrame):
2128
2129 2012-01-17  Vsevolod Vlasov  <vsevik@chromium.org>
2130
2131         Web Inspector: Enable support for Open Script dialog based on FilteredItemSelectionDialog.
2132         https://bugs.webkit.org/show_bug.cgi?id=76466
2133
2134         Reviewed by Pavel Feldman.
2135
2136         * English.lproj/localizedStrings.js:
2137         * inspector/front-end/FilteredItemSelectionDialog.js:
2138         (WebInspector.JavaScriptOutlineDialog.createShortcut):
2139         (WebInspector.OpenResourceDialog.filterOutEmptyURLs):
2140         (WebInspector.OpenResourceDialog):
2141         (WebInspector.OpenResourceDialog.install):
2142         (WebInspector.OpenResourceDialog._show):
2143         (WebInspector.OpenResourceDialog.createShortcut):
2144         (WebInspector.OpenResourceDialog.prototype.itemTitleAt):
2145         (WebInspector.OpenResourceDialog.prototype.itemKeyAt):
2146         (WebInspector.OpenResourceDialog.prototype.itemsCount):
2147         (WebInspector.OpenResourceDialog.prototype.requestItems):
2148         (WebInspector.OpenResourceDialog.prototype.selectItem):
2149         * inspector/front-end/ScriptsPanel.js:
2150         (WebInspector.ScriptsPanel.prototype.showUISourceCode):
2151
2152 2012-01-18  Pavel Feldman  <pfeldman@google.com>
2153
2154         Not reviewed: follow up to r105262, fixing front-end compilation.
2155
2156         * inspector/front-end/DOMAgent.js:
2157         (WebInspector.DOMDocument):
2158         (WebInspector.DOMModelResourceBinding.prototype.setContent.setOuterHTML):
2159
2160 2012-01-17  Pavel Feldman  <pfeldman@google.com>
2161
2162         Web Inspector: track HTML revisions when editing DOM and / or upon free flow edits.
2163         https://bugs.webkit.org/show_bug.cgi?id=76457
2164
2165         Reviewed by Yury Semikhatsky.
2166
2167         Test: inspector/elements/set-html-via-resource.html
2168
2169         * inspector/DOMEditor.cpp:
2170         (WebCore::DOMEditor::patchNode):
2171         * inspector/InspectorDOMAgent.cpp:
2172         (WebCore::InspectorDOMAgent::getOuterHTML):
2173         (WebCore::InspectorDOMAgent::setOuterHTML):
2174         (WebCore::InspectorDOMAgent::buildObjectForNode):
2175         * inspector/front-end/DOMAgent.js:
2176         (WebInspector.DOMNode):
2177         (WebInspector.DOMNode.prototype.setNodeName):
2178         (WebInspector.DOMNode.prototype.setNodeValue):
2179         (WebInspector.DOMNode.prototype.setAttribute):
2180         (WebInspector.DOMNode.prototype.setAttributeValue):
2181         (WebInspector.DOMNode.prototype.removeAttribute):
2182         (WebInspector.DOMNode.prototype.getChildNodes.mycallback):
2183         (WebInspector.DOMNode.prototype.getChildNodes):
2184         (WebInspector.DOMNode.prototype.setOuterHTML):
2185         (WebInspector.DOMNode.prototype.removeNode):
2186         (WebInspector.DOMNode.prototype.moveTo):
2187         (WebInspector.DOMDocument):
2188         (WebInspector.DOMAgent):
2189         (WebInspector.DOMAgent.prototype._setDocument):
2190         (WebInspector.DOMAgent.prototype._buildHighlightConfig):
2191         (WebInspector.DOMAgent.prototype._markRevision):
2192         (WebInspector.DOMAgent.prototype._captureDOM.callback):
2193         (WebInspector.DOMAgent.prototype._captureDOM):
2194         (WebInspector.DOMModelResourceBinding.prototype.setContent):
2195         (WebInspector.DOMModelResourceBinding.prototype.setContent.setOuterHTML):
2196         (WebInspector.DOMModelResourceBinding.prototype.setContent.withDocument):
2197         * inspector/front-end/ElementsTreeOutline.js:
2198         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
2199
2200 2012-01-18  Andrey Kosyakov  <caseq@chromium.org>
2201
2202         Web Inspector: Popover does not disappear, causes debugger failure.
2203         https://bugs.webkit.org/show_bug.cgi?id=71363
2204
2205         Reviewed by Pavel Feldman.
2206
2207         This is a work-around simple enough for a merge. The real fix would
2208         be to get TextViewer to manage the highlight on its own, so it's not
2209         accidently removed while re-building DOM for the text chunk.
2210
2211         * inspector/front-end/JavaScriptSourceFrame.js:
2212         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
2213
2214 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
2215
2216         Unreviewed build fix.
2217         https://bugs.webkit.org/show_bug.cgi?id=76525
2218
2219         Removed missing build headers.
2220
2221         * WebCore.xcodeproj/project.pbxproj:
2222
2223 2012-01-18  Jun Mukai  <mukai@chromium.org>
2224
2225         Use RenderTheme in HTMLSelectElement instead of #defines.
2226         <http://webkit.org/b/76519>
2227
2228         Reviewed by Kent Tamura.
2229
2230         Tests: no new tests because of no behavioral changes.
2231
2232         * html/HTMLSelectElement.cpp:
2233         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
2234         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2235         * platform/gtk/RenderThemeGtk.h:
2236         (WebCore::RenderThemeGtk::popsMenuByArrowKeys):
2237         * rendering/RenderTheme.h:
2238         (WebCore::RenderTheme::popsMenuByArrowKeys):
2239         (WebCore::RenderTheme::popsMenuBySpaceOrReturn):
2240         * rendering/RenderThemeChromiumLinux.h:
2241         (WebCore::RenderThemeChromiumLinux::popsMenuBySpaceOrReturn):
2242         * rendering/RenderThemeMac.h:
2243         (WebCore::RenderThemeMac::popsMenuByArrowKeys):
2244
2245 2012-01-18  Abhishek Arya  <inferno@chromium.org>
2246
2247         Crash in FrameView::forceLayoutParentViewIfNeeded.        
2248         https://bugs.webkit.org/show_bug.cgi?id=76309
2249
2250         Reviewed by Nikolas Zimmermann.
2251
2252         updateWidgetPositions can blow away the owning renderer
2253         and its frameview, so need to protect it with refptr.
2254
2255         Test: svg/dom/parent-view-layout-crash.html
2256
2257         * page/FrameView.cpp:
2258         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2259
2260 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
2261
2262         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
2263         https://bugs.webkit.org/show_bug.cgi?id=76241
2264
2265         Reviewed by Dimitri Glazkov.
2266
2267         Renamed ShadowContentElement to HTMLContentElement, and move it from dom/ to html/.
2268         Also, ShadowInclusionSelector and ShadowContentSelectorQuery are renamed to
2269         Content InclusionSelector and ContentSelectorQuery respectively.
2270
2271         No new tests, because no change in behavior.
2272
2273         * CMakeLists.txt:
2274         * GNUmakefile.list.am:
2275         * Target.pri:
2276         * WebCore.exp.in:
2277         * WebCore.gypi:
2278         * WebCore.vcproj/WebCore.vcproj:
2279         * WebCore.xcodeproj/project.pbxproj:
2280         * dom/DOMAllInOne.cpp:
2281         * dom/NodeRenderingContext.cpp:
2282         (WebCore::nextRendererOf):
2283         (WebCore::previousRendererOf):
2284         (WebCore::firstRendererOf):
2285         (WebCore::lastRendererOf):
2286         (WebCore::NodeRenderingContext::nextRenderer):
2287         (WebCore::NodeRenderingContext::previousRenderer):
2288         * dom/NodeRenderingContext.h:
2289         (WebCore::NodeRenderingContext::includer):
2290         * dom/ShadowRoot.cpp:
2291         (WebCore::ShadowRoot::includerFor):
2292         (WebCore::ShadowRoot::inclusions):
2293         (WebCore::ShadowRoot::ensureInclusions):
2294         * dom/ShadowRoot.h:
2295         * html/HTMLDetailsElement.cpp:
2296         (WebCore::DetailsContentElement::DetailsContentElement):
2297         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
2298         * html/HTMLElementsAllInOne.cpp:
2299         * html/HTMLSummaryElement.cpp:
2300         (WebCore::SummaryContentElement::SummaryContentElement):
2301         * html/shadow/ContentInclusionSelector.cpp: Renamed from Source/WebCore/dom/ShadowInclusionSelector.cpp.
2302         (WebCore::ShadowInclusion::append):
2303         (WebCore::ShadowInclusion::unlink):
2304         (WebCore::ShadowInclusionList::ShadowInclusionList):
2305         (WebCore::ShadowInclusionList::~ShadowInclusionList):
2306         (WebCore::ShadowInclusionList::find):
2307         (WebCore::ShadowInclusionList::clear):
2308         (WebCore::ShadowInclusionList::append):
2309         (WebCore::ContentInclusionSelector::ContentInclusionSelector):
2310         (WebCore::ContentInclusionSelector::~ContentInclusionSelector):
2311         (WebCore::ContentInclusionSelector::select):
2312         (WebCore::ContentInclusionSelector::unselect):
2313         (WebCore::ContentInclusionSelector::findFor):
2314         (WebCore::ContentInclusionSelector::didSelect):
2315         (WebCore::ContentInclusionSelector::willSelectOver):
2316         * html/shadow/ContentInclusionSelector.h: Renamed from Source/WebCore/dom/ShadowInclusionSelector.h.
2317         (WebCore::ShadowInclusion::includer):
2318         (WebCore::ShadowInclusion::content):
2319         (WebCore::ShadowInclusion::next):
2320         (WebCore::ShadowInclusion::previous):
2321         (WebCore::ShadowInclusion::ShadowInclusion):
2322         (WebCore::ShadowInclusion::create):
2323         (WebCore::ShadowInclusionList::first):
2324         (WebCore::ShadowInclusionList::last):
2325         (WebCore::ShadowInclusionList::isEmpty):
2326         (WebCore::ShadowInclusionSet::add):
2327         (WebCore::ShadowInclusionSet::remove):
2328         (WebCore::ShadowInclusionSet::isEmpty):
2329         (WebCore::ShadowInclusionSet::Translator::hash):
2330         (WebCore::ShadowInclusionSet::Translator::equal):
2331         (WebCore::ShadowInclusionSet::Hash::hash):
2332         (WebCore::ShadowInclusionSet::Hash::equal):
2333         (WebCore::ShadowInclusionSet::find):
2334         (WebCore::ContentInclusionSelector::hasCandidates):
2335         * html/shadow/ContentSelectorQuery.cpp: Renamed from Source/WebCore/dom/ShadowContentSelectorQuery.cpp.
2336         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
2337         (WebCore::ContentSelectorQuery::matches):
2338         * html/shadow/ContentSelectorQuery.h: Renamed from Source/WebCore/dom/ShadowContentSelectorQuery.h.
2339         * html/shadow/HTMLContentElement.cpp: Renamed from Source/WebCore/dom/ShadowContentElement.cpp.
2340         (WebCore::HTMLContentElement::create):
2341         (WebCore::HTMLContentElement::HTMLContentElement):
2342         (WebCore::HTMLContentElement::~HTMLContentElement):
2343         (WebCore::HTMLContentElement::attach):
2344         (WebCore::HTMLContentElement::detach):
2345         (WebCore::HTMLContentElement::select):
2346         (WebCore::HTMLContentElement::setSelect):
2347         * html/shadow/HTMLContentElement.h: Renamed from Source/WebCore/dom/ShadowContentElement.h.
2348         (WebCore::HTMLContentElement::inclusions):
2349         (WebCore::HTMLContentElement::isContentElement):
2350         (WebCore::HTMLContentElement::rendererIsNeeded):
2351         (WebCore::HTMLContentElement::createRenderer):
2352         (WebCore::toHTMLContentElement):
2353         * testing/Internals.cpp:
2354         (WebCore::Internals::createContentElement):
2355         * testing/Internals.h:
2356         * testing/Internals.idl:
2357
2358 2012-01-17  Nikolas Zimmermann  <nzimmermann@rim.com>
2359
2360         RenderSVGRoot should inherit from RenderReplaced
2361         https://bugs.webkit.org/show_bug.cgi?id=76446
2362
2363         Reviewed by Zoltan Herczeg.
2364
2365         Let RenderSVGRoot inherit from RenderReplaced, instead of faking RenderReplaced, by inherting from RenderBox
2366         and calling setReplaced(true) in the constructor. The outermost <svg> element is a replaced element in the
2367         sense of CSS, and thus this is just a logical move. It fixes some issues where the <svg> root appeared
2368         as selection leaf, covered by existing tests.
2369
2370         It allows us to simplify the painting, as outlines, etc. are painted by RenderReplaced now.
2371         While I was it, speed up the local to border box computations by caching the result.
2372
2373         * rendering/RenderReplaced.cpp:
2374         (WebCore::RenderReplaced::paint):
2375         * rendering/svg/RenderSVGRoot.cpp:
2376         (WebCore::RenderSVGRoot::RenderSVGRoot):
2377         (WebCore::RenderSVGRoot::layout):
2378         (WebCore::RenderSVGRoot::paintReplaced):
2379         (WebCore::RenderSVGRoot::willBeDestroyed):
2380         (WebCore::RenderSVGRoot::styleWillChange):
2381         (WebCore::RenderSVGRoot::styleDidChange):
2382         (WebCore::RenderSVGRoot::updateFromElement):
2383         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
2384         (WebCore::RenderSVGRoot::localToParentTransform):
2385         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
2386         (WebCore::RenderSVGRoot::mapLocalToContainer):
2387         (WebCore::RenderSVGRoot::nodeAtPoint):
2388         * rendering/svg/RenderSVGRoot.h:
2389         (WebCore::RenderSVGRoot::canHaveChildren):
2390         (WebCore::RenderSVGRoot::canBeSelectionLeaf):
2391         * svg/SVGSVGElement.cpp:
2392         (WebCore::SVGSVGElement::setupInitialView):
2393
2394 2012-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2395
2396         Unreviewed, rolling out r105244.
2397         http://trac.webkit.org/changeset/105244
2398         https://bugs.webkit.org/show_bug.cgi?id=76518
2399
2400         broke Chromium Mac (Requested by rolandsteiner on #webkit).
2401
2402         * accessibility/AccessibilityObject.cpp:
2403         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2404         * accessibility/AccessibilityObject.h:
2405         * accessibility/AccessibilityRenderObject.cpp:
2406         * accessibility/AccessibilityRenderObject.h:
2407         * accessibility/AccessibilityScrollView.cpp:
2408         * accessibility/AccessibilityScrollView.h:
2409
2410 2012-01-17  Hajime Morrita  <morrita@chromium.org>
2411
2412         [Internals] Should be able to access corresponding Document object.
2413         https://bugs.webkit.org/show_bug.cgi?id=76425
2414
2415         Reviewed by Adam Barth.
2416
2417         - Allow FrameDestructionObserver to re-setting the Frame reference.
2418         - Make Internals a subclass of FrameDestructionObserver.
2419
2420         Since Internals::reset() is called for each test, we can access
2421         the acive Frame object during the test. The frame reference will be
2422         used by coming changes.
2423
2424         No new tests. Covered by existing tests.
2425
2426         * WebCore.exp.in:
2427         * page/FrameDestructionObserver.cpp:
2428         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
2429         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
2430         (WebCore::FrameDestructionObserver::observe):
2431         * page/FrameDestructionObserver.h:
2432         * testing/Internals.cpp:
2433         (WebCore::Internals::Internals):
2434         (WebCore::Internals::reset):
2435         * testing/Internals.h:
2436
2437 2012-01-17  Dominic Mazzoni  <dmazzoni@google.com>
2438
2439         Accessibility: Chromium needs methods to scroll an object into view or to a specific location.
2440         https://bugs.webkit.org/show_bug.cgi?id=73460
2441
2442         Reviewed by Chris Fleizach.
2443
2444         Tests: platform/chromium/accessibility/scroll-to-global-point-main-window.html
2445                platform/chromium/accessibility/scroll-to-global-point-nested.html
2446                platform/chromium/accessibility/scroll-to-make-visible-div-overflow.html
2447                platform/chromium/accessibility/scroll-to-make-visible-iframe.html
2448                platform/chromium/accessibility/scroll-to-make-visible-main-window.html
2449                platform/chromium/accessibility/scroll-to-make-visible-nested.html
2450                platform/chromium/accessibility/scroll-to-make-visible-with-subfocus.html
2451
2452         * accessibility/AccessibilityObject.cpp:
2453         (WebCore::computeBestScrollOffset):
2454         (WebCore::AccessibilityObject::scrollToMakeVisible):
2455         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
2456         (WebCore::AccessibilityObject::scrollToGlobalPoint):
2457         * accessibility/AccessibilityObject.h:
2458         (WebCore::AccessibilityObject::getScrollableAreaIfScrollable):
2459         (WebCore::AccessibilityObject::scrollTo):
2460         * accessibility/AccessibilityRenderObject.cpp:
2461         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
2462         (WebCore::AccessibilityRenderObject::scrollTo):
2463         * accessibility/AccessibilityRenderObject.h:
2464         * accessibility/AccessibilityScrollView.cpp:
2465         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
2466         (WebCore::AccessibilityScrollView::scrollTo):
2467         * accessibility/AccessibilityScrollView.h:
2468
2469 2012-01-17  Joe Thomas  <joethomas@motorola.com>
2470
2471         https://bugs.webkit.org/show_bug.cgi?id=75089
2472         Access-Control-Request-Headers value should be lowercase
2473
2474         Access-Control-Request-Headers is used when issuing a preflight request to let the server know
2475         the HTTP headers that will be used when the actual request is made.
2476         As per the W3C specification, Access-Control-Request-Headers value should be set in lowercase.
2477
2478         Reviewed by Alexey Proskuryakov.
2479
2480         Test: http/tests/xmlhttprequest/access-control-preflight-request-header-lowercase.html
2481
2482         * loader/CrossOriginAccessControl.cpp:
2483         (WebCore::createAccessControlPreflightRequest): setting Access-Control-Request-Headers value to lowercase
2484
2485 2012-01-17  Hayato Ito  <hayato@chromium.org>
2486
2487         Clean EventContext and move phase-tweaking logic to EventDispatcher.
2488         https://bugs.webkit.org/show_bug.cgi?id=76414
2489
2490         Reviewed by Dimitri Glazkov.
2491
2492         No tests. No change in behavior.
2493
2494         * dom/EventContext.cpp:
2495         (WebCore::EventContext::handleLocalEvents):
2496         * dom/EventContext.h:
2497         (WebCore::EventContext::currentTargetSameAsTarget):
2498         * dom/EventDispatcher.cpp:
2499         (WebCore::EventDispatcher::dispatchEvent):
2500
2501 2012-01-17  David Levin  <levin@chromium.org>
2502
2503         Need to figure out which assert is firing when worker-read-blob-async.html fails.
2504         https://bugs.webkit.org/show_bug.cgi?id=76503
2505
2506         Reviewed by Adam Barth.
2507
2508         No new functionality exposed so no new tests.
2509
2510         This is just a quick and dirty way to make these asserts unique
2511         to expose which one of them is firing on a machine that doesn't have a
2512         good stack trace.
2513
2514         * dom/ActiveDOMObject.cpp:
2515         (WebCore::ContextDestructionObserver::ContextDestructionObserver):
2516         (WebCore::ContextDestructionObserver::~ContextDestructionObserver):
2517         (WebCore::ActiveDOMObject::ActiveDOMObject):
2518         (WebCore::ActiveDOMObject::~ActiveDOMObject):
2519         * storage/DatabaseSync.cpp:
2520         (WebCore::DatabaseSync::openDatabaseSync):
2521         (WebCore::DatabaseSync::~DatabaseSync):
2522         (WebCore::DatabaseSync::changeVersion):
2523         (WebCore::DatabaseSync::runTransaction):
2524
2525 2012-01-17  Matthew Delaney  <mdelaney@apple.com>
2526
2527         On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier.
2528         <rdar://problem/10692025>
2529
2530         Reviewed by Simon Fraser.
2531
2532         * platform/mac/WebCoreSystemInterface.h: Added in new function for checking if linked-on-or-before Lion.
2533         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2534
2535 2012-01-17  Yongsheng Zhu  <yongsheng.zhu@intel.com>
2536
2537         Clear 'm_size' of DrawingBuffer in the 'clear' function
2538         https://bugs.webkit.org/show_bug.cgi?id=76239
2539
2540         Reviewed by Kenneth Russell.
2541         
2542         Clear the resources of DrawingBuffer but don't clear 'm_size'. This makes
2543         's_currentResourceUsePixels' is not calculated correctly.
2544
2545         * platform/graphics/gpu/DrawingBuffer.cpp:
2546         (WebCore::DrawingBuffer::clear):
2547
2548 2012-01-17  Philip Rogers  <pdr@google.com>
2549
2550         Fix getBBox for perpendicular paths
2551         https://bugs.webkit.org/show_bug.cgi?id=76177
2552
2553         Reviewed by Darin Adler.
2554
2555         Test: svg/custom/getBBox-perpendicular-path.svg
2556
2557         * platform/graphics/FloatRect.cpp:
2558         (WebCore::FloatRect::unite):
2559         (WebCore::FloatRect::uniteEvenIfEmpty):
2560         (WebCore::FloatRect::uniteIfNonZero):
2561         * platform/graphics/FloatRect.h:
2562         * rendering/svg/SVGRenderSupport.cpp:
2563         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2564
2565 2012-01-17  Kenneth Russell  <kbr@google.com>
2566
2567         [chromium] Apply color profiles in more cases
2568         https://bugs.webkit.org/show_bug.cgi?id=76498
2569
2570         Reviewed by Stephen White.
2571
2572         Not adding new tests, as application of the color profile is not
2573         guaranteed for images used as textures in WebGL. Ran existing
2574         WebGL layout tests; all pass.
2575
2576         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
2577         (WebCore::ImageFrame::setStatus):
2578 2012-01-17  Nate Chapin  <japhet@chromium.org>
2579
2580         Ensure we don't cancel revalidation of a CachedResource
2581         in the middle of successful revalidation.
2582         It's more reliable to enforce this in CachedResource than in
2583         SubresourceLoader.
2584         https://bugs.webkit.org/show_bug.cgi?id=75713
2585
2586         Reviewed by Adam Barth.
2587
2588         No new test, the buggy case requires a non-stubbed window.print().
2589
2590         * loader/SubresourceLoader.cpp:
2591         (WebCore::SubresourceLoader::didReceiveResponse):
2592         (WebCore::SubresourceLoader::didFinishLoading):
2593         * loader/SubresourceLoader.h:
2594         * loader/cache/CachedResource.cpp:
2595         (WebCore::CachedResource::CachedResource):
2596         (WebCore::CachedResource::clearResourceToRevalidate):
2597         (WebCore::CachedResource::switchClientsToRevalidatedResource):
2598         * loader/cache/CachedResource.h:
2599
2600 2012-01-17  Stephen Chenney  <schenney@chromium.org>
2601
2602         NULL ptr in WebCore::RenderSVGInlineText::localCaretRect
2603         https://bugs.webkit.org/show_bug.cgi?id=75851
2604
2605         Reviewed by Ryosuke Niwa.
2606
2607         Added a check for null box in localCaretRect, to match test in other
2608         implementations. Adding a manual test because the crash is not reproducible
2609         in DRT.
2610
2611         Test: ManualTests/svg-modify-deleted-selection.svg
2612
2613         * rendering/svg/RenderSVGInlineText.cpp:
2614         (WebCore::RenderSVGInlineText::localCaretRect):
2615
2616 2012-01-17  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2617
2618         Uint8ClampedArray support
2619         https://bugs.webkit.org/show_bug.cgi?id=74455
2620
2621         Reviewed by Filip Pizlo.
2622
2623         Test: fast/js/dfg-uint8clampedarray.html
2624
2625         * CMakeLists.txt:
2626         * DerivedSources.cpp:
2627         * DerivedSources.make:
2628         * DerivedSources.pri:
2629         * ForwardingHeaders/wtf/Uint8ClampedArray.h: Added.
2630         * GNUmakefile.list.am:
2631         * Target.pri:
2632         * UseJSC.cmake:
2633         * WebCore.xcodeproj/project.pbxproj:
2634         * bindings/js/JSBindingsAllInOne.cpp:
2635         * bindings/js/JSDOMWindowCustom.cpp:
2636         * bindings/js/JSUint8ClampedArrayCustom.cpp: Added.
2637         (WebCore::JSUint8ClampedArray::indexSetter):
2638         (WebCore::toJS):
2639         (WebCore::JSUint8ClampedArray::set):
2640         (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray):
2641         * bindings/scripts/CodeGeneratorJS.pm:
2642         (IsTypedArrayType):
2643         (GenerateHeader):
2644         * html/canvas/Uint8ClampedArray.idl: Added.
2645         * page/DOMWindow.idl:
2646
2647 2012-01-17  Abhishek Arya  <inferno@chromium.org>
2648
2649         Crash in in WebCore::EventHandler::mouseMoved.
2650         https://bugs.webkit.org/show_bug.cgi?id=76462
2651
2652         Reviewed by Ryosuke Niwa.
2653
2654         handleMouseMoveEvent call in EventHandler::mouseMoved can
2655         blow away the frame from underneath. Protect it with a frameview
2656         refptr.        
2657
2658         Test: fast/events/mouse-moved-remove-frame-crash.html
2659
2660         * page/EventHandler.cpp:
2661         (WebCore::EventHandler::mouseMoved):
2662
2663 2012-01-17  Sam Weinig  <sam@webkit.org>
2664
2665         Add helper macro for forward declaring objective-c classes
2666         https://bugs.webkit.org/show_bug.cgi?id=76485
2667
2668         Reviewed by Anders Carlsson.
2669
2670         * accessibility/AccessibilityObject.h:
2671         * bindings/js/ScriptController.h:
2672         * bridge/objc/objc_utility.h:
2673         * page/DragClient.h:
2674         * page/EditorClient.h:
2675         * platform/AutodrainedPool.h:
2676         * platform/ContextMenuItem.h:
2677         * platform/Cursor.h:
2678         * platform/DragData.h:
2679         * platform/DragImage.h:
2680         * platform/KURL.h:
2681         * platform/Pasteboard.h:
2682         * platform/PlatformKeyboardEvent.h:
2683         * platform/PlatformMenuDescription.h:
2684         * platform/PlatformScreen.h:
2685         * platform/SharedBuffer.h:
2686         * platform/Widget.h:
2687         * platform/cf/SchedulePair.h:
2688         * platform/graphics/BitmapImage.h:
2689         * platform/graphics/FontPlatformData.h:
2690         * platform/graphics/GraphicsContext3D.h:
2691         * platform/graphics/GraphicsLayer.h:
2692         * platform/graphics/Icon.h:
2693         * platform/graphics/Image.h:
2694         * platform/graphics/MediaPlayer.h:
2695         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2696         * platform/graphics/ca/PlatformCAAnimation.h:
2697         * platform/graphics/ca/mac/TileCache.h:
2698         * platform/graphics/mac/ColorMac.h:
2699         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2700         * platform/graphics/mac/MediaPlayerProxy.h:
2701         * platform/mac/ClipboardMac.h:
2702         * platform/mac/LocalCurrentGraphicsContext.h:
2703         * platform/mac/PasteboardHelper.h:
2704         * platform/mac/PopupMenuMac.h:
2705         * platform/mac/ScrollAnimatorMac.h:
2706         * platform/mac/WebCoreSystemInterface.h:
2707         * platform/network/ResourceHandle.h:
2708         * platform/network/ResourceHandleClient.h:
2709         * platform/network/ResourceHandleInternal.h:
2710         * platform/network/cf/AuthenticationChallenge.h:
2711         * platform/network/cf/ResourceError.h:
2712         * platform/network/cf/ResourceRequest.h:
2713         * platform/network/cf/ResourceResponse.h:
2714         * rendering/RenderThemeMac.h:
2715         Deploy OBJC_CLASS for a little code reduction.
2716
2717 2012-01-17  Andreas Kling  <awesomekling@apple.com>
2718
2719         SpaceSplitString: Share equivalent string piece vectors.
2720         <http://webkit.org/b/76458>
2721
2722         Reviewed by Antti Koivisto.
2723
2724         Make SpaceSplitStringData ref-counted and cache them in a hashmap to reduce memory
2725         usage and avoid redundant string splitting work.  This reduces memory consumption
2726         by 618 kB (on 64-bit) when viewing the full HTML5 spec at <http://whatwg.org/c>
2727
2728         * dom/SpaceSplitString.h:
2729
2730             Add the source string to SpaceSplitStringData so we have a key for uncaching
2731             in the destructor. Also bumped the vector's inline size from 2 to 4.
2732
2733         * dom/SpaceSplitString.cpp:
2734         (WebCore::sharedDataMap):
2735         (WebCore::SpaceSplitStringData::create):
2736         (WebCore::SpaceSplitStringData::createUnique):
2737         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
2738         (WebCore::SpaceSplitString::SpaceSplitString):
2739         (WebCore::SpaceSplitString::set):
2740         (WebCore::SpaceSplitStringData::createVector):
2741
2742             Added create helpers for SpaceSplitStringData. Moved case folding from
2743             createVector() to create(AtomicString). Added a hash map for caching
2744             AtomicString -> SpaceSplitStringData.
2745
2746         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
2747
2748             Remove the SpaceSplitStringData from the sharedDataMap().
2749
2750         * dom/SpaceSplitString.cpp:
2751         (WebCore::SpaceSplitString::ensureUnique):
2752
2753             Added, detaches from the shared SpaceSplitStringData if necessary.
2754
2755         (WebCore::SpaceSplitStringData::add):
2756         (WebCore::SpaceSplitStringData::remove):
2757
2758             Assert that add() and remove() are only used on unique SpaceSplitStringData.
2759
2760         (WebCore::SpaceSplitString::add):
2761         (WebCore::SpaceSplitString::remove):
2762
2763             Call ensureUnique() to potentially detach from a shared SpaceSplitStringData
2764             before making modifications.
2765
2766         * dom/SpaceSplitString.cpp:
2767         (WebCore::SpaceSplitStringData::containsAll):
2768
2769             Added gratuitous fast path for containsAll(*this).
2770
2771 2012-01-12  David Hyatt  <hyatt@apple.com>
2772
2773         https://bugs.webkit.org/show_bug.cgi?id=76197
2774         
2775         Implementation of baseline grid alignment. This patch implements line grid tracking in the layout state,
2776         and also implements the snapping of lines to baselines. It works with normal flow, positioning and floats and
2777         with pagination, as long as the grid is inside the pagination context and not outside.
2778
2779         Reviewed by Simon Fraser.
2780
2781         Added a bunch of new tests in fast/line-grid.
2782
2783         * WebCore.xcodeproj/project.pbxproj:
2784         * rendering/InlineFlowBox.h:
2785         (WebCore::InlineFlowBox::setHasTextChildren):
2786         * rendering/LayoutState.cpp:
2787         (WebCore::LayoutState::LayoutState):
2788         (WebCore::LayoutState::propagateLineGridInfo):
2789         (WebCore::LayoutState::establishLineGrid):
2790         * rendering/LayoutState.h:
2791         (WebCore::LayoutState::LayoutState):
2792         (WebCore::LayoutState::pageLogicalHeight):
2793         (WebCore::LayoutState::currentLineGrid):
2794         (WebCore::LayoutState::currentLineGridOffset):
2795         (WebCore::LayoutState::layoutOffset):
2796         (WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout):
2797         * rendering/RenderBlock.cpp:
2798         (WebCore::RenderBlock::layoutBlockChildren):
2799         (WebCore::RenderBlock::layoutPositionedObjects):
2800         (WebCore::RenderBlock::insertFloatingObject):
2801         (WebCore::RenderBlock::positionNewFloats):
2802         (WebCore::RenderBlock::pageLogicalTopForOffset):
2803         (WebCore::RenderBlock::adjustLinePositionForPagination):
2804         * rendering/RenderBlock.h:
2805         (WebCore::RenderBlock::lineGridBox):
2806         (WebCore::RenderBlock::setLineGridBox):
2807         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
2808         * rendering/RenderBlockLineLayout.cpp:
2809         (WebCore::RenderBlock::layoutInlineChildren):
2810         (WebCore::RenderBlock::layoutLineGridBox):
2811         * rendering/RenderFlowThread.cpp:
2812         (WebCore::RenderFlowThread::regionLogicalTopForLine):
2813         * rendering/RenderFlowThread.h:
2814         * rendering/RenderView.h:
2815         (WebCore::RenderView::pushLayoutState):
2816         * rendering/RootInlineBox.cpp:
2817         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2818         (WebCore::RootInlineBox::lineGridSnapAdjustment):
2819         * rendering/RootInlineBox.h:
2820
2821 2012-01-17  Tim Horton  <timothy_horton@apple.com>
2822
2823         -webkit-cross-fade doesn't respect background-size
2824         https://bugs.webkit.org/show_bug.cgi?id=74902
2825         <rdar://problem/10605289>
2826
2827         Reviewed by Simon Fraser.
2828
2829         CrossfadeGeneratedImage should report its intrinsic size, instead of
2830         improperly conforming to the size of its container.
2831
2832         Test: css3/images/cross-fade-background-size.html
2833
2834         * platform/graphics/CrossfadeGeneratedImage.h:
2835         (WebCore::CrossfadeGeneratedImage::setContainerSize):
2836         (WebCore::CrossfadeGeneratedImage::usesContainerSize):
2837         (WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
2838         (WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
2839         (WebCore::CrossfadeGeneratedImage::size):
2840
2841 2012-01-17  Vsevolod Vlasov  <vsevik@chromium.org>
2842
2843         Web Inspector: Refactor JavaScriptOutlineDialog: extract FilteredItemSelectionDialog and reuse DialogDelegate.
2844         https://bugs.webkit.org/show_bug.cgi?id=76455
2845
2846         Reviewed by Yury Semikhatsky.
2847
2848         * WebCore.gypi:
2849         * WebCore.vcproj/WebCore.vcproj:
2850         * inspector/compile-front-end.sh:
2851         * inspector/front-end/Dialog.js:
2852         (WebInspector.Dialog):
2853         (WebInspector.Dialog.prototype._hide):
2854         * inspector/front-end/FilteredItemSelectionDialog.js: Added.
2855         (WebInspector.FilteredItemSelectionDialog):
2856         (WebInspector.FilteredItemSelectionDialog.prototype.position):
2857         (WebInspector.FilteredItemSelectionDialog.prototype.focus):
2858         (WebInspector.FilteredItemSelectionDialog.prototype.willHide):
2859         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
2860         (WebInspector.FilteredItemSelectionDialog.prototype.get _itemsLoaded):
2861         (WebInspector.FilteredItemSelectionDialog.prototype._createItemElement):
2862         (WebInspector.FilteredItemSelectionDialog.prototype._hideItemElement):
2863         (WebInspector.FilteredItemSelectionDialog.prototype._itemElementVisible):
2864         (WebInspector.FilteredItemSelectionDialog.prototype._showItemElement):
2865         (WebInspector.FilteredItemSelectionDialog.prototype._checkItemAt):
2866         (WebInspector.FilteredItemSelectionDialog.prototype._createSearchRegExp):
2867         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
2868         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
2869         (WebInspector.FilteredItemSelectionDialog.prototype._scheduleFilter):
2870         (WebInspector.FilteredItemSelectionDialog.prototype._updateSelection):
2871         (WebInspector.FilteredItemSelectionDialog.prototype._onMouseMove):
2872         (WebInspector.FilteredItemSelectionDialog.prototype._onScroll):
2873         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItems):
2874         (WebInspector.FilteredItemSelectionDialog.prototype._clearHighlight):
2875         (WebInspector.FilteredItemSelectionDialog.prototype._clearElementHighlight.changes.this._elementHighlightChanges.get if):
2876         (WebInspector.FilteredItemSelectionDialog.prototype._clearElementHighlight):
2877         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem.get var):
2878         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem):
2879         (WebInspector.FilteredItemSelectionDialog.prototype._itemElementInViewport):
2880         (WebInspector.SelectionDialogContentProvider):
2881         (WebInspector.SelectionDialogContentProvider.prototype.itemTitleAt):
2882         (WebInspector.SelectionDialogContentProvider.prototype.itemKeyAt):
2883         (WebInspector.SelectionDialogContentProvider.prototype.itemsCount):
2884         (WebInspector.SelectionDialogContentProvider.prototype.requestItems):
2885         (WebInspector.SelectionDialogContentProvider.prototype.selectItem):
2886         (WebInspector.JavaScriptOutlineDialog):
2887         (WebInspector.JavaScriptOutlineDialog.didAddChunk):
2888         (WebInspector.JavaScriptOutlineDialog.install):
2889         (WebInspector.JavaScriptOutlineDialog._show):
2890         (WebInspector.JavaScriptOutlineDialog.createShortcut):
2891         (WebInspector.JavaScriptOutlineDialog.prototype.itemTitleAt):
2892         (WebInspector.JavaScriptOutlineDialog.prototype.itemKeyAt):
2893         (WebInspector.JavaScriptOutlineDialog.prototype.itemsCount):
2894         (WebInspector.JavaScriptOutlineDialog.prototype.requestItems):
2895         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
2896         (WebInspector.JavaScriptOutlineDialog.prototype._appendItemElements):
2897         * inspector/front-end/JavaScriptOutlineDialog.js: Removed.
2898         * inspector/front-end/WebKit.qrc:
2899         * inspector/front-end/filteredItemSelectionDialog.css: Renamed from Source/WebCore/inspector/front-end/javaScriptOutlineDialog.css.
2900         (.js-outline-dialog > input):
2901         (.js-outline-dialog > div.progress):
2902         (.js-outline-dialog > div.container):
2903         (.js-outline-dialog > .container > div.item):
2904         (.js-outline-dialog > .container > div.item.selected):
2905         (.js-outline-dialog > .container > div.item > span.highlight):
2906         * inspector/front-end/inspector.html:
2907
2908 2012-01-17  Peter Rybin  <peter.rybin@gmail.com>
2909
2910         Web Inspector: CodeGeneratorInspector.py: start using typedefs
2911         https://bugs.webkit.org/show_bug.cgi?id=76382
2912
2913         Reviewed by Yury Semikhatsky.
2914
2915         Generator is patched accordingly.
2916
2917         * inspector/CodeGeneratorInspector.py:
2918         (EnumConstants.get_enum_constant_code):
2919         (TypeBuilderPass):
2920         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator):
2921         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
2922         (TypeBindings.create_type_declaration_):
2923         (TypeBindings.create_type_declaration_.PlainString):
2924         (TypeBindings.create_type_declaration_.PlainString.get_code_generator):
2925         (TypeBindings.create_type_declaration_.PlainString.reduce_to_raw_type):
2926         (TypeBindings.create_type_declaration_.PlainString.get_setter_value_expression_pattern):
2927         (TypeBindings.create_type_declaration_.PlainString.get_in_c_type_text):
2928         (TypeBindings.create_type_declaration_.TypedefString):
2929         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator):
2930         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator):
2931         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator.generate_type_builder):
2932         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator.generate_type_builder.String):
2933         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator.register_use):
2934         (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator.get_generate_pass_id):
2935         (TypeBindings.create_type_declaration_.TypedefString.reduce_to_raw_type):
2936         (TypeBindings.create_type_declaration_.TypedefString.get_setter_value_expression_pattern):
2937         (TypeBindings.create_type_declaration_.TypedefString.get_in_c_type_text):
2938         (get_generate_pass_id):
2939         (ArrayBinding.get_code_generator.CodeGenerator):
2940         (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
2941         (Generator.process_types.create_type_builder_caller):
2942         (Generator.process_types.create_type_builder_caller.call_type_builder):
2943         (Generator.process_types):
2944
2945 2012-01-11  Yury Semikhatsky  <yurys@chromium.org>
2946
2947         Web Inspector: provide basic information about DOM character data size
2948         https://bugs.webkit.org/show_bug.cgi?id=76059
2949
2950         Memory agent allows to estimate size of DOM character data and size of WebCore
2951         strings held by JavaScript objects.
2952
2953         Reviewed by Pavel Feldman.
2954
2955         * bindings/js/ScriptProfiler.h:
2956         (WebCore::ScriptProfiler::visitExternalJSStrings):
2957         * bindings/v8/ScriptProfiler.cpp:
2958         (WebCore::ScriptProfiler::visitExternalJSStrings):
2959         * bindings/v8/ScriptProfiler.h:
2960         * bindings/v8/V8Binding.cpp:
2961         (WebCore::WebCoreStringResource::visitStrings):
2962         (WebCore::V8BindingPerIsolateData::visitJSExternalStrings):
2963         * bindings/v8/V8Binding.h:
2964         * inspector/DOMWrapperVisitor.h:
2965         * inspector/Inspector.json:
2966         * inspector/InspectorMemoryAgent.cpp:
2967         (WebCore::CharacterDataStatistics::DOMTreeStatistics::DOMTreeStatistics):
2968         (WebCore::CharacterDataStatistics::DOMTreeStatistics::collectNodeStatistics):
2969         (WebCore::CharacterDataStatistics::CounterVisitor::CounterVisitor):
2970         (WebCore::CharacterDataStatistics::CounterVisitor::domGroups):
2971         (WebCore::CharacterDataStatistics::CounterVisitor::strings):
2972         (WebCore::CharacterDataStatistics::CounterVisitor::visitNode):
2973         (WebCore::CharacterDataStatistics::CounterVisitor::visitJSExternalString):
2974         (WebCore::InspectorMemoryAgent::getDOMNodeCount):
2975         * inspector/InspectorMemoryAgent.h:
2976
2977 2012-01-17  Vsevolod Vlasov  <vsevik@chromium.org>
2978
2979         Web Inspector: Dialogs style and DialogDelegate interface fixes.
2980         https://bugs.webkit.org/show_bug.cgi?id=76449
2981
2982         Reviewed by Pavel Feldman.
2983
2984         * inspector/front-end/Dialog.js:
2985         (WebInspector.Dialog):
2986         (WebInspector.Dialog.currentInstance):
2987         (WebInspector.Dialog.show):
2988         (WebInspector.Dialog.hide):
2989         (WebInspector.Dialog.prototype._hide):
2990         (WebInspector.Dialog.prototype._onGlassPaneFocus):
2991         (WebInspector.Dialog.prototype._onFocus):
2992         (WebInspector.Dialog.prototype._position):
2993         (WebInspector.Dialog.prototype._onKeyDown):
2994         (WebInspector.DialogDelegate.prototype.wasShown):
2995         (WebInspector.DialogDelegate.prototype.position):
2996         (WebInspector.DialogDelegate.prototype.focus):
2997         (WebInspector.DialogDelegate.prototype.onEnter):
2998         (WebInspector.DialogDelegate.prototype.willHide):
2999         * inspector/front-end/GoToLineDialog.js:
3000         (WebInspector.GoToLineDialog):
3001         (WebInspector.GoToLineDialog.prototype.focus):
3002         (WebInspector.GoToLineDialog.prototype._onGoClick):
3003         (WebInspector.GoToLineDialog.prototype._applyLineNumber):
3004         (WebInspector.GoToLineDialog.prototype.onEnter):
3005         * inspector/front-end/dialog.css:
3006         (.dialog):
3007
3008 2012-01-17  Yury Semikhatsky  <yurys@chromium.org>
3009
3010         Web Inspector: ConsoleMessage.cpp and InspectorResourceAgent.cpp doesn't conform to Inspector.json
3011         https://bugs.webkit.org/show_bug.cgi?id=76403
3012
3013         A couple of protocol fixes.
3014
3015         Reviewed by Pavel Feldman.
3016
3017         * inspector/ConsoleMessage.cpp: return 'log' in case some unsupported value is passed.
3018         We cannot omit that return statement as GCC would complain on missing return statement
3019         despite all enum values are listed.
3020         (WebCore::messageTypeValue):
3021         * inspector/Inspector-0.1.json: fixed v0.1 protocol definition.
3022         * inspector/Inspector.json: made CachedResource.response field optional.
3023
3024 2012-01-17  Ilya Tikhonovsky  <loislo@chromium.org>
3025
3026         [Chromium] Web Inspector: remove "Document DOM tree" class and "Detached DOM tree" from the Summary view.
3027         https://bugs.webkit.org/show_bug.cgi?id=76450
3028
3029         Reviewed by Yury Semikhatsky.
3030
3031         * inspector/front-end/HeapSnapshot.js:
3032         (WebInspector.HeapSnapshot.prototype._buildAggregates):
3033
3034 2012-01-17  Nikolas Zimmermann  <nzimmermann@rim.com>
3035
3036         Large SVG text layout performance regression in r81168
3037         https://bugs.webkit.org/show_bug.cgi?id=65711
3038
3039         Reviewed by Zoltan Herczeg.
3040
3041         Final patch fixing the performance regression from r81168 plus giving us more performance we ever had.
3042         The testcase attached to bug 65711 creates 200 tspans as <text> children, and modifies just the first <tspan>s
3043         content periodically using a timer. It ran with <3 FPS in release builds before, and now at around 60 FPS,
3044         where the most dominant code path remaining is CG painting text. Still theres room to optimize further, as
3045         Intruments shows.
3046
3047         Historically we rebuilt all SVGTextLayoutAttributes stored in the RenderSVGInlineText, whenever any
3048         children of the <text> subtree changed, in any way. This lead to a recomputation of the x/y/dx/dy/rotate
3049         value lists, for the whole tree, a recreation of the line box tree and finally a measurement of all characters
3050         in the subtree.
3051
3052         This patch, and its previous patches preparing this, introduces progressive relayout for the SVG text subtree.
3053         DOM tree mutations, x/y/dx/dy/rotate value lists changes, and measuring-all-characters are now strictly decoupled.
3054
3055         #1) x/y/dx/dy/rotate list changes:
3056         The x/y/dx/dy/rotate lists are only ever rebuilt, if they change or upon the initial RenderSVGText layout.
3057         This information is now cached in the so-called SVGCharacterDataMap, in each of the SVGTextLayoutAttributes,
3058         associated with a specific RenderSVGInlineText.
3059
3060         #2) DOM tree mutations:
3061         If a new RenderSVGInlineText gets added to the tree, we have to create SVGTextLayoutAttributes for the new
3062         renderer, measure its characters, and cache the information in the attributes. Adding a new renderer to
3063         a SVG <text> subtree can affect the positioning of the previous and next sibling in the tree, due the
3064         whitespace merging logic. Example:
3065
3066         <text y="50" x="50 100 150">A<tspan></tspan> C</text>:
3067         RenderSVGText {text} at (50,36) size 111x18 contains 1 chunk(s)
3068           RenderSVGInlineText {#text} at (0,0) size 12x18
3069             chunk 1 text run 1 at (50.00,50.00) startOffset 0 endOffset 1 width 12.00: "A"
3070           RenderSVGTSpan {tspan} at (0,0) size 0x0
3071           RenderSVGInlineText {#text} at (50,0) size 61x18
3072             chunk 1 text run 1 at (100.00,50.00) startOffset 0 endOffset 1 width 4.00: " "
3073             chunk 1 text run 1 at (150.00,50.00) startOffset 0 endOffset 1 width 11.00: "C"
3074
3075         <text y="50" x="50 100 150">A<tspan>B</tspan> C</text>:
3076         RenderSVGText {text} at (50,36) size 115x18 contains 1 chunk(s)
3077           RenderSVGInlineText {#text} at (0,0) size 12x18
3078             chunk 1 text run 1 at (50.00,50.00) startOffset 0 endOffset 1 width 12.00: "A"
3079           RenderSVGTSpan {tspan} at (0,0) size 11x18
3080             RenderSVGInlineText {#text} at (50,0) size 11x18
3081               chunk 1 text run 1 at (100.00,50.00) startOffset 0 endOffset 1 width 11.00: "B"
3082           RenderSVGInlineText {#text} at (100,0) size 15x18
3083             chunk 1 text run 1 at (150.00,50.00) startOffset 0 endOffset 2 width 15.00: " C"
3084
3085         Its obvious that adding a #text node as child to the <tspan> potentially affects the next & previous
3086         siblings in the DOM tree. Take extra care of these possibilities, by properly remeasuring not only
3087         the newly added renderer, but also the previous & next siblings layout attributes.
3088
3089         Mutation of text nodes, or removal of text/tspan elements from the tree is handled in the same way.
3090
3091         #3) Measuring the text subtree:
3092         Don't cache the metrics information in the SVGRootInlineBox, as it doesn't survive relayouts (RenderSVGText::layout).
3093         They're stored in the SVGTextLayoutAttributes, and will be updated if the underlying text content changes.
3094
3095         Tests: svg/text/append-text-node-to-tspan.html
3096                svg/text/modify-text-node-in-tspan.html
3097                svg/text/remove-text-node-from-tspan.html
3098
3099         * rendering/svg/RenderSVGInline.cpp:
3100         (WebCore::RenderSVGInline::addChild):
3101         * rendering/svg/RenderSVGInline.h:
3102         * rendering/svg/RenderSVGInlineText.cpp:
3103         (WebCore::RenderSVGInlineText::willBeDestroyed):
3104         (WebCore::RenderSVGInlineText::setTextInternal):
3105         (WebCore::RenderSVGInlineText::styleDidChange):
3106         * rendering/svg/RenderSVGInlineText.h:
3107         (WebCore::RenderSVGInlineText::layoutAttributes):
3108         * rendering/svg/RenderSVGText.cpp:
3109         (WebCore::recursiveUpdateLayoutAttributes):
3110         (WebCore::RenderSVGText::layoutAttributesChanged):
3111         (WebCore::findPreviousAndNextAttributes):
3112         (WebCore::RenderSVGText::layoutAttributesWillBeDestroyed):
3113         (WebCore::RenderSVGText::textDOMChanged):
3114         (WebCore::RenderSVGText::layout):
3115         (WebCore::RenderSVGText::addChild):
3116         (WebCore::recursiveCollectLayoutAttributes):
3117         (WebCore::RenderSVGText::rebuildLayoutAttributes):
3118         * rendering/svg/RenderSVGText.h:
3119         (WebCore::RenderSVGText::layoutAttributes):
3120         * rendering/svg/SVGRootInlineBox.cpp:
3121         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3122         (WebCore::findFirstAndLastAttributesInVector):
3123         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
3124         (WebCore::SVGRootInlineBox::reorderValueLists):
3125         * rendering/svg/SVGRootInlineBox.h:
3126         * rendering/svg/SVGTextLayoutAttributes.h:
3127         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3128         (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForWholeTree):
3129         * rendering/svg/SVGTextLayoutEngine.cpp:
3130         (WebCore::SVGTextLayoutEngine::SVGTextLayoutEngine):
3131         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
3132         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
3133         (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics):
3134         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
3135         * rendering/svg/SVGTextLayoutEngine.h:
3136         (WebCore::SVGTextLayoutEngine::layoutAttributes):
3137         * rendering/svg/SVGTextMetrics.h:
3138         * rendering/svg/SVGTextMetricsBuilder.cpp:
3139         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
3140         * rendering/svg/SVGTextQuery.cpp:
3141         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
3142         * svg/SVGTextContentElement.cpp:
3143         (WebCore::SVGTextContentElement::childrenChanged):
3144
3145 2012-01-11  Alexander Pavlov  <apavlov@chromium.org>
3146
3147         Web Inspector: [TextPrompt] Autocomplete adds unwanted text that's hard to remove
3148         https://bugs.webkit.org/show_bug.cgi?id=76058
3149
3150         Reviewed by Pavel Feldman.
3151
3152         As per the results of a war room:
3153         - Auto-suggest only after user typing (avoid showing suggestions when navigating through the user input.)
3154         - Do not select the first item if the suggest box is shown at the end of prompt (to allow Enter to commit the input.)
3155         - Only show grayed autocompletion at the end of prompt (otherwise show a suggest box with the first item selected.)
3156         - Grayed autocompletion can only be accepted with the End or Right keys.
3157         - Enter can accept a selected suggestion item from the list, without committing the input.
3158         - Retain the CSS model editing behavior as close to the existing one as possible.
3159         - Enable PageUp/PageDown to navigate the suggest box items.
3160
3161         * inspector/front-end/StylesSidebarPane.js:
3162         (WebInspector.StylePropertyTreeElement.prototype):
3163         ():
3164         * inspector/front-end/TextPrompt.js:
3165         (WebInspector.TextPrompt.prototype.set text):
3166         (WebInspector.TextPrompt.prototype._removeSuggestionAids):
3167         (WebInspector.TextPrompt.prototype._selectStart.moveBackIfOutside):
3168         (WebInspector.TextPrompt.prototype._selectStart):
3169         (WebInspector.TextPrompt.prototype.onKeyDown):
3170         (WebInspector.TextPrompt.prototype.acceptAutoComplete):
3171         (WebInspector.TextPrompt.prototype.complete):
3172         (WebInspector.TextPrompt.prototype._completionsReady):
3173         (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
3174         (WebInspector.TextPrompt.prototype.tabKeyPressed):
3175         (WebInspector.TextPrompt.prototype.downKeyPressed):
3176         (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
3177         (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
3178         (WebInspector.TextPrompt.SuggestBox.prototype._onNextItem):
3179         (WebInspector.TextPrompt.SuggestBox.prototype._onPreviousItem):
3180         (WebInspector.TextPrompt.SuggestBox.prototype.updateSuggestions):
3181         (WebInspector.TextPrompt.SuggestBox.prototype._updateItems):
3182         (WebInspector.TextPrompt.SuggestBox.prototype._canShowBox):
3183         (WebInspector.TextPrompt.SuggestBox.prototype._rememberRowCountPerViewport):
3184         (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady):
3185         (WebInspector.TextPrompt.SuggestBox.prototype.pageUpKeyPressed):
3186         (WebInspector.TextPrompt.SuggestBox.prototype.pageDownKeyPressed):
3187         (WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):
3188
3189 2012-01-17  Alexander Pavlov  <apavlov@chromium.org>
3190
3191         Web Inspector: CSS backend doesn't conform to Inspector.json
3192         https://bugs.webkit.org/show_bug.cgi?id=76402
3193
3194         Reviewed by Yury Semikhatsky.
3195
3196         * inspector/Inspector.json:
3197         * inspector/InspectorStyleSheet.cpp:
3198         (WebCore::InspectorStyleSheet::buildObjectForStyle):
3199
3200 2012-01-17  Tommy Widenflycht  <tommyw@google.com>
3201
3202         MediaStream API: Add the mediaStream constructor
3203         https://bugs.webkit.org/show_bug.cgi?id=76436
3204
3205         Adding support for creating a MediaStream using a collection of MediaStreamTracks.
3206
3207         Reviewed by Adam Barth.
3208
3209         Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code.
3210
3211         * mediastream/MediaStream.cpp:
3212         (WebCore::MediaStream::create):
3213         * mediastream/MediaStream.h:
3214         * mediastream/MediaStream.idl:
3215         * mediastream/MediaStreamTrack.cpp:
3216         (WebCore::MediaStreamTrack::component):
3217         * mediastream/MediaStreamTrack.h:
3218         * platform/mediastream/MediaStreamCenter.cpp:
3219         (WebCore::MediaStreamCenter::didConstructMediaStream):
3220         * platform/mediastream/MediaStreamCenter.h:
3221
3222 2012-01-17  Joshua Bell  <jsbell@chromium.org>
3223
3224         IndexedDB: IDBIndex.get/getKey should yield undefined, not an error
3225         https://bugs.webkit.org/show_bug.cgi?id=76116
3226
3227         Pass an undefined value (for IDBIndex.get()) or a null key
3228         (for IDBIndex.getKey()) back as the result, rather than raising
3229         an exception.
3230
3231         Reviewed by Adam Barth.
3232
3233         Tests: storage/indexeddb/index-basics.html
3234                storage/indexeddb/cursor-index-delete.html
3235                storage/indexeddb/duplicates.html
3236
3237         * storage/IDBIndexBackendImpl.cpp:
3238         (WebCore::IDBIndexBackendImpl::getInternal):
3239         * storage/IDBRequest.cpp:
3240         (WebCore::IDBRequest::onSuccess):
3241
3242 2012-01-17  Luke Macpherson   <macpherson@chromium.org>
3243
3244         Remove references to CSSPrimitiveValue::primitiveType().
3245         https://bugs.webkit.org/show_bug.cgi?id=76363
3246
3247         Reviewed by Hajime Morita.
3248
3249         No new tests / refactoring only.
3250
3251         Goal is to remove primitiveType() completely. Only code left using it after this patch is in SVG.
3252         I've introduced some abstractions in CSSPrimitiveValue for time and angles to reduce duplicated code elsewhere.
3253
3254         * css/CSSComputedStyleDeclaration.cpp:
3255         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
3256         * css/CSSParser.cpp:
3257         (WebCore::CSSParser::parseColor):
3258         * css/CSSPrimitiveValue.cpp:
3259         (WebCore::CSSPrimitiveValue::computeDegrees):
3260         * css/CSSPrimitiveValue.h:
3261         (WebCore::CSSPrimitiveValue::isAngle):
3262         (WebCore::CSSPrimitiveValue::isAttr):
3263         (WebCore::CSSPrimitiveValue::isCounter):
3264         (WebCore::CSSPrimitiveValue::isFontIndependentLength):
3265         (WebCore::CSSPrimitiveValue::isLength):
3266         (WebCore::CSSPrimitiveValue::isPx):
3267         (WebCore::CSSPrimitiveValue::isRect):
3268         (WebCore::CSSPrimitiveValue::isRGBColor):
3269         (WebCore::CSSPrimitiveValue::isShape):
3270         (WebCore::CSSPrimitiveValue::isTime):
3271         (WebCore::CSSPrimitiveValue::computeTime):
3272         * css/CSSStyleSelector.cpp:
3273         (WebCore::convertToLength):
3274         (WebCore::createGridTrackBreadth):
3275         (WebCore::CSSStyleSelector::applyProperty):
3276         (WebCore::CSSStyleSelector::mapFillSize):
3277         (WebCore::CSSStyleSelector::mapFillXPosition):
3278         (WebCore::CSSStyleSelector::mapFillYPosition):
3279         (WebCore::CSSStyleSelector::mapAnimationDelay):
3280         (WebCore::CSSStyleSelector::mapAnimationDuration):
3281         (WebCore::CSSStyleSelector::mapNinePieceImageSlice):
3282         (WebCore::CSSStyleSelector::mapNinePieceImageQuad):
3283         (WebCore::CSSStyleSelector::colorFromPrimitiveValue):
3284         (WebCore::CSSStyleSelector::createTransformOperations):
3285         (WebCore::CSSStyleSelector::createCustomFilterOperation):
3286         (WebCore::CSSStyleSelector::createFilterOperations):
3287         * css/MediaQueryEvaluator.cpp:
3288         (WebCore::parseAspectRatio):
3289         (WebCore::numberValue):
3290         (WebCore::computeLength):
3291         * editing/EditingStyle.cpp:
3292         (WebCore::cssValueToRGBA):
3293         (WebCore::EditingStyle::extractFontSizeDelta):
3294         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
3295         (WebCore::isCSSValueLength):
3296         (WebCore::hasTransparentBackgroundColor):
3297
3298 2012-01-16  Hajime Morrita  <morrita@chromium.org>
3299
3300         [Internals] member varaibles should follow naming convention.
3301         https://bugs.webkit.org/show_bug.cgi?id=76426
3302
3303         Reviewed by Kent Tamura.
3304
3305         No new tests. Just a rename.
3306
3307         * testing/Internals.cpp:
3308         (WebCore::Internals::Internals):
3309         (WebCore::Internals::setPasswordEchoEnabled):
3310         (WebCore::Internals::setPasswordEchoDurationInSeconds):
3311         (WebCore::Internals::reset):
3312         * testing/Internals.h:
3313
3314 2012-01-16  Hayato Ito  <hayato@chromium.org>
3315
3316         Implement multiple AT_TARGET event dispatching in regard to shadow tree.
3317         https://bugs.webkit.org/show_bug.cgi?id=76217
3318
3319         Reviewed by Dimitri Glazkov.
3320
3321         The original motivation is to fix the regression: Event.eventPhase is not set to 2
3322         (at target) when handling dblclick event in <input> element.
3323         Since the issue is not specific to <input> element, but general one, this patch fixes
3324         the regression by adapting a living draft spec of shadow DOM.
3325         This won't break a compatibility if there is no shadow boundaries in event dispatching.
3326         See the following shadow dom spec how multiple AT_TARGET events work.
3327         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#event-dispatch
3328
3329         * dom/EventContext.cpp:
3330         (WebCore::EventContext::handleLocalEvents):
3331
3332 2012-01-16  Jason Liu  <jason.liu@torchmobile.com.cn>
3333
3334         platformRequest(QNX) need to get the conditional information from ResourceRequest.
3335         https://bugs.webkit.org/show_bug.cgi?id=75216
3336
3337         Reviewed by George Staikos.
3338
3339         Pass the isConditional() flag in ResourceRequest to the QNX platform's network request.
3340         QNX platform's network needs this flag to determine whether to use disk-cache.
3341
3342         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
3343         (ResourceRequest::initializePlatformRequest):
3344
3345 2012-01-16  Robert Hogan  <robert@webkit.org>
3346
3347         Heap-use-after-free in WebCore::RenderBlock::selectionGaps
3348         https://bugs.webkit.org/show_bug.cgi?id=75013
3349
3350         Reviewed by David Hyatt.
3351
3352         Test: fast/table/multiple-captions-crash3.html
3353               fast/table/multiple-captions-crash4.html
3354               fast/table/multiple-captions-crash5.html
3355
3356         When a child float is removed, the parent needs to ensure any reference to the
3357         child is also removed from the floating objects list in any sibling block that 
3358         it intruded into.
3359
3360         * rendering/RenderBlock.cpp:
3361         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
3362         * rendering/RenderBox.cpp:
3363         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
3364
3365 2012-01-16  Enrica Casucci  <enrica@apple.com>
3366
3367         REGRESSION: r102553 Autocorrection bubble doesn't show up
3368         https://bugs.webkit.org/show_bug.cgi?id=76408
3369         <rdar://problem/10644746>
3370
3371         Prior to r102553 Editor::markAllMisspellingsAndBadGrammarInRanges() used to pass its
3372         textCheckingOptions directly to markAndReplaceFor(). Now a request object is used,
3373         but, when the object is created, the TextCheckingTypeShowCorrectionPanel flag is dropped.
3374         
3375         Reviewed by Darin Adler.
3376
3377         * editing/Editor.cpp:
3378         (WebCore::Editor::resolveTextCheckingTypeMask): Add TextCheckingTypeShowCorrectionPanel to
3379         the returned checkingTypes when appropriate.
3380
3381 2012-01-16  Jon Lee  <jonlee@apple.com>
3382
3383         Build fix for r105086.
3384
3385         * Configurations/FeatureDefines.xcconfig:
3386         * notifications/NotificationCenter.idl: change to use ENABLE_TEXT_NOTIFICATIONS_ONLY, which is only defined on Mac platform.
3387
3388 2012-01-16  Andreas Kling  <awesomekling@apple.com>
3389
3390         Fix typo in StyledElement::mappedAttributeCount().
3391         <http://webkit.org/b/76393>
3392
3393         Rubber-stamped by Antti Koivisto.
3394
3395         * dom/StyledElement.h:
3396         (WebCore::StyledElement::mappedAttributeCount): Less &&, more ?:
3397
3398 2012-01-16  Jon Lee  <jonlee@apple.com>
3399
3400         Build fix for r105086.
3401
3402         * notifications/NotificationCenter.idl: expand ENABLE macro for .idl.
3403
3404 2012-01-16  Antti Koivisto  <antti@apple.com>
3405
3406         Cache CSSStyleSelector::Features in RuleSets
3407         https://bugs.webkit.org/show_bug.cgi?id=76337
3408
3409         Reviewed by Andreas Kling.
3410
3411         Currently whenever the style selector is updated we go through all the applicable rules and
3412         collect the used features again. We should keep the features around as part of the RuleSets
3413         and update them incrementally. Collecting the features will then be just a matter of taking
3414         the union of all features used by the RuleSets.
3415         
3416         This is 1-2% CPU time reduction (engadget, nytimes) due less time spent in feature collection.
3417         
3418         This also simplifies the code by removing the need to cache the default style sheet features
3419         separately. 
3420
3421         * css/CSSStyleSelector.cpp:
3422         
3423             Remove the global siblingRulesInDefaultStyle and uncommonAttributeRulesInDefaultStyle RuleSets.
3424             These are now part of the cached features of the defaultStyle.
3425         
3426         (WebCore::RuleSet::features):
3427         
3428             Add a field for caching the features.
3429         
3430         (WebCore::makeRuleSet):
3431         (WebCore::CSSStyleSelector::collectFeatures):
3432         
3433             Unify the features of all RuleSets.
3434             Create RuleSets for sibling and uncommon attribute lookups at the end.
3435         
3436         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
3437         (WebCore::CSSStyleSelector::Features::add):
3438         (WebCore::ensureDefaultStyleSheetsForElement):
3439         (WebCore::CSSStyleSelector::locateSharedStyle):
3440         (WebCore::collectFeaturesFromSelector):
3441         (WebCore::collectFeaturesFromRuleData):
3442         (WebCore::RuleSet::addToRuleSet):
3443         (WebCore::RuleSet::addRule):
3444         
3445             Collect the features when adding the rules rather than as a separate pass through all the rules.
3446         
3447         * css/CSSStyleSelector.h:
3448