Make elements that don't have attributes smaller.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-31  Andreas Kling  <awesomekling@apple.com>
2
3         Make elements that don't have attributes smaller.
4         <http://webkit.org/b/76876>
5
6         Reviewed by Sam Weinig and Antti Koivisto.
7
8         Move the inline style declaration from StyledElement to ElementAttributeData, since having
9         an inline style declaration also implies having a style attribute on the element.
10         This saves one CPU word per element that has no attributes.
11
12         This reduces memory consumption by 412 kB (on 64-bit) when viewing the full
13         HTML5 spec at <http://whatwg.org/c>.
14
15         This was rolled out once because of a performance regression which has been averted this
16         time around by adding an Element::ensureAttributeMap() so we can force creation of the
17         NamedNodeMap without also serializing the inline style for the "style" attribute.
18
19         * dom/Element.h:
20         (Element):
21         (WebCore::Element::ensureAttributeMap):
22         (WebCore):
23         * dom/ElementAttributeData.h:
24         (ElementAttributeData):
25         * dom/NamedNodeMap.cpp:
26         (WebCore::NamedNodeMap::ensureInlineStyleDecl):
27         (WebCore):
28         (WebCore::NamedNodeMap::destroyInlineStyleDecl):
29         * dom/NamedNodeMap.h:
30         (WebCore::NamedNodeMap::inlineStyleDecl):
31         (NamedNodeMap):
32         * dom/StyledElement.cpp:
33         (WebCore::StyledElement::addSubresourceAttributeURLs):
34         * dom/StyledElement.h:
35         (WebCore::StyledElement::inlineStyleDecl):
36         (WebCore::StyledElement::ensureInlineStyleDecl):
37         (StyledElement):
38         (WebCore::StyledElement::destroyInlineStyleDecl):
39
40 2012-01-31  Hayato Ito  <hayato@chromium.org>
41
42         Add APIs, getElementsByXXX family, to ShadowRoot IDL.
43         https://bugs.webkit.org/show_bug.cgi?id=77323
44
45         Reviewed by Dimitri Glazkov.
46
47         Add APIs (getElementById, getElemesntByTagName, getElementsByClassName and getElementsByTagNameNS)
48         to ShadowRoot IDL.
49
50         * dom/ShadowRoot.idl:
51
52 2012-01-31  Shinya Kawanaka  <shinyak@google.com>
53
54         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
55         https://bugs.webkit.org/show_bug.cgi?id=76611
56
57         Reviewed by Hajime Morita.
58
59         When a content element is added/removed/replaced in a shadow tree, we have to recreate
60         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
61         when content element is removed. (When added, it is recalculated.)
62         This patch enables us to recalcurate the shadow tree when content element is removed.
63
64         Test: fast/dom/shadow/content-element-move.html
65
66         * dom/Element.cpp:
67         (WebCore::Element::attach):
68           If a shadow root exists, attaches shadow tree before attaching child elements.
69         * dom/ShadowRoot.cpp:
70         (WebCore::ShadowRoot::recalcShadowTreeStyle):
71           Recalculates light children and shadow tree.
72         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
73           Detaches shadow tree and host light children, and attaches them again.
74         * dom/ShadowRoot.h:
75           Added a flag to recalculate shadow tree.
76         (WebCore::ShadowRoot::setNeedsShadowTreeStyleRecalc):
77         (WebCore::ShadowRoot::clearNeedsShadowTreeStyleRecalc):
78         (WebCore::ShadowRoot::needsShadowTreeStyleRecalc):
79         * html/shadow/HTMLContentElement.cpp:
80         (WebCore::HTMLContentElement::attach):
81           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
82         (WebCore::HTMLContentElement::detach):
83           When a content element detached, reattaches a shadow tree.
84
85 2012-01-31  Joe Thomas  <joethomas@motorola.com>
86
87         https://bugs.webkit.org/show_bug.cgi?id=76801
88         Listboxes incorrectly display contents when cleared and then re-populated.
89
90         Whenever the number of items in the listbox is less than the size of listbox (number of visible items the listbox can accomodate),
91         we set the listbox scroll-offset to zero. The scroll-offset of the Scrollbar should also be set to 0 so that when the listbox is re-populated,
92         scrollbar position and the content inside the listbox are in sync.
93
94         Reviewed by Andreas Kling.
95
96         Tests: fast/forms/listbox-clear-restore.html
97
98         * rendering/RenderListBox.cpp:
99         (WebCore::RenderListBox::computeLogicalHeight): Setting the scroll-offset of the Scrollbar to 0 when scrollbar is not needed.
100
101 2012-01-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
102
103         Unreviewed. Fix build break after r106373.
104
105         * CMakeLists.txt:
106
107 2012-01-31  Adam Barth  <abarth@webkit.org>
108
109         HTMLPreloadScanner should understand the <base> element
110         https://bugs.webkit.org/show_bug.cgi?id=77231
111
112         Reviewed by Eric Seidel.
113
114         Previously, the HTMLPreloadScanner would ignore the <base> element when
115         preloading resources.  If there was a <base> tag, this could cause the
116         preload scanner to make a bunch of useless requests.
117
118         This patch teaches the preload scanner to use <base> tags to better
119         predict which URLs will be used by the document.
120
121         Tests: fast/preloader/first-base-tag-scanned-wins.html
122                fast/preloader/first-base-tag-wins.html
123                fast/preloader/understands-base-tag.html
124
125         * dom/Document.cpp:
126         (WebCore::Document::completeURL):
127         (WebCore):
128         * dom/Document.h:
129         (Document):
130         (WebCore::Document::baseElementURL):
131         * html/parser/HTMLPreloadScanner.cpp:
132         (WebCore::HTMLNames::PreloadTask::PreloadTask):
133         (WebCore::HTMLNames::PreloadTask::processAttributes):
134         (WebCore::HTMLNames::PreloadTask::preload):
135         (WebCore::HTMLNames::PreloadTask::baseElementHref):
136         (PreloadTask):
137         (WebCore::HTMLPreloadScanner::scan):
138         (WebCore::HTMLPreloadScanner::processToken):
139         (WebCore::HTMLPreloadScanner::updatePredictedBaseElementURL):
140         (WebCore):
141         * html/parser/HTMLPreloadScanner.h:
142         (HTMLPreloadScanner):
143
144 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
145
146         Dynamic allocate AudioBus with required number of channels for AudioNodeInput
147         https://bugs.webkit.org/show_bug.cgi?id=76516
148
149         Reviewed by Kenneth Russell.
150
151         No new tests required.
152
153         * webaudio/AudioBasicProcessorNode.cpp:
154         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
155         * webaudio/AudioChannelMerger.cpp:
156         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
157         * webaudio/AudioGainNode.cpp:
158         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
159         * webaudio/AudioNode.cpp:
160         (WebCore::AudioNode::checkNumberOfChannelsForInput):
161         * webaudio/AudioNode.h:
162         * webaudio/AudioNodeInput.cpp:
163         (WebCore::AudioNodeInput::AudioNodeInput):
164         (WebCore::AudioNodeInput::updateInternalBus):
165         (WebCore::AudioNodeInput::internalSummingBus):
166         * webaudio/AudioNodeInput.h:
167
168 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
169
170         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
171         https://bugs.webkit.org/show_bug.cgi?id=77473
172         <rdar://problem/10751357>
173
174         Reviewed by Darin Adler.
175
176         Test: platform/mac/fast/events/non-roman-key-code.html
177
178         * WebCore.exp.in:
179         * platform/mac/PlatformEventFactoryMac.h:
180         * platform/mac/PlatformEventFactoryMac.mm:
181         (WebCore::keyIdentifierForKeyEvent):
182         (WebCore::windowsKeyCodeForKeyEvent):
183         Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time.
184
185 2012-01-31  Gregg Tavares  <gman@google.com>
186
187         Make WebGL put synthesized errors in the JS console
188         https://bugs.webkit.org/show_bug.cgi?id=77267
189
190         Reviewed by Kenneth Russell.
191
192         No new functionality so no new tests.
193
194         * html/canvas/WebGLCompressedTextures.cpp:
195         (WebCore::WebGLCompressedTextures::validateCompressedTexFuncData):
196         (WebCore::WebGLCompressedTextures::compressedTexImage2D):
197         (WebCore::WebGLCompressedTextures::compressedTexSubImage2D):
198         * html/canvas/WebGLCompressedTextures.h:
199         (WebGLCompressedTextures):
200         * html/canvas/WebGLDebugShaders.cpp:
201         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
202         * html/canvas/WebGLRenderingContext.cpp:
203         (WebCore::WebGLRenderingContext::activeTexture):
204         (WebCore::WebGLRenderingContext::attachShader):
205         (WebCore::WebGLRenderingContext::bindAttribLocation):
206         (WebCore::WebGLRenderingContext::checkObjectToBeBound):
207         (WebCore::WebGLRenderingContext::bindBuffer):
208         (WebCore::WebGLRenderingContext::bindFramebuffer):
209         (WebCore::WebGLRenderingContext::bindRenderbuffer):
210         (WebCore::WebGLRenderingContext::bindTexture):
211         (WebCore::WebGLRenderingContext::blendEquation):
212         (WebCore::WebGLRenderingContext::blendEquationSeparate):
213         (WebCore::WebGLRenderingContext::blendFunc):
214         (WebCore::WebGLRenderingContext::blendFuncSeparate):
215         (WebCore::WebGLRenderingContext::bufferData):
216         (WebCore::WebGLRenderingContext::bufferSubData):
217         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
218         (WebCore::WebGLRenderingContext::clear):
219         (WebCore::WebGLRenderingContext::compileShader):
220         (WebCore::WebGLRenderingContext::compressedTexImage2D):
221         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
222         (WebCore::WebGLRenderingContext::copyTexImage2D):
223         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
224         (WebCore::WebGLRenderingContext::createShader):
225         (WebCore::WebGLRenderingContext::deleteObject):
226         (WebCore::WebGLRenderingContext::depthRange):
227         (WebCore::WebGLRenderingContext::detachShader):
228         (WebCore::WebGLRenderingContext::disable):
229         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
230         (WebCore::WebGLRenderingContext::validateWebGLObject):
231         (WebCore::WebGLRenderingContext::drawArrays):
232         (WebCore::WebGLRenderingContext::drawElements):
233         (WebCore::WebGLRenderingContext::enable):
234         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
235         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
236         (WebCore::WebGLRenderingContext::framebufferTexture2D):
237         (WebCore::WebGLRenderingContext::generateMipmap):
238         (WebCore::WebGLRenderingContext::getActiveAttrib):
239         (WebCore::WebGLRenderingContext::getActiveUniform):
240         (WebCore::WebGLRenderingContext::getAttachedShaders):
241         (WebCore::WebGLRenderingContext::getAttribLocation):
242         (WebCore::WebGLRenderingContext::getBufferParameter):
243         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
244         (WebCore::WebGLRenderingContext::getParameter):
245         (WebCore::WebGLRenderingContext::getProgramParameter):
246         (WebCore::WebGLRenderingContext::getProgramInfoLog):
247         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
248         (WebCore::WebGLRenderingContext::getShaderParameter):
249         (WebCore::WebGLRenderingContext::getShaderInfoLog):
250         (WebCore::WebGLRenderingContext::getShaderSource):
251         (WebCore::WebGLRenderingContext::getTexParameter):
252         (WebCore::WebGLRenderingContext::getUniform):
253         (WebCore::WebGLRenderingContext::getUniformLocation):
254         (WebCore::WebGLRenderingContext::getVertexAttrib):
255         (WebCore::WebGLRenderingContext::hint):
256         (WebCore::WebGLRenderingContext::isEnabled):
257         (WebCore::WebGLRenderingContext::linkProgram):
258         (WebCore::WebGLRenderingContext::pixelStorei):
259         (WebCore::WebGLRenderingContext::readPixels):
260         (WebCore::WebGLRenderingContext::renderbufferStorage):
261         (WebCore::WebGLRenderingContext::scissor):
262         (WebCore::WebGLRenderingContext::shaderSource):
263         (WebCore::WebGLRenderingContext::stencilFunc):
264         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
265         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
266         (WebCore::WebGLRenderingContext::texImage2DBase):
267         (WebCore::WebGLRenderingContext::texImage2DImpl):
268         (WebCore::WebGLRenderingContext::texImage2D):
269         (WebCore::WebGLRenderingContext::videoFrameToImage):
270         (WebCore::WebGLRenderingContext::texParameter):
271         (WebCore::WebGLRenderingContext::texSubImage2DBase):
272         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
273         (WebCore::WebGLRenderingContext::texSubImage2D):
274         (WebCore::WebGLRenderingContext::uniform1f):
275         (WebCore::WebGLRenderingContext::uniform1fv):
276         (WebCore::WebGLRenderingContext::uniform1i):
277         (WebCore::WebGLRenderingContext::uniform1iv):
278         (WebCore::WebGLRenderingContext::uniform2f):
279         (WebCore::WebGLRenderingContext::uniform2fv):
280         (WebCore::WebGLRenderingContext::uniform2i):
281         (WebCore::WebGLRenderingContext::uniform2iv):
282         (WebCore::WebGLRenderingContext::uniform3f):
283         (WebCore::WebGLRenderingContext::uniform3fv):
284         (WebCore::WebGLRenderingContext::uniform3i):
285         (WebCore::WebGLRenderingContext::uniform3iv):
286         (WebCore::WebGLRenderingContext::uniform4f):
287         (WebCore::WebGLRenderingContext::uniform4fv):
288         (WebCore::WebGLRenderingContext::uniform4i):
289         (WebCore::WebGLRenderingContext::uniform4iv):
290         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
291         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
292         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
293         (WebCore::WebGLRenderingContext::useProgram):
294         (WebCore::WebGLRenderingContext::validateProgram):
295         (WebCore::WebGLRenderingContext::vertexAttrib1f):
296         (WebCore::WebGLRenderingContext::vertexAttrib1fv):
297         (WebCore::WebGLRenderingContext::vertexAttrib2f):
298         (WebCore::WebGLRenderingContext::vertexAttrib2fv):
299         (WebCore::WebGLRenderingContext::vertexAttrib3f):
300         (WebCore::WebGLRenderingContext::vertexAttrib3fv):
301         (WebCore::WebGLRenderingContext::vertexAttrib4f):
302         (WebCore::WebGLRenderingContext::vertexAttrib4fv):
303         (WebCore::WebGLRenderingContext::vertexAttribPointer):
304         (WebCore::WebGLRenderingContext::viewport):
305         (WebCore::WebGLRenderingContext::forceLostContext):
306         (WebCore::WebGLRenderingContext::loseContextImpl):
307         (WebCore::WebGLRenderingContext::forceRestoreContext):
308         (WebCore::WebGLRenderingContext::validateTextureBinding):
309         (WebCore::WebGLRenderingContext::validateLocationLength):
310         (WebCore::WebGLRenderingContext::validateSize):
311         (WebCore::WebGLRenderingContext::validateString):
312         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
313         (WebCore::WebGLRenderingContext::validateTexFuncLevel):
314         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
315         (WebCore::WebGLRenderingContext::validateTexFuncData):
316         (WebCore::WebGLRenderingContext::validateDrawMode):
317         (WebCore::WebGLRenderingContext::validateStencilSettings):
318         (WebCore::WebGLRenderingContext::validateStencilFunc):
319         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
320         (WebCore::WebGLRenderingContext::validateBlendEquation):
321         (WebCore::WebGLRenderingContext::validateBlendFuncFactors):
322         (WebCore::WebGLRenderingContext::validateCapability):
323         (WebCore::WebGLRenderingContext::validateUniformParameters):
324         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
325         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
326         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
327         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
328         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
329         (WebCore::WebGLRenderingContext::maybeRestoreContext):
330         (WebCore):
331         (WebCore::WebGLRenderingContext::synthesizeGLError):
332         * html/canvas/WebGLRenderingContext.h:
333         (WebGLRenderingContext):
334
335 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
336
337         Clean up m_processLock logic in AudioBasicProcessorNode and AudioGainNode
338         https://bugs.webkit.org/show_bug.cgi?id=76772
339
340         Reviewed by Kenneth Russell.
341
342         No new tests required.
343
344         * webaudio/AudioBasicProcessorNode.cpp:
345         (WebCore::AudioBasicProcessorNode::process):
346         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
347         * webaudio/AudioBasicProcessorNode.h:
348         * webaudio/AudioGainNode.cpp:
349         (WebCore::AudioGainNode::process):
350         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
351         * webaudio/AudioGainNode.h:
352         (AudioGainNode):
353
354 2012-01-31  Adam Klein  <adamk@chromium.org>
355
356         ProcessingInstruction should not be a ContainerNode
357         https://bugs.webkit.org/show_bug.cgi?id=75141
358
359         Reviewed by Darin Adler.
360
361         Per the DOM spec, ProcessingInstruction can't have any children.
362         And the WebCore behavior already matches the spec by always returning
363         false for childTypeAllowed(). This change simplifies
364         ProcessingInstruction's implementation by making it subclass Node
365         instead of ContainerNode.
366
367         Test: fast/dom/processing-instruction-appendChild-exceptions.xhtml
368
369         * dom/ContainerNode.cpp: Moved dispatchBeforeLoadEvent up to Node.
370         * dom/ContainerNode.h:
371         * dom/Node.cpp:
372         (WebCore::Node::dispatchBeforeLoadEvent): Moved up from ContainerNode
373         since it's used both by ProcessingInstruction and various Element
374         subclasses.
375         * dom/Node.h:
376         * dom/ProcessingInstruction.cpp:
377         (WebCore::ProcessingInstruction::ProcessingInstruction): Call Node constructor.
378         (WebCore::ProcessingInstruction::insertedIntoDocument): Call Node impl.
379         (WebCore::ProcessingInstruction::removedFromDocument): ditto.
380         (WebCore::ProcessingInstruction::finishParsingChildren): ditto.
381         * dom/ProcessingInstruction.h:
382
383 2012-01-31  Matthew Delaney  <mdelaney@apple.com>
384
385         Failing 2d.shadow.enable.off.2.html on Lion
386         https://bugs.webkit.org/show_bug.cgi?id=77489
387
388         Reviewed by Dan Bernstein.
389
390         The canvas spec requires that shadows not be drawn under certain
391         circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows
392         This patch adds in those checks which allows us to pass now (on Lion)
393         the philip canvas test that was checking that constraint.
394
395         No new tests. Unskipping the test on Lion that this patch fixes.
396
397         * html/canvas/CanvasRenderingContext2D.cpp:
398         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
399         (WebCore::CanvasRenderingContext2D::setShadow):
400         (WebCore::CanvasRenderingContext2D::applyShadow):
401         (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
402         * html/canvas/CanvasRenderingContext2D.h:
403         (CanvasRenderingContext2D):
404
405 2012-01-31  Anders Carlsson  <andersca@apple.com>
406
407         TileCache::setNeedsDisplayInRect cleanup
408         https://bugs.webkit.org/show_bug.cgi?id=77486
409
410         Reviewed by Andreas Kling.
411
412         * platform/graphics/ca/mac/TileCache.h:
413         * platform/graphics/ca/mac/TileCache.mm:
414         (WebCore::TileCache::setNeedsDisplayInRect):
415         TileCache::tileLayerAtIndex can in the future return nil, so cope with that. Also, replace
416         nested if statements with continue statements.
417
418         (WebCore::TileCache::getTileIndexRangeForRect):
419         Rename this to better indicate that it returns a range of indices.
420
421 2012-01-31  Dana Jansens  <danakj@chromium.org>
422
423         Add contains() test to Region
424         https://bugs.webkit.org/show_bug.cgi?id=72294
425
426         Reviewed by Anders Carlsson.
427
428         * platform/graphics/Region.cpp:
429         (WebCore::Region::contains):
430         (WebCore):
431         * platform/graphics/Region.h:
432         (Region):
433         (Shape):
434         (WebCore::operator==):
435         (WebCore):
436
437 2012-01-31  Sami Kyostila  <skyostil@chromium.org>
438
439         [chromium] Compositor debug borders are not scaled correctly
440         https://bugs.webkit.org/show_bug.cgi?id=77468
441
442         Use CCLayerImpl::contentBounds() instead of CCLayerImpl::bounds() to calculate debug
443         border geometry so that the borders are properly scaled.
444
445         Reviewed by James Robinson.
446
447         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
448         (WebCore::CCLayerImpl::appendDebugBorderQuad):
449
450 2012-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
451
452         Unreviewed, rolling out r106376.
453         http://trac.webkit.org/changeset/106376
454         https://bugs.webkit.org/show_bug.cgi?id=77481
455
456         Broke WebGLLayerChromiumTest in webkit_unit_tests (Requested
457         by kbr_google on #webkit).
458
459         * platform/graphics/gpu/DrawingBuffer.cpp:
460         (WebCore):
461         (WebCore::DrawingBuffer::reset):
462
463 2012-01-31  Mihnea Ovidenie  <mihnea@adobe.com>
464
465         [CSSRegions]Reduce the cases when the box style in region is computed
466         https://bugs.webkit.org/show_bug.cgi?id=77446
467
468         Reviewed by David Hyatt.
469
470         Covered by existing region style tests.
471
472         * rendering/RenderRegion.cpp:
473         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
474         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
475
476 2012-01-31  Anders Carlsson  <andersca@apple.com>
477
478         Put tiles in a HashMap
479         https://bugs.webkit.org/show_bug.cgi?id=77480
480
481         Reviewed by Antti Koivisto.
482
483         Put tiles in a hash map keyed off the tile index.
484
485         * platform/graphics/ca/mac/TileCache.h:
486         Shuffle member variables around so the order makes more sense.
487         Add the tile map.
488
489         * platform/graphics/ca/mac/TileCache.mm:
490         (WebCore::TileCache::TileCache):
491         Update member initializers.
492
493         (WebCore::TileCache::setNeedsDisplayInRect):
494         Call tileLayerAtIndex instead of tileLayerAtPosition.
495
496         (WebCore::TileCache::setAcceleratesDrawing):
497         (WebCore::TileCache::setTileDebugBorderWidth):
498         (WebCore::TileCache::setTileDebugBorderColor):
499         Iterate over the hash map instead of the sublayers.
500
501         (WebCore::TileCache::resizeTileGrid):
502         Add the created layers to the map.
503
504         (WebCore::TileCache::tileLayerAtIndex):
505         Rename from tileLayerAtPoint to better reflect that this member function
506         returns a tile layer at the given index and not the given point.
507
508 2012-01-31  Antti Koivisto  <antti@apple.com>
509
510         Make CSSOM style() return CSSStyleDeclaration*
511         https://bugs.webkit.org/show_bug.cgi?id=77475
512
513         Reviewed by Anders Carlsson
514
515         CSSStyleRule::style() and some other places return CSSMutableStyleDeclaration. 
516         They should return the plain CSSOM type instead.
517         
518         CSSMutableStyleDeclaration* should be available through non-CSSOM function.
519
520         * css/CSSFontFaceRule.h:
521         (WebCore::CSSFontFaceRule::style):
522         (WebCore::CSSFontFaceRule::declaration):
523         * css/CSSFontSelector.cpp:
524         (WebCore::CSSFontSelector::addFontFaceRule):
525         * css/CSSStyleRule.h:
526         (WebCore::CSSStyleRule::style):
527         (WebCore::CSSStyleRule::declaration):
528         * css/CSSStyleSelector.cpp:
529         (WebCore::CSSStyleSelector::styleForKeyframe):
530         * css/WebKitCSSKeyframeRule.h:
531         (WebCore):
532         (WebCore::WebKitCSSKeyframeRule::style):
533         (WebCore::WebKitCSSKeyframeRule::declaration):
534         (WebKitCSSKeyframeRule):
535         * editing/EditingStyle.cpp:
536         (WebCore::styleFromMatchedRulesForElement):
537         * inspector/InspectorStyleSheet.cpp:
538         (WebCore::InspectorStyleSheet::revalidateStyle):
539         * page/PageSerializer.cpp:
540         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
541         * svg/SVGFontFaceElement.cpp:
542         (WebCore::SVGFontFaceElement::parseMappedAttribute):
543         (WebCore::SVGFontFaceElement::fontFamily):
544         (WebCore::SVGFontFaceElement::rebuildFontFace):
545
546 2012-01-31  Scott Graham  <scottmg@chromium.org>
547
548         [Chromium] Remove references to gyp cygwin build target
549         https://bugs.webkit.org/show_bug.cgi?id=77253
550
551         Reviewed by Julien Chaffraix.
552
553         Target dependency is no longer required, it's done earlier in the
554         build process.
555
556         * WebCore.gyp/WebCore.gyp:
557
558 2012-01-31  Jon Lee  <jonlee@apple.com>
559
560         Hidden form elements do not save their state prior to form submission
561         https://bugs.webkit.org/show_bug.cgi?id=77391
562         <rdar://problem/10563108>
563
564         Reviewed by Brady Eidson.
565
566         Test: fast/forms/state-restore-hidden.html
567
568         * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state.
569         (WebCore::HiddenInputType::saveFormControlState):
570         (WebCore::HiddenInputType::restoreFormControlState):
571         * html/HiddenInputType.h:
572         (HiddenInputType):
573
574 2012-01-31  Joshua Bell  <jsbell@chromium.org>
575
576         IndexedDB: IDBCursor.update() should raise exception if key changed
577         https://bugs.webkit.org/show_bug.cgi?id=76952
578
579         Move the test from the async task to the synchronous call, per spec. Also re-ordered the tests
580         done during the synchronous call and the asynchronous task to follow the spec order.
581
582         Reviewed by Tony Chang.
583
584         Tests: storage/indexeddb/cursor-update.html
585
586         * storage/IDBObjectStoreBackendImpl.cpp:
587         (WebCore::IDBObjectStoreBackendImpl::put): Added check during update() call, order checks per spec.
588         (WebCore::IDBObjectStoreBackendImpl::putInternal): Move effective key calculation inline.
589         * storage/IDBObjectStoreBackendImpl.h: Removed selectKeyForPut method.
590
591 2012-01-31  Anders Carlsson  <andersca@apple.com>
592
593         Inform the tile cache whenever the visible rect changes
594         https://bugs.webkit.org/show_bug.cgi?id=77470
595
596         Reviewed by Andreas Kling.
597
598         * platform/graphics/GraphicsLayer.h:
599         (WebCore::GraphicsLayer::visibleRectChanged):
600         Add empty function.
601
602         * platform/graphics/ca/GraphicsLayerCA.cpp:
603         (WebCore::GraphicsLayerCA::visibleRectChanged):
604         Call through to the PlatformCALayer.
605
606         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
607         (PlatformCALayer::visibleRectChanged):
608         Call through to the underlying WebTileCacheLayer.
609
610         * platform/graphics/ca/mac/TileCache.mm:
611         (WebCore::TileCache::visibleRectChanged):
612         Add empty stub.
613
614         (WebCore::TileCache::visibleRect):
615         Add new (currently unused) helper function that returns the visible rect of the
616         tile cache layer.
617
618         * platform/graphics/ca/mac/WebTileCacheLayer.h:
619         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
620         (-[WebTileCacheLayer visibleRectChanged]):
621         Call through to the TielCache object.
622
623         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
624         (PlatformCALayer::visibleRectChanged):
625         Add stub.
626
627         * rendering/RenderLayerCompositor.cpp:
628         (WebCore::RenderLayerCompositor::frameViewDidScroll):
629         Call GraphicsLayer::visibleRectChanged.
630
631 2012-01-31  Antti Koivisto  <antti@apple.com>
632
633         Remove CSSStyleDeclaration isElementStyleDeclaration bit
634         https://bugs.webkit.org/show_bug.cgi?id=77460
635
636         Reviewed by Andreas Kling.
637
638         Inline style declaration is now the only type of style declaration with element parent.
639         We can remove the bit and the associated logic.
640
641         * bindings/js/JSDOMBinding.h:
642         (WebCore::root):
643         * css/CSSMutableStyleDeclaration.cpp:
644         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
645         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
646         * css/CSSMutableStyleDeclaration.h:
647         (WebCore::CSSMutableStyleDeclaration::createInline):
648         (CSSMutableStyleDeclaration):
649         * css/CSSStyleDeclaration.cpp:
650         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
651         (WebCore):
652         (WebCore::CSSStyleDeclaration::parentStyleSheet):
653         * css/CSSStyleDeclaration.h:
654         (WebCore::CSSStyleDeclaration::parentRule):
655         (WebCore::CSSStyleDeclaration::clearParentRule):
656         (WebCore::CSSStyleDeclaration::parentElement):
657         (WebCore::CSSStyleDeclaration::clearParentElement):
658         (CSSStyleDeclaration):
659
660 2012-01-31  Dana Jansens  <danakj@chromium.org>
661
662         [chromium] Compute occlusion during paint loop
663         https://bugs.webkit.org/show_bug.cgi?id=76858
664
665         Reviewed by James Robinson.
666
667         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
668
669         * platform/graphics/FloatRect.cpp:
670         (WebCore::enclosedIntRect):
671         (WebCore):
672         * platform/graphics/FloatRect.h:
673         (WebCore):
674         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
675         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
676         * platform/graphics/chromium/Canvas2DLayerChromium.h:
677         (Canvas2DLayerChromium):
678         * platform/graphics/chromium/ContentLayerChromium.cpp:
679         (WebCore::ContentLayerChromium::paintContentsIfDirty):
680         * platform/graphics/chromium/ContentLayerChromium.h:
681         (ContentLayerChromium):
682         * platform/graphics/chromium/ImageLayerChromium.cpp:
683         (WebCore::ImageLayerChromium::paintContentsIfDirty):
684         * platform/graphics/chromium/ImageLayerChromium.h:
685         (ImageLayerChromium):
686         * platform/graphics/chromium/LayerChromium.cpp:
687         (WebCore::LayerChromium::contentToScreenSpaceTransform):
688         (WebCore):
689         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
690         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
691         * platform/graphics/chromium/LayerChromium.h:
692         (WebCore):
693         (WebCore::LayerChromium::paintContentsIfDirty):
694         (LayerChromium):
695         * platform/graphics/chromium/RenderSurfaceChromium.h:
696         (RenderSurfaceChromium):
697         * platform/graphics/chromium/TiledLayerChromium.cpp:
698         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
699         * platform/graphics/chromium/TiledLayerChromium.h:
700         (WebCore):
701         ():
702         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
703         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
704         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
705         (RenderSurfaceRegion):
706         (WebCore):
707         (WebCore::pushTargetRenderSurfaceRegion):
708         (WebCore::popAndPushTargetRenderSurfaceRegion):
709         (WebCore::CCLayerTreeHost::paintLayerContents):
710         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
711         (WebCore):
712         ():
713         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
714
715 2012-01-31  John Bates  <jbates@google.com>
716
717         [Chromium] Add chromium-style tracing support
718         https://bugs.webkit.org/show_bug.cgi?id=76885
719
720         Reviewed by Darin Fisher.
721
722         This code enables WebKit trace events to pass through more data to the
723         chromium platform tracing API and generally to use the full tracing
724         API provided by chromium.
725
726         * bindings/v8/V8Proxy.cpp:
727         (WebCore::V8Proxy::evaluate): Replace old tracing API.
728         * page/Console.cpp:
729         (WebCore::Console::time): Replace old tracing API.
730         (WebCore::Console::timeEnd): Replace old tracing API.
731         * platform/chromium/PlatformSupport.h:
732         * platform/chromium/TraceEvent.h:
733         (WebCore::TraceEvent::TraceID::TraceID):
734         (WebCore::TraceEvent::TraceID::data):
735         (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy):
736         (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ):
737         (WebCore::TraceEvent::setTraceValue):
738         (WebCore::TraceEvent::addTraceEvent):
739         (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose):
740         (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose):
741         (WebCore::TraceEvent::TraceEndOnScopeClose::initialize):
742         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
743         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold):
744         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold):
745         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize):
746         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled):
747
748 2012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
749
750         Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
751         https://bugs.webkit.org/show_bug.cgi?id=77077
752
753         Reviewed by Enrica Casucci.
754
755         The crash was caused by a missing null check after removing the position out of the start block.
756         Fixed the bug by adding an early return.
757
758         Tests: editing/deleting/delete-start-block.html
759                editing/selection/move-into-empty-root-inline-box.html
760
761         * editing/DeleteSelectionCommand.cpp:
762         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
763
764 2012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
765
766         HTMLIsIndexElement should not expose HTMLInputElement properties
767         https://bugs.webkit.org/show_bug.cgi?id=76095
768
769         Reviewed by Eric Seidel.
770
771         This is a buildfix for r106373.
772
773         * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl
774
775 2012-01-31  Yongsheng Zhu  <yongsheng.zhu@intel.com>
776
777         WebGL must allocate smaller drawing buffer when the allocation fails. 
778         https://bugs.webkit.org/show_bug.cgi?id=76654
779
780         Reviewed by Kenneth Russell.
781
782         Test: fast/canvas/webgl/drawingbuffer-test.html
783
784         * platform/graphics/gpu/DrawingBuffer.cpp:
785         (WebCore):
786         (WebCore::DrawingBuffer::create):
787         (WebCore::DrawingBuffer::reset):
788
789 2012-01-25  Eric Seidel  <eric@webkit.org>
790
791         HTMLIsIndexElement should not expose HTMLInputElement properties
792         https://bugs.webkit.org/show_bug.cgi?id=76095
793
794         Reviewed by Adam Barth.
795
796         document.createElement("isindex") should produce an HTMLUnknownElement
797         per the HTML5 spec.  The parser automagically translates <isindex> into
798         a whole dom tree roughly representing what <isindex> used to do 15 years ago. :)
799
800         This patch just removes our support for HTMLIsIndexElement.  The parser
801         support was already in.  Having support for HTMLIsIndexElement was causing
802         one of the IE TestCenter tests to fail.
803
804         Test: fast/dom/HTMLIsIndexElement/prototype-chain.html
805
806         * DerivedSources.cpp:
807         * DerivedSources.make:
808         * DerivedSources.pri:
809         * GNUmakefile.list.am:
810         * Target.pri:
811         * WebCore.exp.in:
812         * WebCore.gypi:
813         * WebCore.order:
814         * WebCore.vcproj/WebCore.vcproj:
815         * WebCore.xcodeproj/project.pbxproj:
816         * bindings/gobject/GNUmakefile.am:
817         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
818         (WebKit::createHTMLElementWrapper):
819         * bindings/objc/DOM.mm:
820         (WebCore::createElementClassMap):
821         * bindings/objc/DOMHTML.h:
822         * bindings/objc/PublicDOMInterfaces.h:
823         * html/HTMLElementsAllInOne.cpp:
824         * html/HTMLIsIndexElement.cpp: Removed.
825         * html/HTMLIsIndexElement.h: Removed.
826         * html/HTMLIsIndexElement.idl: Removed.
827         * html/HTMLTagNames.in:
828         * page/DOMWindow.idl:
829
830 2012-01-31  Alexis Menard  <alexis.menard@openbossa.org>
831
832         Unreviewed include cleanup.
833
834         Tested locally on Qt and Chromium port.
835
836         * dom/Node.cpp:
837
838 2012-01-31  Arko Saha  <arko@motorola.com>
839
840         The spec renamed addTrack() to addTextTrack().
841         https://bugs.webkit.org/show_bug.cgi?id=77381
842
843         Reviewed by Eric Carlson.
844
845         Renamed addTrack() to addTextTrack().
846         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements
847
848         * html/HTMLMediaElement.cpp:
849         (WebCore::HTMLMediaElement::addTextTrack):
850         * html/HTMLMediaElement.h:
851         (WebCore::HTMLMediaElement::addTextTrack):
852         * html/HTMLMediaElement.idl:
853
854 2012-01-31  Peter Rybin  <peter.rybin@gmail.com>
855
856         Web Inspector: CodeGeneratorInspector.py: reimplement generated array types
857         https://bugs.webkit.org/show_bug.cgi?id=77289
858
859         Reviewed by Vsevolod Vlasov.
860
861         Arrays are now rendered as a single template class. Its type-specific
862         details are provided by an additional ArrayItemHelper class that is
863         defined using C++ specialization technique.
864
865         * inspector/CodeGeneratorInspector.py:
866         (RawTypes.String):
867         (RawTypes.String.get_array_item_raw_c_type_text):
868         (RawTypes.Int):
869         (RawTypes.Int.get_array_item_raw_c_type_text):
870         (RawTypes.Number):
871         (RawTypes.Number.get_array_item_raw_c_type_text):
872         (RawTypes.Bool):
873         (RawTypes.Bool.get_array_item_raw_c_type_text):
874         (RawTypes.Object):
875         (RawTypes.Object.get_array_item_raw_c_type_text):
876         (RawTypes.Any):
877         (RawTypes.Any.get_array_item_raw_c_type_text):
878         (RawTypes.Array):
879         (RawTypes.Array.get_array_item_raw_c_type_text):
880         (RawTypes):
881         (TypeBindings.create_type_declaration_.EnumBinding):
882         (TypeBindings.create_type_declaration_.EnumBinding.get_array_item_c_type_text):
883         (TypeBindings.create_type_declaration_.PlainString):
884         (TypeBindings.create_type_declaration_.PlainString.get_array_item_c_type_text):
885         (TypeBindings.create_type_declaration_.TypedefString):
886         (TypeBindings.create_type_declaration_.TypedefString.get_array_item_c_type_text):
887         (StructItemTraits):
888         (get_array_item_c_type_text):
889         (PlainObjectBinding):
890         (PlainObjectBinding.get_array_item_c_type_text):
891         (AdHocTypeContext):
892         (AdHocTypeContext.get_type_name_fix):
893         (AdHocTypeContext.add_type):
894         (ArrayBinding):
895         (ArrayBinding.resolve_inner):
896         (ArrayBinding.resolve_inner.ResolveData):
897         (ArrayBinding.request_user_runtime_cast):
898         (ArrayBinding.request_internal_runtime_cast):
899         (ArrayBinding.get_code_generator):
900         (ArrayBinding.get_code_generator.CodeGenerator):
901         (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder):
902         (ArrayBinding.get_code_generator.CodeGenerator.generate_forward_declaration):
903         (ArrayBinding.get_code_generator.CodeGenerator.register_use):
904         (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
905         (ArrayBinding.get_validator_call_text):
906         (ArrayBinding.get_in_c_type_text):
907         (ArrayBinding.get_array_item_c_type_text):
908         (ArrayBinding.get_setter_value_expression_pattern):
909         (ArrayBinding.reduce_to_raw_type):
910         (RawTypeBinding.get_array_item_c_type_text):
911         (ArrayItemHelper):
912         (typename):
913         (ArrayOf):
914         (Traits):
915
916 2012-01-31  Antti Koivisto  <antti@apple.com>
917
918         Parent SVGFontFaceElements style declaration to the rule
919         https://bugs.webkit.org/show_bug.cgi?id=77421
920
921         Reviewed by Adam Roben.
922
923         For some reason the declaration is parented to the element which adds a bunch of unnecessary special case code.
924         The invalidation on mutation is done explicitly by SVGFontFaceElement so that is not affected. The declaration
925         is not exposed so the change is not observable with a test.
926
927         * css/CSSFontFaceRule.cpp:
928         (WebCore::CSSFontFaceRule::~CSSFontFaceRule):
929         * css/CSSMutableStyleDeclaration.h:
930         (WebCore::CSSMutableStyleDeclaration::createInline):
931         * svg/SVGFontFaceElement.cpp:
932         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
933         (WebCore::SVGFontFaceElement::parseMappedAttribute):
934         (WebCore::SVGFontFaceElement::fontFamily):
935         (WebCore::SVGFontFaceElement::rebuildFontFace):
936         * svg/SVGFontFaceElement.h:
937         
938             Remove the unnecessary m_styleDeclaration field, access through m_fontFaceRule instead.
939
940 2012-01-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
941
942         Tap highlighting: Support better outlines for multiline inlines
943         https://bugs.webkit.org/show_bug.cgi?id=77428
944
945         Reviewed by Simon Hausmann.
946
947         Covered by manual tests.
948
949         Do not use the linesBoundingBox anymore but draw a custom path
950         with rounded corners. Inlines are drawn as max 3 rects, first
951         line rect, joined middle rect and the rect for the last line.
952
953         * page/GestureTapHighlighter.cpp:
954         * platform/graphics/Path.h: Make addBeziersForRoundedRect public.
955
956 2012-01-31  Alexei Filippov  <alexeif@chromium.org>
957
958         Web Inspector: show sizes in bytes instead of KB, MB in heap profiler.
959         https://bugs.webkit.org/show_bug.cgi?id=77199
960
961         Reviewed by Pavel Feldman.
962
963         * inspector/front-end/DetailedHeapshotGridNodes.js:
964         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
965         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
966         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
967         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
968         * inspector/front-end/UIUtils.js:
969         (Number.withThousandsSeparator):
970
971 2012-01-26  Hans Wennborg  <hans@chromium.org>
972
973         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
974         https://bugs.webkit.org/show_bug.cgi?id=77083
975
976         Reviewed by Darin Fisher.
977
978         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
979         implementation.
980
981         No new tests, just refactoring.
982
983         * GNUmakefile.list.am:
984         * Target.pri:
985         * WebCore.gypi:
986         * WebCore.vcproj/WebCore.vcproj:
987         * WebCore.xcodeproj/project.pbxproj:
988         * platform/mock/SpeechInputClientMock.cpp: Removed.
989         * platform/mock/SpeechInputClientMock.h: Removed.
990
991 2012-01-31  Pavel Feldman  <pfeldman@google.com>
992
993         Web Inspector: boost protocol version to 1.0
994         https://bugs.webkit.org/show_bug.cgi?id=77408
995
996         Reviewed by Yury Semikhatsky.
997
998         * inspector/Inspector-1.0.json: Copied from Source/WebCore/inspector/Inspector.json.
999         * inspector/Inspector.json:
1000
1001 2012-01-31  Roland Steiner  <rolandsteiner@chromium.org>
1002
1003         <style scoped>: Improve shortcut code for cases where <style scoped> isn't used
1004         https://bugs.webkit.org/show_bug.cgi?id=77410
1005
1006         Move shortcut from setupScopingElementStack(), do it at the calling sites instead
1007         (where a larger chunk of work can be skipped).
1008
1009         Reviewed by Antti Koivisto.
1010
1011         No new tests. (refactoring)
1012
1013         * css/CSSStyleSelector.cpp:
1014         (WebCore::CSSStyleSelector::setupScopingElementStack): remove shortcut code
1015         (WebCore::CSSStyleSelector::pushParent): add shortcut code
1016         (WebCore::CSSStyleSelector::matchScopedAuthorRules): factor matching scoped rules out from matchAuthorRules
1017         (WebCore::CSSStyleSelector::matchAuthorRules): add shortcut code
1018         * css/CSSStyleSelector.h:
1019         (CSSStyleSelector): add matchScopedAuthorRules
1020
1021 2012-01-31  Pavel Feldman  <pfeldman@google.com>
1022
1023         Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM event names.
1024         https://bugs.webkit.org/show_bug.cgi?id=77409
1025
1026         Reviewed by Yury Semikhatsky.
1027
1028         * inspector/Inspector.json:
1029         * inspector/InspectorDOMDebuggerAgent.cpp:
1030         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
1031         (WebCore):
1032         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
1033         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
1034         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
1035         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
1036         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
1037         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1038         * inspector/InspectorDOMDebuggerAgent.h:
1039         (InspectorDOMDebuggerAgent):
1040         * inspector/InspectorInstrumentation.cpp:
1041         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
1042         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
1043         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1044         (WebCore::InspectorInstrumentation::willFireTimerImpl):
1045         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1046         * inspector/InspectorInstrumentation.h:
1047         (InspectorInstrumentation):
1048         * inspector/front-end/BreakpointsSidebarPane.js:
1049         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
1050         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):
1051
1052 2012-01-31  Pablo Flouret  <pablof@motorola.com>
1053
1054         Fix compilation errors on build-webkit --debug --no-workers on mac.
1055         https://bugs.webkit.org/show_bug.cgi?id=75869
1056
1057         Reviewed by Adam Barth.
1058
1059         * WebCore.exp.in:
1060
1061 2012-01-30  Konrad Piascik  <kpiascik@rim.com>
1062
1063         Web Inspector: [BlackBerry] Add BlackBerry UA Strings to the Inspector's UA switcher
1064         https://bugs.webkit.org/show_bug.cgi?id=77343
1065
1066         Reviewed by Yury Semikhatsky.
1067
1068         * inspector/front-end/SettingsScreen.js:
1069         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
1070
1071 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1072
1073         Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit
1074         https://bugs.webkit.org/show_bug.cgi?id=77331
1075
1076         Inspector instrumentation is called before and after each event handler invokation.
1077         In case inspector front-end is closed it is no-op, otherwise it may stop execution
1078         on an event listener breakpoint.
1079
1080         Reviewed by Pavel Feldman.
1081
1082         Test: inspector/debugger/step-through-event-listeners.html
1083
1084         * dom/EventTarget.cpp:
1085         (WebCore::EventTarget::fireEventListeners):
1086         * inspector/InspectorInstrumentation.cpp:
1087         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1088         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1089         (WebCore):
1090         (WebCore::InspectorInstrumentation::didHandleEventImpl):
1091         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
1092         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
1093         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
1094         * inspector/InspectorInstrumentation.h:
1095         (InspectorInstrumentation):
1096         (WebCore::InspectorInstrumentation::willHandleEvent):
1097         (WebCore):
1098         (WebCore::InspectorInstrumentation::didHandleEvent):
1099
1100 2011-01-30  Hayato Ito  <hayato@chromium.org>
1101
1102         Attach light children after removing a shadow root.
1103         https://bugs.webkit.org/show_bug.cgi?id=74267
1104
1105         Reviewed by Ryosuke Niwa.
1106
1107         Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html
1108                fast/dom/shadow/dynamically-created-shadow-root.html:
1109
1110         * dom/Element.cpp:
1111         (WebCore::Element::removeShadowRoot):
1112
1113 2012-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1114
1115         Unreviewed, rolling out r106324.
1116         http://trac.webkit.org/changeset/106324
1117         https://bugs.webkit.org/show_bug.cgi?id=77406
1118
1119         Broke CCLayerTreeHostTestLayerOcclusion.runMultiThread and
1120         runSingleThread (Requested by yuzo1 on #webkit).
1121
1122         * platform/graphics/FloatRect.cpp:
1123         * platform/graphics/FloatRect.h:
1124         (WebCore):
1125         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1126         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1127         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1128         (WebCore):
1129         (Canvas2DLayerChromium):
1130         * platform/graphics/chromium/ContentLayerChromium.cpp:
1131         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1132         * platform/graphics/chromium/ContentLayerChromium.h:
1133         (WebCore):
1134         (ContentLayerChromium):
1135         * platform/graphics/chromium/ImageLayerChromium.cpp:
1136         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1137         * platform/graphics/chromium/ImageLayerChromium.h:
1138         (WebCore):
1139         (ImageLayerChromium):
1140         * platform/graphics/chromium/LayerChromium.cpp:
1141         * platform/graphics/chromium/LayerChromium.h:
1142         (WebCore):
1143         (WebCore::LayerChromium::paintContentsIfDirty):
1144         (LayerChromium):
1145         * platform/graphics/chromium/RenderSurfaceChromium.h:
1146         * platform/graphics/chromium/TiledLayerChromium.cpp:
1147         * platform/graphics/chromium/TiledLayerChromium.h:
1148         (WebCore):
1149         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1150         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
1151         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1152         (WebCore::CCLayerTreeHost::paintLayerContents):
1153         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1154         (WebCore):
1155         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1156         (WebCore::enclosedIntRect):
1157         (WebCore):
1158
1159 2012-01-30  Raymond Liu  <raymond.liu@intel.com>
1160
1161         Fix ASSERT fail within AudioBus::processWithGainFrom()
1162         https://bugs.webkit.org/show_bug.cgi?id=76685
1163
1164         Reviewed by Daniel Bates.
1165
1166         Test: webaudio/audionode-connect-order.html
1167
1168         * webaudio/AudioBasicProcessorNode.cpp:
1169         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
1170
1171 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
1172
1173         <style scoped>: Implement scoped stylesheets and basic application
1174         https://bugs.webkit.org/show_bug.cgi?id=73190
1175
1176         Implementing support for <style scoped>:
1177         Add a vector stack to CSSStyleSelector that keeps track of encountered scoping elements. This is
1178         used for O(1) access to all relevant style sheets for a given element.
1179         Adapt matching of author style sheets to also consult appropriate scoped sheets.
1180         Finally, prevent style sharing from crossing into/out of scoped style boundaries.
1181
1182         Reviewed by Antti Koivisto.
1183
1184         Tests: fast/css/style-scoped/style-scoped-attach.html
1185                fast/css/style-scoped/style-scoped-basic.html
1186                fast/css/style-scoped/style-scoped-detach.html
1187                fast/css/style-scoped/style-scoped-remove-scoped.html
1188                fast/css/style-scoped/style-scoped-set-scoped.html
1189
1190         * css/CSSStyleSelector.cpp:
1191         (RuleSet):
1192         (WebCore::CSSStyleSelector::CSSStyleSelector): add code for scoped style sheets
1193         (WebCore::CSSStyleSelector::collectFeatures): ditto
1194         (WebCore):
1195         (WebCore::CSSStyleSelector::determineScopingElement): determine whether an author sheet is scoped (and to which scope), or global
1196         (WebCore::CSSStyleSelector::scopedRuleSetForElement): returns the RuleSet for the <style scoped> contained by the passed-in element (if any), or 0
1197         (WebCore::CSSStyleSelector::appendAuthorStylesheets): add code for scoped style sheets
1198         (WebCore::CSSStyleSelector::setupScopingElementStack): determine scoping element ancestors of the given element
1199         (WebCore::CSSStyleSelector::pushParent): simplify and refactor SelectorChecker::pushParent, as code in CSStyleSelector needs partial access
1200         (WebCore::CSSStyleSelector::popParent): ditto
1201         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules): helper function
1202         (WebCore::CSSStyleSelector::matchAuthorRules): use AuthorRuleSetIterator to iterate over all relevant RuleSets
1203         (WebCore::CSSStyleSelector::matchRules): adapt for scoped style rules
1204         (WebCore::CSSStyleSelector::matchAllRules): ditto
1205         (WebCore::CSSStyleSelector::locateCousinList): prevent style sharing across scope boundaries
1206         (WebCore::CSSStyleSelector::canShareStyleWithElement): ditto
1207         (WebCore::CSSStyleSelector::locateSharedStyle): ditto
1208         (WebCore::CSSStyleSelector::pseudoStyleForElement): changed call to matchAuthorRules
1209         (WebCore::CSSStyleSelector::styleForPage): add comment
1210         (WebCore::CSSStyleSelector::checkRegionStyle): add global scope parameter
1211         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): changed call to matchAuthorRules
1212         (WebCore::RuleSet::addRulesFromSheet): adapt for scoped style rules
1213         * css/CSSStyleSelector.h:
1214         (CSSStyleSelector):
1215         (WebCore::CSSStyleSelector::ScopeStackFrame::ScopeStackFrame): struct holding an Element pointer and a RuleSet pointer, to be used in a Vector
1216         (WebCore::CSSStyleSelector::scopingElementStackIsConsistent): returns if the last seen parent matches the passed-in element
1217         * css/SelectorChecker.cpp:
1218         (WebCore::SelectorChecker::setupParentStack): set up the parent stack (refactoring)
1219         (WebCore::SelectorChecker::pushParent): simplify and refactor
1220         * css/SelectorChecker.h:
1221         (WebCore::SelectorChecker::popParent): ditto
1222         (WebCore::SelectorChecker::parentStackIsEmpty): ditto
1223         (WebCore::SelectorChecker::parentStackIsConsistent): make parameter const
1224
1225 2012-01-30  Dana Jansens  <danakj@chromium.org>
1226
1227         [chromium] Compute occlusion during paint loop
1228         https://bugs.webkit.org/show_bug.cgi?id=76858
1229
1230         Reviewed by James Robinson.
1231
1232         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
1233
1234         * platform/graphics/FloatRect.cpp:
1235         (WebCore::enclosedIntRect):
1236         (WebCore):
1237         * platform/graphics/FloatRect.h:
1238         (WebCore):
1239         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1240         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1241         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1242         (Canvas2DLayerChromium):
1243         * platform/graphics/chromium/ContentLayerChromium.cpp:
1244         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1245         * platform/graphics/chromium/ContentLayerChromium.h:
1246         (ContentLayerChromium):
1247         * platform/graphics/chromium/ImageLayerChromium.cpp:
1248         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1249         * platform/graphics/chromium/ImageLayerChromium.h:
1250         (ImageLayerChromium):
1251         * platform/graphics/chromium/LayerChromium.cpp:
1252         (WebCore::LayerChromium::contentToScreenSpaceTransform):
1253         (WebCore):
1254         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
1255         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
1256         * platform/graphics/chromium/LayerChromium.h:
1257         (WebCore):
1258         (WebCore::LayerChromium::paintContentsIfDirty):
1259         (LayerChromium):
1260         * platform/graphics/chromium/RenderSurfaceChromium.h:
1261         (RenderSurfaceChromium):
1262         * platform/graphics/chromium/TiledLayerChromium.cpp:
1263         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
1264         * platform/graphics/chromium/TiledLayerChromium.h:
1265         (WebCore):
1266         ():
1267         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1268         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
1269         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1270         (RenderSurfaceRegion):
1271         (WebCore):
1272         (WebCore::pushTargetRenderSurfaceRegion):
1273         (WebCore::popAndPushTargetRenderSurfaceRegion):
1274         (WebCore::CCLayerTreeHost::paintLayerContents):
1275         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1276         (WebCore):
1277         ():
1278         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1279
1280 2012-01-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1281
1282         Add ElementAttributeData class to replace internal uses of NamedNodeMap
1283         https://bugs.webkit.org/show_bug.cgi?id=77233
1284
1285         Reviewed by Andreas Kling.
1286
1287         Move part of non-DOM functionality of NamedNodeMap into a separate class. This is
1288         the first step toward the goal of separating NamedNodeMap from internal attribute
1289         storage, as described in https://bugs.webkit.org/show_bug.cgi?id=75069.
1290
1291         The internal attribute storage is exposed as attributeData() in Element, and when
1292         necessary (because it has no back pointer to Element) via methods in Element.
1293
1294         No new tests. Except from setClass() change this is just moving the code, no new
1295         feature was added.
1296
1297         * CMakeLists.txt:
1298         * GNUmakefile.list.am:
1299         * Target.pri:
1300         * WebCore.gypi:
1301         * WebCore.xcodeproj/project.pbxproj:
1302         * dom/DOMAllInOne.cpp:
1303         * dom/Element.cpp:
1304         (WebCore::Element::idAttributeChanged):
1305         * dom/Element.h:
1306         (WebCore::Element::attributeData):
1307         (WebCore::Element::ensureAttributeData):
1308         (Element):
1309         (WebCore::Element::idForStyleResolution):
1310         * dom/ElementAttributeData.cpp: Added.
1311         (WebCore):
1312         (WebCore::ElementAttributeData::setClass): the only caller of this function
1313         already deal with the case when the element has no class, so don't do it here.
1314         * dom/ElementAttributeData.h: Added.
1315         (WebCore):
1316         (ElementAttributeData):
1317         (WebCore::ElementAttributeData::clearClass):
1318         (WebCore::ElementAttributeData::classNames):
1319         (WebCore::ElementAttributeData::idForStyleResolution):
1320         (WebCore::ElementAttributeData::setIdForStyleResolution):
1321         (WebCore::ElementAttributeData::ElementAttributeData):
1322         * dom/NamedNodeMap.cpp:
1323         (WebCore::NamedNodeMap::clearAttributes):
1324         * dom/NamedNodeMap.h:
1325         (WebCore::NamedNodeMap::attributeData):
1326         (NamedNodeMap):
1327         * dom/StyledElement.cpp:
1328         (WebCore::StyledElement::classAttributeChanged):
1329         * dom/StyledElement.h:
1330         (WebCore::StyledElement::classNames):
1331         * html/ClassList.cpp:
1332         (WebCore::ClassList::classNames):
1333
1334 2012-01-30  Gregg Tavares  <gman@chromium.org>
1335
1336         Add Plumming to get graphics error messages to JS Console
1337         https://bugs.webkit.org/show_bug.cgi?id=77238
1338
1339         Reviewed by Kenneth Russell.
1340
1341         No new tests. No change in behavior.
1342
1343         * html/canvas/WebGLRenderingContext.cpp:
1344         (WebGLRenderingContextErrorMessageCallback):
1345         (WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback):
1346         (WebCore::WebGLRenderingContextErrorMessageCallback::onErrorMessage):
1347         (WebCore::WebGLRenderingContextErrorMessageCallback::~WebGLRenderingContextErrorMessageCallback):
1348         (WebCore):
1349         (WebCore::WebGLRenderingContext::create):
1350         (WebCore::WebGLRenderingContext::initializeNewContext):
1351         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
1352         * html/canvas/WebGLRenderingContext.h:
1353         (WebGLRenderingContext):
1354         * platform/graphics/GraphicsContext3D.h:
1355         (ErrorMessageCallback):
1356         (WebCore::GraphicsContext3D::ErrorMessageCallback::~ErrorMessageCallback):
1357         (GraphicsContext3D):
1358         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1359         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1360         (WebCore):
1361         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1362         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1363         (WebCore):
1364         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1365         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1366         (WebCore):
1367
1368 2012-01-30  Anders Carlsson  <andersca@apple.com>
1369
1370         Simplify RenderLayerCompositor::frameViewDidScroll
1371         https://bugs.webkit.org/show_bug.cgi?id=77398
1372
1373         Reviewed by Sam Weinig.
1374
1375         Remove the scrollPosition parameter from RenderLayerCompositor::frameViewDidScroll; we can just get it
1376         from the associated FrameView object.
1377
1378         * page/FrameView.cpp:
1379         (WebCore::FrameView::scrollPositionChanged):
1380         * rendering/RenderLayerCompositor.cpp:
1381         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1382         Call frameViewDidScroll() here instead of setting the scroll layer position explicitly.
1383
1384         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1385         (WebCore::RenderLayerCompositor::ensureRootLayer):
1386         * rendering/RenderLayerCompositor.h:
1387         (RenderLayerCompositor):
1388
1389 2012-01-30  Pablo Flouret  <pablof@motorola.com>
1390
1391         Don't select the next selectable index when deselecting an option in select elements with size set to a value greater than one.
1392         https://bugs.webkit.org/show_bug.cgi?id=76389
1393
1394         Reviewed by Kent Tamura.
1395
1396         This behavior matches the rest of the browsers.
1397
1398         Test: fast/forms/select/option-selecting.html
1399
1400         * html/HTMLSelectElement.cpp:
1401         (WebCore::HTMLSelectElement::optionSelectionStateChanged):
1402
1403 2012-01-30  Anders Carlsson  <andersca@apple.com>
1404
1405         Scrollbars don't show when scrolling on the scrolling thread
1406         https://bugs.webkit.org/show_bug.cgi?id=77396
1407         <rdar://problem/10710736>
1408
1409         Reviewed by Sam Weinig.
1410
1411         Use ScrollAnimator::scrollToOffsetWithoutAnimation when updating the frame view scroll offset,
1412         since that function will end up invalidating the scrollbars correctly.
1413
1414         * page/ScrollingCoordinator.cpp:
1415         (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
1416
1417 2012-01-30  Anders Carlsson  <andersca@apple.com>
1418
1419         Show repaint counters in individual tiles
1420         https://bugs.webkit.org/show_bug.cgi?id=77390
1421         <rdar://problem/10767967>
1422
1423         Reviewed by Darin Adler.
1424
1425         * platform/graphics/ca/mac/TileCache.h:
1426         * platform/graphics/ca/mac/TileCache.mm:
1427         (WebCore::TileCache::setNeedsDisplayInRect):
1428         Make sure to invalidate the repaint counter rect if necessary.
1429
1430         (WebCore::TileCache::drawLayer):
1431         Draw the repaint counter.
1432
1433         (WebCore::TileCache::showRepaintCounter):
1434         New function that determines whether we should show repaint counters for the given tile cache.
1435
1436         * platform/graphics/ca/mac/WebTileLayer.h:
1437         * platform/graphics/ca/mac/WebTileLayer.mm:
1438         (-[WebTileLayer incrementRepaintCount]):
1439         Add method for getting the repaint count.
1440
1441 2012-01-30  Dan Bernstein  <mitz@apple.com>
1442
1443         <rdar://problem/10778045> REGRESSION (r91935): text-combine fails
1444         https://bugs.webkit.org/show_bug.cgi?id=77373
1445
1446         Reviewed by Darin Adler.
1447
1448         Removed tests that were failing because of this bug from the Lion skipped
1449         list.
1450
1451         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1452         (WebCore::GlyphPage::fill): Changed to use CTFontGetGlyphsForCharacters,
1453         rather than wkGetVerticalGlyphsForCharacters, for non-fullwidth fonts.
1454
1455 2012-01-30  Christopher Hutten-Czapski  <chutten@rim.com>
1456
1457         BlackBerry - Support Proxy-Authenticate headers when a proxy is configured
1458         https://bugs.webkit.org/show_bug.cgi?id=77361
1459
1460         Though we have a proxy configured, we might not have the auth
1461         credentials it requires. Support Proxy-Authenticate for that case.
1462
1463         Reviewed by George Staikos.
1464
1465         * platform/network/blackberry/NetworkJob.cpp:
1466         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1467         (WebCore::NetworkJob::handleAuthHeader):
1468         (WebCore::NetworkJob::sendRequestWithCredentials):
1469         * platform/network/blackberry/NetworkJob.h:
1470         * platform/network/blackberry/NetworkManager.cpp:
1471         (WebCore::NetworkManager::startJob):
1472
1473 2012-01-27  James Robinson  <jamesr@chromium.org>
1474
1475         [chromium] Remove unnecessary retry logic in LayerRendererChromium initialization for accelerated painting
1476         https://bugs.webkit.org/show_bug.cgi?id=77247
1477
1478         Reviewed by Kenneth Russell.
1479
1480         The accelerate painting setting is done differently from other capability-dependent settings for no good reason,
1481         requiring that we retry initialization with different settings. For all other settings we set the capabilities
1482         bit to true if the setting is requested and if the required capabilities exist on the underlying context.
1483
1484         * platform/graphics/chromium/LayerRendererChromium.cpp:
1485         (WebCore::LayerRendererChromium::create):
1486         (WebCore::LayerRendererChromium::initialize):
1487         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1488         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1489
1490 2012-01-30  Brady Eidson  <beidson@apple.com>
1491
1492         <rdar://problem/10707072>
1493         Crashes in WebProcess at WebCore::Node::rendererIsNeeded
1494
1495         Reviewed by Darin Adler.
1496
1497         In specific circumstances a plugin element can be without a render style at the point in time where
1498         the page navigated and enters the page cache.
1499
1500         When this is the cash, the element should not enter into the "custom style for renderer" mode and should
1501         instead use the default render style machinery.
1502
1503         Test: plugins/crash-restoring-pluging-page-from-page-cache.html
1504
1505         * html/HTMLPlugInImageElement.cpp:
1506         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Only setHasCustomStyleForRenderer and 
1507           forceRecalc if there actually is a custom style to be used.
1508         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Only clearHasCustomStyleForRenderer if there
1509           actually was a custom style to be cleared.
1510         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): This should only be called if there actually is a 
1511           custom style to be used. Otherwise the element would have to fallback to the "normal" RenderStyle which might
1512           not exist.
1513
1514 2012-01-30  Anders Carlsson  <andersca@apple.com>
1515
1516         Show debug borders for individual tile cache tiles
1517         https://bugs.webkit.org/show_bug.cgi?id=77388
1518
1519         Reviewed by Sam Weinig.
1520
1521         * platform/graphics/GraphicsLayer.cpp:
1522         (WebCore::GraphicsLayer::updateDebugIndicators):
1523         Give tile cache tiles a thin dark blue border.
1524
1525         * platform/graphics/ca/mac/TileCache.h:
1526         (WebCore::TileCache::tileDebugBorderWidth):
1527         (WebCore::TileCache::tileDebugBorderColor):
1528         Add getters and member variables for the tile debug border width and color.
1529
1530         * platform/graphics/ca/mac/TileCache.mm:
1531         (WebCore::TileCache::TileCache):
1532         Initialize m_tileDebugBorderWidth.
1533
1534         (WebCore::TileCache::setTileDebugBorderWidth):
1535         Update the border width of each tile layer.
1536
1537         (WebCore::TileCache::setTileDebugBorderColor):
1538         Update the border color of each tile layer.
1539
1540         (WebCore::TileCache::createTileLayer):
1541         Set the border color and border width.
1542
1543         * platform/graphics/ca/mac/WebTileCacheLayer.h:
1544         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
1545         (-[WebTileCacheLayer borderColor]):
1546         (-[WebTileCacheLayer setBorderColor:]):
1547         (-[WebTileCacheLayer borderWidth]):
1548         (-[WebTileCacheLayer setBorderWidth:]):
1549         Call through to the TileCache.
1550
1551         * platform/graphics/mac/WebLayer.mm:
1552         (drawLayerContents):
1553         Don't draw the repaint counter for tile cache layers, each tile will maintain its own repaint counter.
1554
1555 2012-01-30  Rakesh KN  <rakesh.kn@motorola.com>
1556
1557         single-file input elements should refuse multi-file drags
1558         https://bugs.webkit.org/show_bug.cgi?id=25913
1559
1560         Reviewed by Eric Seidel.
1561
1562         Refuse the multiple file drags onto a single file input element.
1563
1564         No new tests: Covered by existing tests, updated the expected results.
1565
1566         * page/DragController.cpp:
1567         (WebCore::DragController::tryDocumentDrag):
1568         Setting the dragSession.numberOfItemsToBeAccepted to 0 so that drag operation is none if the
1569         file input element under mouse is single input type and number of files dragged onto that
1570         input element are more than 1.
1571
1572 2012-01-30  Dana Jansens  <danakj@chromium.org>
1573
1574         [chromium] Use region reported painted opaque for draw culling
1575         https://bugs.webkit.org/show_bug.cgi?id=76015
1576
1577         Reviewed by James Robinson.
1578
1579         New unit tests in CCTiledLayerImplTest.cpp, CCQuadCullerTest.cpp, CCLayerTreeHostImplTest.cpp
1580
1581         * platform/graphics/chromium/LayerChromium.cpp:
1582         (WebCore::LayerChromium::setOpaque):
1583         * platform/graphics/chromium/TiledLayerChromium.cpp:
1584         (UpdatableTile):
1585         (WebCore::TiledLayerChromium::pushPropertiesTo):
1586         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1587         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
1588         (WebCore::CCDrawQuad::opaqueRect):
1589         (WebCore):
1590         * platform/graphics/chromium/cc/CCDrawQuad.h:
1591         (CCDrawQuad):
1592         (WebCore::CCDrawQuad::needsBlending):
1593         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1594         (WebCore::CCQuadCuller::cullOccludedQuads):
1595         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
1596         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
1597         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
1598         (WebCore::CCTileDrawQuad::create):
1599         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
1600         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
1601         (CCTileDrawQuad):
1602         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1603         (DrawableTile):
1604         (WebCore::DrawableTile::opaqueRect):
1605         (WebCore::DrawableTile::setOpaqueRect):
1606         (WebCore::CCTiledLayerImpl::appendQuads):
1607         (WebCore::CCTiledLayerImpl::pushTileProperties):
1608         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1609         (CCTiledLayerImpl):
1610
1611 2012-01-30  Ryosuke Niwa  <rniwa@webkit.org>
1612
1613         Crash in previousLinePosition when moving into a root inline box without leaves
1614         https://bugs.webkit.org/show_bug.cgi?id=76812
1615
1616         Reviewed by Enrica Casucci.
1617
1618         The crash was caused by us assuming that every root inline box has at least one leaf,
1619         which isn't true when we create inline boxes for an empty text run with margin, border, etc...
1620
1621         Test: editing/selection/move-into-empty-root-inline-box.html
1622
1623         * editing/visible_units.cpp:
1624         (WebCore::previousLinePosition):
1625         (WebCore::nextLinePosition):
1626
1627 2012-01-30  Levi Weintraub  <leviw@chromium.org>
1628
1629         !m_insideRegionPaint assertion in RenderRegion.cpp is invalid
1630         https://bugs.webkit.org/show_bug.cgi?id=77372
1631
1632         Reviewed by David Hyatt.
1633
1634         Removing the !m_insideRegionPaint assertion that's in three functions in
1635         RenderRegion. It's triggering in numerous layout tests and isn't valid.
1636
1637         No new tests as this just removes assertions.
1638
1639         * rendering/RenderRegion.cpp:
1640         (WebCore::RenderRegion::setRenderBoxRegionInfo):
1641         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
1642         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
1643
1644 2012-01-30  Adrienne Walker  <enne@google.com>
1645
1646         [chromium] Always pre-reserve scrollbar and scroll corner textures
1647         https://bugs.webkit.org/show_bug.cgi?id=77251
1648
1649         Reviewed by James Robinson.
1650
1651         Add a flag to LayerChromium that says that a layer's textures should
1652         always be reserved. Prior to painting layers, find all layers marked
1653         as such and reserve their textures. This will prevent texture memory
1654         limits from being hit before the root layer's scrollbars are reserved
1655         and painted.
1656
1657         * platform/graphics/chromium/LayerChromium.cpp:
1658         (WebCore::LayerChromium::LayerChromium):
1659         * platform/graphics/chromium/LayerChromium.h:
1660         (LayerChromium):
1661         (WebCore::LayerChromium::reserveTextures):
1662         (WebCore::LayerChromium::setAlwaysReserveTextures):
1663         (WebCore::LayerChromium::alwaysReserveTextures):
1664         * platform/graphics/chromium/TiledLayerChromium.cpp:
1665         (WebCore::TiledLayerChromium::reserveTextures):
1666         * platform/graphics/chromium/TiledLayerChromium.h:
1667         ():
1668         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1669         (WebCore::CCLayerTreeHost::updateLayers):
1670         (WebCore::CCLayerTreeHost::reserveTextures):
1671         (WebCore):
1672         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1673         ():
1674
1675 2012-01-30  Beth Dakin  <bdakin@apple.com>
1676
1677         Speculative 32-bit build-fix.
1678
1679         * WebCore.exp.in:
1680
1681 2012-01-30  Mihnea Ovidenie  <mihnea@adobe.com>
1682
1683         [CSSRegions]Add support for background-color in region styling
1684         https://bugs.webkit.org/show_bug.cgi?id=71488
1685
1686         Reviewed by David Hyatt.
1687
1688         Based on work by Alexandru Chiculita (achicu@adobe.com).
1689         Previous patches for region styling were touching RenderObject::style() method. After several attempts to avoid regressions
1690         (including caching of RenderObject::style() pointer in most used methods), we decided to attempt a different approach:
1691         Step1: before each region is repainted, we compute the style for each box that falls into the region
1692         Step2: before paint, we store the box original style
1693         Step3: paint the region contents using the style in region
1694         Step4: after paint is finished, we restore the box original style (and store the box style in region for future region paint)
1695
1696         Tests for region styling are also enabled with this patch.
1697
1698         * WebCore.exp.in:
1699         * rendering/RenderFlowThread.cpp:
1700         (WebCore::RenderFlowThread::clearRenderBoxCustomStyle):
1701         (WebCore::RenderFlowThread::setRegionRangeForBox):
1702         * rendering/RenderFlowThread.h:
1703         ():
1704         * rendering/RenderLayer.cpp:
1705         (WebCore::RenderLayer::paint):
1706         (WebCore::RenderLayer::hitTest):
1707         * rendering/RenderObject.cpp:
1708         * rendering/RenderObject.h:
1709         (WebCore::RenderObject::style):
1710         (RenderObject):
1711         * rendering/RenderObjectChildList.cpp:
1712         (WebCore::RenderObjectChildList::removeChildNode):
1713         * rendering/RenderRegion.cpp:
1714         (WebCore::RenderRegion::RenderRegion):
1715         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
1716         (WebCore):
1717         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
1718         (WebCore::RenderRegion::paintReplaced):
1719         (WebCore::RenderRegion::setRenderBoxRegionInfo):
1720         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
1721         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
1722         (WebCore::RenderRegion::renderBoxRegionStyle):
1723         (WebCore::RenderRegion::computeStyleInRegion):
1724         (WebCore::RenderRegion::clearBoxStyleInRegion):
1725         * rendering/RenderRegion.h:
1726         (RenderRegion):
1727         * rendering/RenderView.cpp:
1728         (WebCore::RenderView::RenderView):
1729         * rendering/RenderView.h:
1730         (WebCore):
1731         (RenderView):
1732
1733 2012-01-30  Jessie Berlin  <jberlin@apple.com>
1734
1735         WebCore build exceeds address space on 32-bit Windows builders (again).
1736         https://bugs.webkit.org/show_bug.cgi?id=77357
1737
1738         Reviewed by Adam Roben.
1739
1740         Add an Inspector All-In-One file, but only use it in Release and Production builds.
1741         This differs from our other All-In-One files, but it is a better approach because it makes
1742         debugging possible in the Debug configuration (the symbols will be in the correct .obj file
1743         for the original .cpp files).
1744
1745         * WebCore.vcproj/WebCore.vcproj:
1746         Also, let VS have its way with the vcproj file.
1747         * inspector/InspectorAllInOne.cpp: Added.
1748
1749 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
1750
1751         Limit periodic flushing inside ImageBufferCG to just Lion
1752         https://bugs.webkit.org/show_bug.cgi?id=77353
1753         <rdar://problem/10328309>
1754
1755         Reviewed by Chris Marrin.
1756
1757         * platform/graphics/cg/ImageBufferCG.cpp:
1758         * platform/graphics/cg/ImageBufferDataCG.h:
1759
1760 2012-01-30  Tommy Widenflycht  <tommyw@google.com>
1761
1762         Memory leak caused by PeerConnection add a NULL media stream
1763         https://bugs.webkit.org/show_bug.cgi?id=76150
1764
1765         It was my missunderstanding that the IDL keyword [StrictTypeChecking] also protects against
1766         null or undefined arguments, it doesn't. Added checks for null pointers.
1767
1768         Reviewed by Adam Barth.
1769
1770         Test: fast/mediastream/peerconnection-addstream.html
1771
1772         * mediastream/PeerConnection.cpp:
1773         (WebCore::PeerConnection::addStream):
1774         (WebCore::PeerConnection::removeStream):
1775
1776 2012-01-26  Andy Estes  <aestes@apple.com>
1777
1778         [Windows] Optionally invert colors when drawing to a WebView's backing store.
1779         https://bugs.webkit.org/show_bug.cgi?id=77168
1780
1781         Reviewed by Sam Weinig.
1782
1783         * css/CSSPrimitiveValueMappings.h: Assert that CompositeDifference is
1784         not converted to a CSS value. Exposing a new compositing operation to
1785         CSS is outside the scope of this patch.
1786         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1787         * platform/graphics/GraphicsTypes.h: Add CompositeDifference as a
1788         CompositeOperator. Also, remove an outdated comment.
1789         * platform/graphics/cg/GraphicsContextCG.cpp:
1790         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map
1791         CompositeDifference to kCGBlendModeDifference.
1792
1793 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
1794
1795         Limit the shadow offset CG hack to just SL and Lion
1796         https://bugs.webkit.org/show_bug.cgi?id=77348
1797         <rdar://problem/10158016>
1798
1799         Reviewed by Chris Marrin.
1800
1801         No new tests, current tests cover this.
1802
1803         * platform/graphics/cg/GraphicsContextCG.cpp:
1804         (WebCore::GraphicsContext::setPlatformShadow):
1805
1806 2012-01-30  Beth Dakin  <bdakin@apple.com>
1807
1808         https://bugs.webkit.org/show_bug.cgi?id=77263
1809         PlatformScreenMac should not rely on NSWindow for important bits of data
1810
1811         Reviewed by Geoff Garen.
1812
1813         The main problem is that we cannot rely on the NSWindow for information about 
1814         the deviceScaleFactor because we cannot access an NSWindow from within 
1815         WebCore for WebKit2 windows. Instead, we can fetch it from 
1816         WebCore::deviceScaleFactor(), but we need a Frame to call that. So 
1817         screenAvailableRect and screenRect both now take a FrameView* instead of a 
1818         Widget*. All existing call sites actually sent a FrameView in anyway, so this 
1819         is not a big change, but it does require touching a lot of platforms.
1820         * WebCore.exp.in:
1821         * platform/PlatformScreen.h:
1822         (WebCore):
1823         * platform/blackberry/PlatformScreenBlackBerry.cpp:
1824         (WebCore::screenAvailableRect):
1825         (WebCore::screenRect):
1826         * platform/chromium/PlatformScreenChromium.cpp:
1827         (WebCore::screenRect):
1828         (WebCore::screenAvailableRect):
1829         * platform/chromium/PlatformSupport.h:
1830         (WebCore):
1831         (PlatformSupport):
1832         ():
1833         * platform/efl/PlatformScreenEfl.cpp:
1834         (WebCore::screenRect):
1835         (WebCore::screenAvailableRect):
1836         * platform/gtk/PlatformScreenGtk.cpp:
1837         (WebCore::screenRect):
1838         (WebCore::screenAvailableRect):
1839         * platform/qt/PlatformScreenQt.cpp:
1840         (WebCore::screenRect):
1841         (WebCore::screenAvailableRect):
1842         * platform/win/PlatformScreenWin.cpp:
1843         (WebCore::screenRect):
1844         (WebCore::screenAvailableRect):
1845         * platform/wx/ScreenWx.cpp:
1846         (WebCore::screenRect):
1847         (WebCore::screenAvailableRect):
1848
1849         The Mac-only functions toUserSpace() and toDeviceSpace() were also updated to 
1850         take a parameter for the deviceScaleFactor.
1851         * platform/mac/PlatformScreenMac.mm:
1852         (WebCore::screenRect):
1853         (WebCore::screenAvailableRect):
1854         (WebCore::toUserSpace):
1855         (WebCore::toDeviceSpace):
1856
1857 2012-01-30  Antti Koivisto  <antti@apple.com>
1858
1859         Kill CSSMutableStyleDeclarationConstIterator
1860         https://bugs.webkit.org/show_bug.cgi?id=77342
1861
1862         Reviewed by Sam Weinig.
1863
1864         CSSMutableStyleDeclaration is an array and should be iterated using an index. This simplifies the code.
1865
1866         * css/CSSMutableStyleDeclaration.cpp:
1867         (WebCore::CSSMutableStyleDeclaration::copyPropertiesFrom):
1868         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1869         (WebCore::CSSMutableStyleDeclaration::setProperty):
1870         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
1871         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
1872         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1873         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
1874         (WebCore::CSSMutableStyleDeclaration::merge):
1875         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1876         * css/CSSMutableStyleDeclaration.h:
1877         (WebCore):
1878         (WebCore::CSSMutableStyleDeclaration::createForSVGFontFaceElement):
1879         (CSSMutableStyleDeclaration):
1880         * css/CSSStyleDeclaration.cpp:
1881         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
1882         * css/CSSStyleDeclaration.h:
1883         (CSSStyleDeclaration):
1884         ():
1885         * css/CSSStyleSelector.cpp:
1886         (WebCore::CSSStyleSelector::styleForKeyframe):
1887         (WebCore::CSSStyleSelector::applyDeclaration):
1888         * editing/EditingStyle.cpp:
1889
1890 2012-01-30  Michael Saboff  <msaboff@apple.com>
1891
1892         Dromaeo tests call parseSimpleLengthValue() on 8 bit strings
1893         https://bugs.webkit.org/show_bug.cgi?id=76649
1894
1895         Reviewed by Geoffrey Garen.
1896
1897         No functionality change, therefore no new tests.
1898
1899         Added 8 bit patch for parseSimpleLengthValue().
1900
1901         * css/CSSParser.cpp:
1902         (WebCore::parseSimpleLengthValue):
1903
1904 2012-01-30  Michael Saboff  <msaboff@apple.com>
1905
1906         WebCore decodeEscapeSequences unnecessarily converts 8 bit strings to 16 bit when decoding.
1907         https://bugs.webkit.org/show_bug.cgi?id=76648
1908
1909         Reviewed by Geoffrey Garen.
1910
1911         Using new overloaded append(String&, offset, length)  member to build result string.
1912         The new member properly handles 8/16 bit-ness of strings.
1913
1914         Functionality not changed, therefore no new tests.
1915
1916         * platform/text/DecodeEscapeSequences.h:
1917         (WebCore::decodeEscapeSequences):
1918
1919 2012-01-30  Pavel Feldman  <pfeldman@google.com>
1920
1921         Not reviewed: follow up to r105625, use proper event categoty in inspector frontend.
1922
1923         * inspector/front-end/BreakpointsSidebarPane.js:
1924         (WebInspector.EventListenerBreakpointsSidebarPane):
1925
1926 2012-01-30  Parag Radke  <nrqv63@motorola.com>
1927
1928         REGRESSION (r82580): Reproducible crash in CSSPrimitiveValue::computeLengthDouble
1929         https://bugs.webkit.org/show_bug.cgi?id=61989
1930
1931         Reviewed by Simon Fraser.
1932
1933         According to css3 specs when font-size is specified in 'rems' for an element implies the font-size
1934         of the root element. In this case as HTML element has a property 'display:none' and hence renderer 
1935         is NULL causes this crash.
1936
1937         Test: fast/css/fontsize-unit-rems-crash.html
1938
1939         * css/CSSPrimitiveValue.cpp:
1940         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1941         Added a null check for the root element's RenderStyle as it can be null in case of html has a property
1942         hidden or display:none.
1943
1944 2012-01-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1945
1946         [Qt] WKTR: Use a software rendering pipiline when running tests.
1947         https://bugs.webkit.org/show_bug.cgi?id=76708
1948
1949         Reviewed by Kenneth Rohde Christiansen.
1950
1951         * platform/graphics/qt/TextureMapperQt.cpp: Allow setting the context to null.
1952         (WebCore::TextureMapperQt::setGraphicsContext):
1953         * platform/graphics/qt/TextureMapperQt.h:
1954         (WebCore::TextureMapperQt::initialize):
1955
1956 2012-01-27  Enrica Casucci  <enrica@apple.com>
1957
1958         Remove all references to NSPasteboard objects from the Pasteboard
1959         class interface on Mac.
1960         https://bugs.webkit.org/show_bug.cgi?id=77261
1961         
1962         This is cleanup work needed as first step in the direction of
1963         removing access to NSPasteboard from the WebProcess.
1964         This way all access to the NSPasteboard object are internal to
1965         the class.
1966         Removed static methods taking NSPasteboard as paramenter and changed
1967         the constructor of the class to take the pasteboard name instead of
1968         the NSPasteboard object.
1969
1970         Reviewed by Alexey Proskuryakov.
1971
1972         No new tests. There is no change in behavior.
1973
1974         * editing/Editor.cpp: Removed ununsed private method writeSelectionToPasteboard.
1975         (WebCore):
1976         * editing/Editor.h: Ditto.
1977         (Editor):
1978         ():
1979         * editing/mac/EditorMac.mm:
1980         (WebCore::Editor::writeSelectionToPasteboard):
1981         (WebCore::Editor::readSelectionFromPasteboard):
1982         * platform/Pasteboard.h:
1983         (Pasteboard):
1984         * platform/mac/ClipboardMac.mm:
1985         (WebCore::ClipboardMac::writeRange):
1986         (WebCore::ClipboardMac::writePlainText):
1987         (WebCore::ClipboardMac::writeURL):
1988         * platform/mac/DragDataMac.mm:
1989         (WebCore::DragData::asPlainText):
1990         (WebCore::DragData::asURL):
1991         (WebCore::DragData::asFragment):
1992         * platform/mac/PasteboardMac.mm:
1993         (WebCore::Pasteboard::generalPasteboard):
1994         (WebCore::Pasteboard::Pasteboard):
1995         (WebCore::Pasteboard::writeSelectionForTypes): Added.
1996         (WebCore::Pasteboard::writePlainText):
1997         (WebCore::Pasteboard::writeSelection):
1998         (WebCore::Pasteboard::writeURLForTypes): Added.
1999         (WebCore::Pasteboard::writeURL):
2000         (WebCore::Pasteboard::writeImage):
2001
2002 2012-01-29  Antti Koivisto  <antti@apple.com>
2003
2004         Reduce non-CSSOM API of CSSStyleDeclaration
2005         https://bugs.webkit.org/show_bug.cgi?id=77299
2006
2007         Reviewed by Andreas Kling.
2008
2009         CSSStyleDeclaration should expose the CSSOM API only. Subclasses should expose the internal API only. 
2010         This will move us closer to being able to split the CSSOM API from the internal implementation.
2011         
2012         - Make CSSStyleDeclaration CSSOM functions virtual, internal functions non-virtual.
2013         - Move implementations to subclasses (CSSComputedStyleDeclaration, CSSMutableStyleDeclaration).
2014         - Make CSSOM functions in the subclasses private (making it harder to invoke them internally).
2015         - Switch a bunch of places to use internal API instead of CSSOM.
2016
2017         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2018         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
2019         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
2020         
2021             Switch to *Internal versions of the CSSOM functions.
2022         
2023         * css/CSSComputedStyleDeclaration.cpp:
2024         (WebCore):
2025         (WebCore::CSSComputedStyleDeclaration::length):
2026         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2027         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
2028         
2029             Move copyPropertiesInSet to subclasses, devirtualize.
2030             
2031         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2032         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
2033         (WebCore::CSSComputedStyleDeclaration::getPropertyPriority):
2034         (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand):
2035         (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit):
2036         (WebCore::CSSComputedStyleDeclaration::setProperty):
2037         (WebCore::CSSComputedStyleDeclaration::removeProperty):
2038         * css/CSSComputedStyleDeclaration.h:
2039         (CSSComputedStyleDeclaration):
2040         * css/CSSFontFaceRule.cpp:
2041         (WebCore::CSSFontFaceRule::cssText):
2042         * css/CSSMutableStyleDeclaration.cpp:
2043         (WebCore::CSSMutableStyleDeclaration::length):
2044         (WebCore::CSSMutableStyleDeclaration::asText):
2045         (WebCore::CSSMutableStyleDeclaration::cssText):
2046         (WebCore):
2047         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
2048         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
2049         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
2050         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
2051         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
2052         (WebCore::CSSMutableStyleDeclaration::setProperty):
2053         (WebCore::CSSMutableStyleDeclaration::removeProperty):
2054         (WebCore::CSSMutableStyleDeclaration::copyPropertiesInSet):
2055         
2056             Move copyPropertiesInSet to subclasses, devirtualize.
2057         
2058         (WebCore::CSSMutableStyleDeclaration::cssPropertyMatches):
2059         (WebCore::CSSMutableStyleDeclaration::removeEquivalentProperties):
2060         
2061             Move diff() to CSSMutableStyleDeclaration, rename to removeEquivalentProperties, switch to mutate
2062             this object instead of the argument object.
2063     
2064         * css/CSSMutableStyleDeclaration.h:
2065         (CSSMutableStyleDeclaration):
2066         (WebCore::CSSMutableStyleDeclaration::propertyCount):
2067         (WebCore::CSSMutableStyleDeclaration::isEmpty):
2068         (WebCore::CSSMutableStyleDeclaration::propertyAt):
2069         
2070             Expose properties and property count internally (iterator should be removed in favor of these).
2071         
2072         * css/CSSStyleDeclaration.cpp:
2073         (WebCore):
2074         * css/CSSStyleDeclaration.h:
2075         (CSSStyleDeclaration):
2076         (WebCore::CSSStyleDeclaration::getPropertyCSSValueInternal):
2077         (WebCore::CSSStyleDeclaration::getPropertyValueInternal):
2078         (WebCore::CSSStyleDeclaration::setPropertyInternal):
2079         
2080             Add *Internal versions of some CSSOM APIs to support some editing and bindings uses.
2081             These take propertyIDs instead of strings names.
2082
2083         * css/CSSStyleRule.cpp:
2084         (WebCore::CSSStyleRule::cssText):
2085         * css/CSSStyleSelector.cpp:
2086         (WebCore::leftToRightDeclaration):
2087         (WebCore::rightToLeftDeclaration):
2088         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2089         (WebCore::CSSStyleSelector::matchPageRulesForList):
2090         * css/WebKitCSSKeyframeRule.cpp:
2091         (WebCore::WebKitCSSKeyframeRule::cssText):
2092         * dom/StyledElement.cpp:
2093         (WebCore::StyledElement::updateStyleAttribute):
2094         * editing/ApplyStyleCommand.cpp:
2095         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2096         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2097         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2098         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
2099         (WebCore::ApplyStyleCommand::addBlockStyle):
2100         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2101         * editing/EditingStyle.cpp:
2102         ():
2103         (WebCore::copyEditingProperties):
2104         (WebCore):
2105         (WebCore::propertyCSSValue):
2106         (WebCore::getRGBAFontColor):
2107         (WebCore::EditingStyle::overrideWithStyle):
2108         (WebCore::EditingStyle::removeStyleAddedByNode):
2109         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2110         (WebCore::EditingStyle::triStateOfStyle):
2111         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
2112         (WebCore::EditingStyle::prepareToApplyAt):
2113         (WebCore::removePropertiesInStyle):
2114         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2115         (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2116         (WebCore::StyleChange::StyleChange):
2117         (WebCore::fontWeightIsBold):
2118         (WebCore::getPropertiesNotIn):
2119         (WebCore::getIdentifierValue):
2120         (WebCore::hasTransparentBackgroundColor):
2121         * editing/EditingStyle.h:
2122         
2123             Adapt to changes.
2124     
2125         (WebCore):
2126         * editing/ReplaceSelectionCommand.cpp:
2127         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2128         (WebCore::handleStyleSpansBeforeInsertion):
2129         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2130         * editing/mac/EditorMac.mm:
2131         (WebCore::styleForSelectionStart):
2132         * editing/markup.cpp:
2133         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
2134         (WebCore::StyledMarkupAccumulator::appendElement):
2135         * html/ImageDocument.cpp:
2136         (WebCore::ImageDocument::resizeImageToFit):
2137         (WebCore::ImageDocument::restoreImageSize):
2138         (WebCore::ImageDocument::windowSizeChanged):
2139         * html/canvas/CanvasRenderingContext2D.cpp:
2140         (WebCore::CanvasRenderingContext2D::setFont):
2141         * html/canvas/CanvasStyle.cpp:
2142         (WebCore::currentColor):
2143         * inspector/InspectorStyleSheet.cpp:
2144         (WebCore::InspectorStyleSheet::revalidateStyle):
2145         * page/PageSerializer.cpp:
2146         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
2147         * rendering/RenderTreeAsText.cpp:
2148         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
2149         * svg/SVGStyledElement.cpp:
2150         (WebCore::SVGStyledElement::getPresentationAttribute):
2151
2152 2012-01-30  Pavel Feldman  <pfeldman@google.com>
2153
2154         Web Inspector: protocol validator should fail if one of response fields turns optional
2155         https://bugs.webkit.org/show_bug.cgi?id=76452
2156
2157         Reviewed by Yury Semikhatsky.
2158
2159         * inspector/Inspector-0.1.json:
2160         * inspector/Inspector.json:
2161         * inspector/generate-inspector-protocol-version:
2162         (compare_commands):
2163         (compare_events):
2164         (compare_params_list):
2165         (compare_types):
2166         (self_test):
2167
2168 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2169
2170         Web Inspector: keyboard navigation through comparison view in heap profiler should update retainers view
2171         https://bugs.webkit.org/show_bug.cgi?id=77326
2172
2173         Keyboard navigation in the detailed heap snapshot view now updates retainers view.
2174
2175         Reviewed by Pavel Feldman.
2176
2177         * inspector/front-end/DataGrid.js: Added SelectedNode/DeselectedNode events to DataGrid.
2178         (WebInspector.DataGridNode.prototype.select):
2179         (WebInspector.DataGridNode.prototype.deselect):
2180         * inspector/front-end/DetailedHeapshotView.js:
2181         (WebInspector.DetailedHeapshotView.prototype._selectionChanged):
2182         (WebInspector.DetailedHeapshotView.prototype._setRetainmentDataGridSource):
2183
2184 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2185
2186         Unreviewed. Fix inspector front-end compilation.
2187
2188         * inspector/front-end/RemoteObject.js:
2189         (WebInspector.RemoteObject):
2190         (WebInspector.RemoteObject.fromPayload):
2191
2192 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
2193
2194         Node::parentOrHostElement(): Node::shadowHost() already returns an Element*
2195         https://bugs.webkit.org/show_bug.cgi?id=77332
2196
2197         Reviewed by Kent Tamura.
2198
2199         No new tests. (simple refactoring)
2200
2201         * dom/Node.cpp:
2202         (WebCore::Node::parentOrHostElement):
2203
2204 2012-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2205
2206         Unreviewed. Fix make distcheck.
2207
2208         * GNUmakefile.am: Add idl files in Source/WebCore/html/shadow/ to
2209         EXTRA_DIST.
2210         * GNUmakefile.list.am: Add missing files.
2211
2212 2012-01-27  Vsevolod Vlasov  <vsevik@chromium.org>
2213
2214         Web Inspector: TabbedEditorContainer should save open tabs.
2215         https://bugs.webkit.org/show_bug.cgi?id=76912
2216
2217         Reviewed by Pavel Feldman.
2218
2219         Test: inspector/tabbed-editors-history.html
2220
2221         * inspector/front-end/ScriptsPanel.js:
2222         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
2223         (WebInspector.ScriptsPanel.prototype._reset):
2224         (WebInspector.ScriptsPanel.prototype._showFile):
2225         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
2226         (WebInspector.ScriptsPanel.prototype._editorSelected):
2227         (WebInspector.EditorContainer.prototype.uiSourceCodeAdded):
2228         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showFile):
2229         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset):
2230         * inspector/front-end/TabbedEditorContainer.js:
2231         (WebInspector.TabbedEditorContainer):
2232         (WebInspector.TabbedEditorContainer.prototype.showFile):
2233         (WebInspector.TabbedEditorContainer.prototype._editorClosedByUserAction):
2234         (WebInspector.TabbedEditorContainer.prototype._editorSelectedByUserAction):
2235         (WebInspector.TabbedEditorContainer.prototype._updateHistory.tabIdToURL):
2236         (WebInspector.TabbedEditorContainer.prototype._updateHistory):
2237         (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
2238         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
2239         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
2240         (WebInspector.TabbedEditorContainer.prototype.reset):
2241         (WebInspector.TabbedEditorContainer.History):
2242         (WebInspector.TabbedEditorContainer.History.prototype.index):
2243         (WebInspector.TabbedEditorContainer.History.prototype.update):
2244         (WebInspector.TabbedEditorContainer.History.prototype.remove):
2245         (WebInspector.TabbedEditorContainer.History.prototype.save):
2246         * inspector/front-end/TabbedPane.js:
2247         (WebInspector.TabbedPane.prototype.appendTab):
2248         (WebInspector.TabbedPane.prototype.closeTab):
2249         (WebInspector.TabbedPane.prototype._innerCloseTab):
2250         (WebInspector.TabbedPane.prototype.closeAllTabs):
2251         (WebInspector.TabbedPane.prototype.lastOpenedTabIds):
2252         (WebInspector.TabbedPane.prototype._tabsSelectChanged):
2253
2254 2012-01-30  Alexander Pavlov  <apavlov@chromium.org>
2255
2256         Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
2257         https://bugs.webkit.org/show_bug.cgi?id=77209
2258
2259         Reviewed by Pavel Feldman.
2260
2261         Check if the property value contains a ";" before kicking the freeflow text update.
2262
2263         * inspector/front-end/StylesSidebarPane.js:
2264         (WebInspector.StylePropertyTreeElement.prototype):
2265
2266 2012-01-30  Vsevolod Vlasov  <vsevik@chromium.org>
2267
2268         Web Inspector: Change Open Resource and Go To function shortcuts in scripts panel.
2269         https://bugs.webkit.org/show_bug.cgi?id=77321
2270
2271         Reviewed by Pavel Feldman.
2272
2273         * inspector/front-end/FilteredItemSelectionDialog.js:
2274         (WebInspector.JavaScriptOutlineDialog.createShortcut):
2275         (WebInspector.OpenResourceDialog.createShortcut):
2276         * inspector/front-end/ScriptsPanel.js:
2277
2278 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2279
2280         Web Inspector: hide function popover in heap snapshot view before navigating to the function definition
2281         https://bugs.webkit.org/show_bug.cgi?id=77330
2282
2283         Reviewed by Pavel Feldman.
2284
2285         * inspector/front-end/DetailedHeapshotView.js:
2286         (WebInspector.DetailedHeapshotView.prototype.willHide):
2287
2288 2012-01-30  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2289
2290         [BlackBerry] Credential backing store implementation
2291         https://bugs.webkit.org/show_bug.cgi?id=76761
2292
2293         Reviewed by Antonio Gomes.
2294
2295         Implemented credential backing store database and related
2296         operations in class CredentialBackingStore.
2297
2298         * platform/network/blackberry/CredentialBackingStore.cpp:
2299         (WebCore::CredentialBackingStore::~CredentialBackingStore):
2300         (WebCore::CredentialBackingStore::open):
2301         (WebCore::CredentialBackingStore::close):
2302         (WebCore::CredentialBackingStore::addLogin):
2303         (WebCore::CredentialBackingStore::updateLogin):
2304         (WebCore::CredentialBackingStore::hasLogin):
2305         (WebCore::CredentialBackingStore::getLogin):
2306         (WebCore::CredentialBackingStore::removeLogin):
2307         (WebCore::CredentialBackingStore::clear):
2308
2309 2012-01-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2310
2311         Only send resize events when layout size changes.
2312         https://bugs.webkit.org/show_bug.cgi?id=77212
2313
2314         When using fixed layout the widget size is the size of content, therefore
2315         resize checks must check against layoutsize and not widget size.
2316
2317         Reviewed by Kenneth Rohde Christiansen.
2318
2319         Needs to be manual tests because the test framework does not currently
2320         support testing fixed layout.
2321
2322         Tests: ManualTests/resize-events.html
2323
2324         * page/FrameView.cpp:
2325         (WebCore::FrameView::layout):
2326         (WebCore::FrameView::performPostLayoutTasks):
2327
2328 2012-01-30  Pavel Feldman  <pfeldman@google.com>
2329
2330         Web Inspector: TimelinePanel does not respect InspectorFrontendHost.canSaveAs
2331         https://bugs.webkit.org/show_bug.cgi?id=77301
2332
2333         Reviewed by Vsevolod Vlasov.
2334
2335         * inspector/front-end/TimelinePanel.js:
2336         (WebInspector.TimelinePanel.prototype._registerShortcuts):
2337
2338 2012-01-30  Nikolas Zimmermann  <nzimmermann@rim.com>
2339
2340         Not reviewed. Fix Clang build for real after r106218.
2341
2342         * inspector/CodeGeneratorInspector.py:
2343         (Generator.go): Add virtual destructor to the ABCs.
2344
2345 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
2346
2347         No need to keep anonymous RenderBlock in DETAILS.
2348         https://bugs.webkit.org/show_bug.cgi?id=77322
2349
2350         Reviewed by Hajime Morita.
2351
2352         Anonymous RenderBlock of DETAILS element was not squashed when detaching them.
2353         However, it should be removed.
2354
2355         No new tests. Should be covered by existing tests.
2356
2357         * rendering/RenderBlock.cpp:
2358         (WebCore::canMergeContiguousAnonymousBlocks):
2359
2360 2012-01-30  Zoltan Herczeg  <zherczeg@webkit.org>
2361
2362         Custom written CSS lexer
2363         https://bugs.webkit.org/show_bug.cgi?id=70107
2364
2365         Rubber Stamped by Csaba Osztrogonác.
2366
2367         Do not advance pointer at the end of input, just
2368         keep returning with END_TOKEN.
2369
2370         * css/CSSParser.cpp:
2371         (WebCore::CSSParser::lex):
2372
2373 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
2374
2375         The query selector for HTMLContentElement should follow the shadow dom spec.
2376         https://bugs.webkit.org/show_bug.cgi?id=75946
2377
2378         Reviewed by Hajime Morita.
2379
2380         Checks the query selector of HTMLContentElement is valid.
2381         If not valid, the selector won't match anything, and shows fallback element.
2382
2383         Test: fast/dom/shadow/content-selector-query.html
2384
2385         * html/shadow/ContentSelectorQuery.cpp:
2386         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
2387         (WebCore::ContentSelectorQuery::isValidSelector):
2388         (WebCore::ContentSelectorQuery::matches):
2389           When a select query is not valid, any element won't be matched.
2390         (WebCore::validateSubSelector):
2391         (WebCore::validateSelector):
2392         (WebCore::ContentSelectorQuery::validateSelectorList):
2393           Validate selectors.
2394         * html/shadow/ContentSelectorQuery.h:
2395         * html/shadow/HTMLContentElement.cpp:
2396         (WebCore::HTMLContentElement::isSelectValid):
2397           Returns true if select attribute is valid.
2398         * html/shadow/HTMLContentElement.h:
2399         * testing/Internals.cpp:
2400         (WebCore::Internals::isValidContentSelect):
2401         * testing/Internals.h:
2402         * testing/Internals.idl:
2403
2404 2012-01-30  Hans Wennborg  <hans@chromium.org>
2405
2406         Unreviewed, rolling out r106219.
2407         http://trac.webkit.org/changeset/106219
2408         https://bugs.webkit.org/show_bug.cgi?id=77083
2409
2410         This broke Chromium's test_shell.
2411
2412         * GNUmakefile.list.am:
2413         * Target.pri:
2414         * WebCore.gypi:
2415         * WebCore.vcproj/WebCore.vcproj:
2416         * WebCore.xcodeproj/project.pbxproj:
2417         * platform/mock/SpeechInputClientMock.cpp: Added.
2418         (WebCore):
2419         (WebCore::SpeechInputClientMock::SpeechInputClientMock):
2420         (WebCore::SpeechInputClientMock::setListener):
2421         (WebCore::SpeechInputClientMock::startRecognition):
2422         (WebCore::SpeechInputClientMock::stopRecording):
2423         (WebCore::SpeechInputClientMock::cancelRecognition):
2424         (WebCore::SpeechInputClientMock::addRecognitionResult):
2425         (WebCore::SpeechInputClientMock::clearResults):
2426         (WebCore::SpeechInputClientMock::timerFired):
2427         * platform/mock/SpeechInputClientMock.h: Added.
2428         (WebCore):
2429         (SpeechInputClientMock):
2430
2431 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2432
2433         Unreviewed. Clang build fix after r106218
2434
2435         * inspector/CodeGeneratorInspector.py:
2436
2437 2012-01-30  ChangSeok Oh  <shivamidow@gmail.com>
2438
2439         Make GraphicsContext3DPrivate of GTK port shareable.
2440         https://bugs.webkit.org/show_bug.cgi?id=77296
2441
2442         Reviewed by Eric Seidel.
2443
2444         GraphicsContext3DPrivate.cpp/h of GTK port look shareable with another port
2445         using glx backend for WebGL. For example, EFL port.
2446         Moved GraphicsContext3DPrivate.cpp and its header into Source/WebCore/platform/graphics/glx.
2447
2448         No new tests required, because of no new feature.
2449
2450         * GNUmakefile.am:
2451         * GNUmakefile.list.am:
2452         * platform/graphics/glx/GraphicsContext3DPrivate.cpp: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp.
2453         (sharedDisplay):
2454         (WebCore):
2455         (WebCore::activeGraphicsContexts):
2456         (WebCore::GraphicsContext3DPrivate::addActiveGraphicsContext):
2457         (WebCore::GraphicsContext3DPrivate::removeActiveGraphicsContext):
2458         (WebCore::GraphicsContext3DPrivate::cleanupActiveContextsAtExit):
2459         (WebCore::GraphicsContext3DPrivate::create):
2460         (WebCore::GraphicsContext3DPrivate::createPbufferContext):
2461         (WebCore::GraphicsContext3DPrivate::createPixmapContext):
2462         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2463         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2464         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
2465         * platform/graphics/glx/GraphicsContext3DPrivate.h: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h.
2466         (WebCore):
2467         (GraphicsContext3DPrivate):
2468
2469 2012-01-26  Hans Wennborg  <hans@chromium.org>
2470
2471         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
2472         https://bugs.webkit.org/show_bug.cgi?id=77083
2473
2474         Reviewed by Darin Fisher.
2475
2476         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
2477         implementation.
2478
2479         No new tests, just refactoring.
2480
2481         * GNUmakefile.list.am:
2482         * Target.pri:
2483         * WebCore.gypi:
2484         * WebCore.vcproj/WebCore.vcproj:
2485         * WebCore.xcodeproj/project.pbxproj:
2486         * platform/mock/SpeechInputClientMock.cpp: Removed.
2487         * platform/mock/SpeechInputClientMock.h: Removed.
2488
2489 2012-01-30  Peter Rybin  <peter.rybin@gmail.com>
2490
2491         Web Inspector: CodeGeneratorInspector.py: clean InspectorBackendDispatcher.h
2492         https://bugs.webkit.org/show_bug.cgi?id=77062
2493
2494         Reviewed by Yury Semikhatsky.
2495
2496         Code generator is changed. Now it generates InspectorBackendDispatcher
2497         as an abstract class so that implementation details could be fully
2498         hidden in .cpp file in a separate 'impl' class. This should make .h
2499         file more clear.
2500         Also new formal interfaces to domain agents are generated. This is an
2501         improvement over the current case when interfaces to agents are
2502         definen implicitly at calling sites.
2503
2504         * inspector/CodeGeneratorInspector.py:
2505         (RawTypes):
2506         (RawTypes.OutputPassModel):
2507         (RawTypes.OutputPassModel.ByPointer):
2508         (RawTypes.OutputPassModel.ByPointer.get_argument_prefix):
2509         (RawTypes.OutputPassModel.ByPointer.get_parameter_type_suffix):
2510         (RawTypes.OutputPassModel.ByReference):
2511         (RawTypes.OutputPassModel.ByReference.get_argument_prefix):
2512         (RawTypes.OutputPassModel.ByReference.get_parameter_type_suffix):
2513         (RawTypes.BaseType.is_event_param_check_optional):
2514         (RawTypes.String):
2515         (RawTypes.String.get_output_pass_model):
2516         (RawTypes.String.is_heavy_value):
2517         (RawTypes.Int):
2518         (RawTypes.Int.get_output_pass_model):
2519         (RawTypes.Int.is_heavy_value):
2520         (RawTypes.Number):
2521         (RawTypes.Number.get_output_pass_model):
2522         (RawTypes.Number.is_heavy_value):
2523         (RawTypes.Bool.get_c_param_type):
2524         (RawTypes.Bool):
2525         (RawTypes.Bool.get_output_pass_model):
2526         (RawTypes.Bool.is_heavy_value):
2527         (RawTypes.Object):
2528         (RawTypes.Object.get_output_pass_model):
2529         (RawTypes.Object.is_heavy_value):
2530         (RawTypes.Any.get_c_initializer):
2531         (RawTypes.Any):
2532         (RawTypes.Any.get_output_pass_model):
2533         (RawTypes.Any.is_heavy_value):
2534         (RawTypes.Array):
2535         (RawTypes.Array.get_output_pass_model):
2536         (RawTypes.Array.is_heavy_value):
2537         (InspectorBackendDispatcherImpl):
2538         (void):
2539         (Generator):
2540         (Generator.go):
2541         (Generator.process_command):
2542         * inspector/InspectorController.cpp:
2543         (WebCore::InspectorController::connectFrontend):
2544         * inspector/WorkerInspectorController.cpp:
2545         (WebCore::WorkerInspectorController::connectFrontend):
2546
2547 2012-01-29  Zoltan Herczeg  <zherczeg@webkit.org>
2548
2549         Custom written CSS lexer
2550         https://bugs.webkit.org/show_bug.cgi?id=70107
2551
2552         Reviewed by Antti Koivisto and Oliver Hunt.
2553
2554         This patch replaces the flex based CSS lexer to a
2555         new, custom written one. The new code is more
2556         than 2 times faster according to oprofile and CPU
2557         cycle counters.
2558
2559         The code structure is quite straightforward: it choose
2560         the possible token group based on the first character
2561         and employ utility functions to parse the longer than
2562         one character long ones. Most of the utilities are inline
2563         to make the lexer fast.
2564
2565         All build systems updated. Including removing the flex support.
2566
2567         Existing tests cover this feature.
2568
2569         * CMakeLists.txt:
2570         * DerivedSources.make:
2571         * DerivedSources.pri:
2572         * GNUmakefile.am:
2573         * GNUmakefile.list.am:
2574         * WebCore.gyp/WebCore.gyp:
2575         * WebCore.gyp/scripts/action_maketokenizer.py: Removed.
2576         * WebCore.gypi:
2577         * WebCore.vcproj/WebCore.vcproj:
2578         * WebCore.xcodeproj/project.pbxproj:
2579         * css/CSSParser.cpp:
2580         (WebCore::CSSParser::CSSParser):
2581         (WebCore::CSSParser::setupParser):
2582         (WebCore::parseSimpleLengthValue):
2583         (WebCore::mightBeRGBA):
2584         (WebCore::mightBeRGB):
2585         ():
2586         (WebCore::isCSSLetter):
2587         (WebCore):
2588         (WebCore::isCSSEscape):
2589         (WebCore::isURILetter):
2590         (WebCore::isIdentifierStartAfterDash):
2591         (WebCore::isEqualToCSSIdentifier):
2592         (WebCore::checkAndSkipEscape):
2593         (WebCore::skipWhiteSpace):
2594         (WebCore::CSSParser::isIdentifierStart):
2595         (WebCore::CSSParser::checkAndSkipString):
2596         (WebCore::CSSParser::parseEscape):
2597         (WebCore::CSSParser::parseIdentifier):
2598         (WebCore::CSSParser::parseString):
2599         (WebCore::CSSParser::parseURI):
2600         (WebCore::CSSParser::parseUnicodeRange):
2601         (WebCore::CSSParser::parseNthChild):
2602         (WebCore::CSSParser::parseNthChildExtra):
2603         (WebCore::CSSParser::detectFunctionTypeToken):
2604         (WebCore::CSSParser::detectMediaQueryToken):
2605         (WebCore::CSSParser::detectNumberToken):
2606         (WebCore::CSSParser::detectDashToken):
2607         (WebCore::CSSParser::detectAtToken):
2608         (WebCore::CSSParser::lex):
2609         (WebCore::CSSParser::markSelectorListStart):
2610         (WebCore::CSSParser::markSelectorListEnd):
2611         (WebCore::CSSParser::markRuleBodyStart):
2612         (WebCore::CSSParser::markRuleBodyEnd):
2613         (WebCore::CSSParser::markPropertyStart):
2614         (WebCore::CSSParser::markPropertyEnd):
2615         * css/CSSParser.h:
2616         (WebCore::CSSParser::token):
2617         (CSSParser):
2618         ():
2619         * css/tokenizer.flex: Removed.
2620
2621 2012-01-29  Dale Curtis  <dalecurtis@chromium.org>
2622
2623         Prepare WebCore.gyp for ffmpeg source transition.
2624         https://bugs.webkit.org/show_bug.cgi?id=77254
2625
2626         We're migrating our ffmpeg repo from a set of patches living on top of
2627         a tarball to an actual git fork of upstream.  The paths have changed
2628         slightly.
2629
2630         In order to not break the current build, we'll keep both paths around
2631         until the transition is complete.  Afterward the 'patched-ffmpeg' path
2632         will be removed.
2633
2634         Reviewed by Tony Chang.
2635
2636         No new tests. GYP change, if it doesn't work, nothing will compile.
2637
2638         * WebCore.gyp/WebCore.gyp:
2639
2640 2012-01-29  Hayato Ito  <hayato@chromium.org>
2641
2642         Add a ShadowRoot constructor as 'WebKitShadowRootConstructor', enabled by SHADOW_DOM flag.
2643         https://bugs.webkit.org/show_bug.cgi?id=76354
2644
2645         Reviewed by Hajime Morita.
2646
2647         We use vendor-prefixed name, 'WebKitShadowRoot', instead of 'ShadowRoot'
2648         since this is a feature under development.
2649
2650         * dom/ShadowRoot.cpp:
2651         (WebCore::ShadowRoot::create):
2652         (WebCore):
2653         * dom/ShadowRoot.h:
2654         (WebCore):
2655         (ShadowRoot):
2656         * dom/ShadowRoot.idl:
2657         * page/DOMWindow.idl:
2658
2659 2012-01-29  Noel Gordon  <noel.gordon@gmail.com>
2660
2661         [chromium] Use decoding swizzle only on libjpeg-turbo 1.1.90+
2662         https://bugs.webkit.org/show_bug.cgi?id=74286
2663
2664         Reviewed by Kenneth Russell.
2665
2666         No new tests. Covered by many existing tests: in particular 
2667             fast/images/*, fast/canvas/*,
2668             tables/mozilla/bugs/bug29314.html
2669             tables/mozilla/bugs/bug13169.html
2670             tables/mozilla/bugs/bug10565.html
2671             tables/mozilla/bugs/bug11026.html
2672             fast/repaint/backgroundSizeRepaint.html
2673             fast/repaint/block-layout-inline-children-replaced.html
2674             fast/repaint/clipped-relative.html
2675             fast/repaint/selected-replaced.html
2676             tables/mozilla/bugs/bug12908-1.html
2677
2678         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2679         (rgbOutputColorSpace): Swizzle decode iff libjpeg-turbo is r732 or above.
2680
2681 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2682
2683         Unreviewed, rolling out r105999.
2684         http://trac.webkit.org/changeset/105999
2685         https://bugs.webkit.org/show_bug.cgi?id=77304
2686
2687         Validating that this caused a performance regression in page
2688         load tests. (Requested by leviw on #webkit).
2689
2690         * dom/NamedNodeMap.cpp:
2691         * dom/NamedNodeMap.h:
2692         (NamedNodeMap):
2693         * dom/StyledElement.cpp:
2694         (WebCore::StyledElement::updateStyleAttribute):
2695         (WebCore::StyledElement::createInlineStyleDecl):
2696         (WebCore):
2697         (WebCore::StyledElement::destroyInlineStyleDecl):
2698         (WebCore::StyledElement::ensureInlineStyleDecl):
2699         (WebCore::StyledElement::style):
2700         (WebCore::StyledElement::addSubresourceAttributeURLs):
2701         * dom/StyledElement.h:
2702         (WebCore::StyledElement::inlineStyleDecl):
2703         (StyledElement):
2704
2705 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2706
2707         Unreviewed, rolling out r106109.
2708         http://trac.webkit.org/changeset/106109
2709         https://bugs.webkit.org/show_bug.cgi?id=77302
2710
2711         It made tests crash (Requested by Ossy_weekend on #webkit).
2712
2713         * platform/graphics/qt/TextureMapperQt.cpp:
2714         (WebCore::TextureMapperQt::setGraphicsContext):
2715         * platform/graphics/qt/TextureMapperQt.h:
2716         (WebCore::TextureMapperQt::initialize):
2717
2718 2012-01-28  Alexander Færøy  <ahf@0x90.dk>
2719
2720         [Qt] Remove references to CSSBorderImageValue.h in Target.pri
2721         https://bugs.webkit.org/show_bug.cgi?id=77277
2722
2723         Reviewed by Antonio Gomes.
2724
2725         CSSBorderImageValue.h was removed in r105502.
2726
2727         * Target.pri:
2728
2729 2012-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
2730
2731         REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
2732         https://bugs.webkit.org/show_bug.cgi?id=76126
2733
2734         Reviewed by Simon Fraser.
2735
2736         Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html
2737                fast/layers/scroll-no-visible-content-but-visible-descendant.html
2738
2739         The optimization missed out that if the current layer does not have some visible content
2740         (m_hasVisibleContent is false), a descendant could totally be visible and would need to
2741         have its repaint rectangles recomputed.
2742
2743         * rendering/RenderLayer.cpp:
2744         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
2745         Bail out only if the layer doesn't have visible content AND no visible descendants.
2746
2747 2012-01-27  Chris Marrin  <cmarrin@apple.com>
2748
2749         Get rid of TransformOperationList
2750         https://bugs.webkit.org/show_bug.cgi?id=77249
2751
2752         Reviewed by Dan Bernstein.
2753
2754         Changed fetchTransformOperationList to validateTransformOperations and got rid of separately generated list
2755         of transform operations. These are not needed, they are already available in the keyframe lists and they
2756         make it more difficult to add support for hardware animated filters. No behavior changes.
2757
2758
2759         * platform/graphics/GraphicsLayer.cpp:
2760         (WebCore::GraphicsLayer::validateTransformOperations):
2761         * platform/graphics/GraphicsLayer.h:
2762         (GraphicsLayer):
2763         * platform/graphics/ca/GraphicsLayerCA.cpp:
2764         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2765         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2766         * platform/graphics/ca/GraphicsLayerCA.h:
2767         ():
2768         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2769         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2770         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2771         (WebCore::applyTransformAnimation):
2772         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
2773         (WebCore::TextureMapperAnimation::applyInternal):
2774         * platform/graphics/texmap/TextureMapperAnimation.h:
2775         (TextureMapperAnimation):
2776
2777 2012-01-27  Raymond Toy  <rtoy@google.com>
2778
2779         AudioPannerNode::setPanningModel() does not update m_panningModel properly
2780         https://bugs.webkit.org/show_bug.cgi?id=66830
2781
2782         Reviewed by Kenneth Russell.
2783
2784         Test: webaudio/panner-set-model.html
2785
2786         * webaudio/AudioPannerNode.cpp:
2787         (WebCore::AudioPannerNode::setPanningModel):  Update
2788         m_panningModel appropriately.  Also silently do nothing if the
2789         model is invalid.
2790
2791 2012-01-27  Chris Rogers  <crogers@google.com>
2792
2793         HRTFPanner could have high-quality mode for smoother transitions
2794         https://bugs.webkit.org/show_bug.cgi?id=76470
2795
2796         Reviewed by Kenneth Russell.
2797
2798         * platform/audio/HRTFPanner.cpp:
2799         (WebCore):
2800         (WebCore::HRTFPanner::HRTFPanner):
2801         (WebCore::HRTFPanner::reset):
2802         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
2803         (WebCore::HRTFPanner::pan):
2804         * platform/audio/HRTFPanner.h:
2805         (HRTFPanner):
2806         ():
2807
2808 2012-01-27  Mike Lawther  <mikelawther@chromium.org>
2809
2810         CSS calc parsing stage
2811         https://bugs.webkit.org/show_bug.cgi?id=57082
2812
2813         This is the parsing stage of calc. The expressions are evaluated and 
2814         expression trees are generated. CSS values are not created yet - that
2815         will happen in a subsequent commit. 
2816
2817         Reviewed by David Hyatt.
2818
2819         No functional change - covered by existing tests in LayoutTests/css3/calc.
2820
2821         * CMakeLists.txt:
2822         * GNUmakefile.list.am:
2823         * Target.pri:
2824         * WebCore.gypi:
2825         * WebCore.vcproj/WebCore.vcproj:
2826         * WebCore.xcodeproj/project.pbxproj:
2827         * css/CSSCalculationValue.cpp: Added.
2828         (WebCore):
2829         (WebCore::unitCategory):
2830         (WebCore::CSSCalcValue::customCssText):
2831         (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
2832         (CSSCalcPrimitiveValue):
2833         (WebCore::CSSCalcPrimitiveValue::create):
2834         (WebCore::CSSCalcPrimitiveValue::cssText):
2835         (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
2836         ():
2837         (CSSCalcBinaryOperation):
2838         (WebCore::CSSCalcBinaryOperation::create):
2839         (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
2840         (WebCore::checkDepthAndIndex):
2841         (CSSCalcExpressionNodeParser):
2842         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
2843         (Value):
2844         (WebCore::CSSCalcExpressionNodeParser::operatorValue):
2845         (WebCore::CSSCalcExpressionNodeParser::parseValue):
2846         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
2847         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
2848         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
2849         (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
2850         (WebCore::CSSCalcValue::create):
2851         * css/CSSCalculationValue.h: Added.
2852         (WebCore):
2853         ():
2854         (CSSCalcExpressionNode):
2855         (WebCore::CSSCalcExpressionNode::category):
2856         (WebCore::CSSCalcExpressionNode::isInt):
2857         (WebCore::CSSCalcExpressionNode::isZero):
2858         (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
2859         (CSSCalcValue):
2860         (WebCore::CSSCalcValue::category):
2861         (WebCore::CSSCalcValue::isInt):
2862         (WebCore::CSSCalcValue::CSSCalcValue):
2863         * css/CSSParser.cpp:
2864         (WebCore::CSSParser::validCalculationUnit):
2865         (WebCore):
2866         (WebCore::CSSParser::validUnit):
2867         (WebCore::CSSParser::createPrimitiveNumericValue):
2868         (WebCore::CSSParser::parseValidPrimitive):
2869         (WebCore::CSSParser::parseValue):
2870         (WebCore::CSSParser::parseFillPositionComponent):
2871         (WebCore::CSSParser::parsedDouble):
2872         (WebCore::CSSParser::isCalculation):
2873         (WebCore::CSSParser::colorIntFromValue):
2874         (WebCore::CSSParser::parseColorParameters):
2875         (WebCore::CSSParser::parseHSLParameters):
2876         (WebCore::ShadowParseContext::ShadowParseContext):
2877         (WebCore::ShadowParseContext::commitLength):
2878         (WebCore::ShadowParseContext::commitStyle):
2879         (ShadowParseContext):
2880         (WebCore::CSSParser::parseShadow):
2881         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
2882         (WebCore::BorderImageSliceParseContext::commitNumber):
2883         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2884         (BorderImageSliceParseContext):
2885         (WebCore::CSSParser::parseBorderImageSlice):
2886         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
2887         (WebCore::BorderImageQuadParseContext::commitNumber):
2888         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
2889         (BorderImageQuadParseContext):
2890         (WebCore::CSSParser::parseBorderImageQuad):
2891         (WebCore::CSSParser::parseCalculation):
2892         * css/CSSParser.h:
2893         ():
2894         (CSSParser):
2895         * css/CSSValue.cpp:
2896         (WebCore::CSSValue::cssText):
2897         (WebCore::CSSValue::destroy):
2898         * css/CSSValue.h:
2899         (WebCore::CSSValue::isCalculationValue):
2900         ():
2901         * css/SVGCSSParser.cpp:
2902         (WebCore::CSSParser::parseSVGValue):
2903         * platform/CalculationValue.cpp: Added.
2904         (WebCore):
2905         * platform/CalculationValue.h: Added.
2906         (WebCore):
2907         ():
2908
2909 2012-01-27  Anders Carlsson  <andersca@apple.com>
2910
2911         WebTileLayers should honor the acceleratesDrawing flag
2912         https://bugs.webkit.org/show_bug.cgi?id=77242
2913         <rdar://problem/10622128>
2914
2915         Reviewed by Dan Bernstein.
2916
2917         * platform/graphics/ca/mac/TileCache.h:
2918         (WebCore::TileCache::acceleratesDrawing):
2919         Add getter.
2920
2921         * platform/graphics/ca/mac/TileCache.mm:
2922         (WebCore::TileCache::TileCache):
2923         Initialize m_acceleratesDrawing.
2924
2925         (WebCore::TileCache::setAcceleratesDrawing):
2926         Set m_acceleratesDrawing and go through all tile layers and update the flag.
2927
2928         (WebCore::TileCache::createTileLayer):
2929         Call -[CALayer setAcceleratesDrawing:] on the newly created layer.
2930
2931         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2932         (-[WebTileCacheLayer setAcceleratesDrawing:]):
2933         (-[WebTileCacheLayer acceleratesDrawing]):
2934         Call through to the TileCache object.
2935
2936 2012-01-27  Raymond Toy  <rtoy@google.com>
2937
2938         Round time to sample frame
2939         https://bugs.webkit.org/show_bug.cgi?id=76659
2940
2941         Three major changes:
2942
2943         1. Modify timeToSampleFrame to round the time to the sample frame
2944         and add support for Visual Studio to round the time in the same
2945         way as on gcc. (The issue is that Visual Studio uses x87
2946         instructions with 80-bit floats.)  This makes Visual Studio more
2947         consistent with the results with gcc.
2948
2949         2. Change the current time variable from keeping time in seconds
2950         to keeping time in sample frames.  This minimizes rounding except
2951         when needed for the Javascript API.
2952
2953         3. Update AudioBufferSourceNode::process to use samples (instead
2954         of time) as much as possible to reduce round-off effects.
2955
2956         Reviewed by Kenneth Russell.
2957
2958         Tests: Added note-grain-on test to exercise precise
2959         timing. Existing tests (gain and audiobuffersource-playbackrate)
2960         also cover some of these changes, and the equalpower panner test is
2961         modified to enable the tests for the offset of the impulses.
2962
2963         * platform/audio/AudioUtilities.cpp:
2964         (WebCore::AudioUtilities::timeToSampleFrame): Moved from
2965         AudioParamTimeLine and slightly modified, and updated to round
2966         operations consistently.  Add special flags for Visual Studio to
2967         generate code with rounding that is consistent with gcc.
2968         * platform/audio/AudioUtilities.h: Declare new function.
2969         * webaudio/AudioBufferSourceNode.cpp:
2970         (WebCore::AudioBufferSourceNode::process): Use new functions to
2971         convert time to sample frame.  Update code to use integer
2972         arithmetic as much as possible.
2973         (WebCore::AudioBufferSourceNode::renderFromBuffer): Use
2974         timeToSampleFrame to convert time to sample frame.
2975         * webaudio/AudioContext.h: Define new currentSample method to get
2976         the current sample.
2977         * webaudio/AudioDestinationNode.cpp:
2978         (WebCore::AudioDestinationNode::provideInput): Use new function to
2979         convert sample frame to time.  Update
2980         * webaudio/AudioDestiationNode.h: Rename m_currentTime to
2981         m_currentSample, add method to return current Sample.  Update
2982         currentTime() method to compute time from the current sample.
2983         * webaudio/AudioParamTimeline.cpp:
2984         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): Remove
2985         timeToSampleFrame and use new function in AudioUtilities to
2986         convert time to sample frame.
2987
2988 2012-01-27  Adrienne Walker  <enne@google.com>
2989
2990         [chromium] Don't ever skip drawing the non-composited content layer
2991         https://bugs.webkit.org/show_bug.cgi?id=77236
2992
2993         Reviewed by James Robinson.
2994
2995         Since the root layer has its textures potentially reserved last in a
2996         front-to-back iteration, don't ever skip drawing it if we can't
2997         reserve its textures. Instead, checkerboard and draw background color
2998         quads instead to fill the viewport. This behavior is tied to the
2999         backgroundFillsViewport setting.
3000
3001         * platform/graphics/chromium/TiledLayerChromium.cpp:
3002         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3003         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3004         (WebCore::CCLayerTilingData::reset):
3005         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3006         (WebCore::CCTiledLayerImpl::appendQuads):
3007
3008 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
3009
3010         Fix a warning in the GTK+ build.
3011
3012         Reviewed by Gustavo Noronha Silva.
3013
3014         No new tests. This should not change behavior.
3015
3016         * plugins/gtk/PluginViewGtk.cpp:
3017         (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.
3018
3019 2012-01-27  Tien-Ren Chen  <trchen@chromium.org>
3020
3021         [chromium] CCLayerTreeHostImpl minor code cleanup
3022         https://bugs.webkit.org/show_bug.cgi?id=77181
3023
3024         Fix a typo in comments and group functions properly.
3025         Replace duplicated content size code with function.
3026
3027         Reviewed by James Robinson.
3028
3029         No new tests. No change in behavior.
3030
3031         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3032         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
3033         (WebCore::CCLayerTreeHostImpl::contentSize):
3034         (WebCore):
3035         (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition):
3036         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3037         (CCLayerTreeHostImpl):
3038
3039 2012-01-27  Kevin Ollivier  <kevino@theolliviers.com>
3040
3041         [wx] Unreviewed. Build fix, add missing header.
3042
3043         * rendering/svg/SVGImageBufferTools.h:
3044
3045 2012-01-27  Victor Carbune  <victor@rosedu.org>
3046
3047         Added the GenericEventQueue class in order to generalize asynchronous
3048         event dispatching in HTMLMediaElement.
3049
3050         In order to support asynchronous events dispatched by HTMLTrackElement
3051         there is a need for a generalized implementation of an event queue to
3052         be used for both HTMLMediaElement and Text Tracks.
3053
3054         https://bugs.webkit.org/show_bug.cgi?id=76110
3055
3056         Reviewed by Eric Carlson.
3057
3058         No new tests. No new functionality, only refactoring.
3059
3060         * CMakeLists.txt:
3061         * GNUmakefile.list.am:
3062         * Target.pri:
3063         * WebCore.gypi:
3064         * WebCore.vcproj/WebCore.vcproj:
3065         * WebCore.xcodeproj/project.pbxproj:
3066
3067         * dom/GenericEventQueue.cpp: Added. Implements the abstract class EventQueue.
3068         (WebCore::GenericEventQueue::GenericEventQueue):
3069         (WebCore::GenericEventQueue::~GenericEventQueue):
3070         (WebCore::GenericEventQueue::enqueueEvent): Append an event to the current
3071         pending event list.
3072         (WebCore::GenericEventQueue::cancelEvent): Removes an event from the current
3073         pending event list.
3074         (WebCore::GenericEventQueue::timerFired): Callback method when the timer fires.
3075         Dispatches all events that are currently pending.
3076         (WebCore::GenericEventQueue::close): Closes the event queue such that it cannot
3077         be used anymore.
3078         (WebCore::GenericEventQueue::cancelAllEvents): Removes all pending events.
3079         (WebCore::GenericEventQueue::hasPendingEvents): True if there are pending events.
3080         * dom/GenericEventQueue.h: Added.
3081
3082         * html/HTMLMediaElement.cpp:
3083         (WebCore::HTMLMediaElement::HTMLMediaElement):
3084         (WebCore::HTMLMediaElement::scheduleEvent): Refactored method to enqueue
3085         the scheduled event on the GenericEventQueue instance.
3086         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto.
3087         (WebCore::HTMLMediaElement::hasPendingActivity): Ditto.
3088         (WebCore::HTMLMediaElement::dispatchEvent): This method is overriden
3089         to keep an evidence when a canPlay event is fired.
3090         * html/HTMLMediaElement.h:
3091
3092 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
3093
3094         Fix a warning in the GTK+ build.
3095
3096         Reviewed by Gustavo Noronha Silva.
3097
3098         No new tests. This should not change behavior.
3099
3100         * plugins/gtk/PluginViewGtk.cpp:
3101         (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.
3102
3103 2012-01-27  Benjamin Poulain  <bpoulain@apple.com>
3104
3105         Speed up the prefix matching of cssPropertyName()
3106         https://bugs.webkit.org/show_bug.cgi?id=77158
3107
3108         Reviewed by Geoffrey Garen.
3109
3110         This patch improves the performance by:
3111         -not checking the PropertyName with all 7 prefix
3112          (now, in the worse case, 2 prefixes are checked)
3113         -avoiding the conversion 8bits->16bits by using String::operator[]
3114          instead of ::characters()
3115
3116         To avoid checking every prefix, the code branch based on the first
3117         characters of the propertyName.
3118         The remaining of the prefix is checked character by characters like before.
3119
3120         When accessing CSS property, this gives a 13% improvement when there is no prefix.
3121         There is no performance regression for the matching of prefix, including for the first one
3122         of the previous matching code ("css").
3123
3124         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3125         ():
3126         (WebCore::matchesCSSPropertyNamePrefix):
3127         (WebCore):
3128         (WebCore::getCSSPropertyNamePrefix):
3129         (WebCore::cssPropertyName):
3130
3131 2012-01-27  Ken Buchanan  <kenrb@chromium.org>
3132
3133         Crash in updateFirstLetter() from unnecessary anonymous block
3134         https://bugs.webkit.org/show_bug.cgi?id=72675
3135
3136         Reviewed by David Hyatt.
3137
3138         There was a problem with anonymous blocks not getting removed when
3139         their only block flow siblings are removed if they also have non-block
3140         flow first-letter siblings (i.e. floats). This patch modifies
3141         RenderBlock::removeChild() to look for this situation and strip out
3142         unnecessary anonymous container blocks if it occurs.
3143
3144         * rendering/RenderBlock.cpp:
3145         (WebCore::RenderBlock::removeChild):
3146         (WebCore::RenderBlock::collapseAnonymousBoxChild): Added
3147         * rendering/RenderBlock.h:
3148         (WebCore::RenderBlock::collapseAnonymousBoxChild): Added
3149
3150 2012-01-27  Fady Samuel  <fsamuel@chromium.org>
3151
3152         Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
3153         https://bugs.webkit.org/show_bug.cgi?id=76459
3154
3155         Reviewed by Darin Fisher.
3156
3157         This should be a setting because it is independent of a particular frame and
3158         should be preserved even if the mainframe changes.
3159
3160         Renamed (set)ShouldLayoutFixedElementsRelativeToFrame to 
3161         (set)FixedElementsLayoutRelativeToFrame due to the connotation
3162         the word "should" may have in this context: If set, 
3163         position:fixed elements will ALWAYS be laid out relative to the frame.
3164
3165
3166         * WebCore.exp.in:
3167         * page/FrameView.cpp:
3168         (WebCore::FrameView::reset):
3169         (WebCore::FrameView::scrollXForFixedPosition):
3170         (WebCore::FrameView::scrollYForFixedPosition):
3171         (WebCore::FrameView::fixedElementsLayoutRelativeToFrame):
3172         (WebCore):
3173         * page/FrameView.h:
3174         (FrameView):
3175         * page/Settings.cpp:
3176         (WebCore::Settings::Settings):
3177         (WebCore::Settings::setFixedElementsLayoutRelativeToFrame):
3178         (WebCore):
3179         * page/Settings.h:
3180         (Settings):
3181         (WebCore::Settings::fixedElementsLayoutRelativeToFrame):
3182         * rendering/RenderBox.cpp:
3183         (WebCore::RenderBox::fixedElementLaysOutRelativeToFrame):
3184         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3185         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3186         * rendering/RenderBox.h:
3187         (RenderBox):
3188         * testing/InternalSettings.cpp:
3189         (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
3190         * testing/InternalSettings.h:
3191         (InternalSettings):
3192         * testing/InternalSettings.idl:
3193
3194 2012-01-27  Kentaro Hara  <haraken@chromium.org>
3195
3196         Support the [Supplemental] IDL for constants
3197         https://bugs.webkit.org/show_bug.cgi?id=77228
3198
3199         Reviewed by Adam Barth.
3200
3201         We have supported the [Supplemental] IDL for attributes and methods.
3202         This patch supports it for constants.
3203
3204         Test: bindings/scripts/test/TestSupplemental.idl
3205
3206         * bindings/scripts/generate-bindings.pl:
3207         Supported [Supplemental] constants.
3208         Updated some comments.
3209
3210         * bindings/scripts/test/TestSupplemental.idl:
3211         Added test cases for [Supplemental] constants.
3212
3213         * bindings/scripts/test/CPP/WebDOMTestInterface.h: Updated the test results.
3214         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
3215         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
3216         (WebCore::JSTestInterfacePrototype::getOwnPropertyDescriptor):
3217         (WebCore):
3218         (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT1):
3219         (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT2):
3220         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
3221         (WebCore):
3222         * bindings/scripts/test/ObjC/DOMTestInterface.h: Ditto.
3223         * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto.
3224         (WebCore::ConfigureV8TestInterfaceTemplate):
3225
3226 2012-01-27  Anders Carlsson  <andersca@apple.com>
3227
3228         When threaded scrolling is enabled for a FrameView, always put scrollbars in layers
3229         https://bugs.webkit.org/show_bug.cgi?id=77232
3230         <rdar://problem/10766708>
3231
3232         Reviewed by Beth Dakin.
3233
3234         * page/ScrollingCoordinator.cpp:
3235         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
3236         * page/ScrollingCoordinator.h:
3237         Add a new helper function.
3238
3239         * rendering/RenderLayerCompositor.cpp:
3240         (WebCore::shouldCompositeOverflowControls):
3241         Make this take a FrameView, check with the scrolling coordinator if the overflow controls should be composited.
3242
3243         (WebCore::RenderLayerCompositor::requiresHorizontalScrollbarLayer):
3244         (WebCore::RenderLayerCompositor::requiresVerticalScrollbarLayer):
3245         (WebCore::RenderLayerCompositor::requiresScrollCornerLayer):
3246         Update for the change to make shouldCompositeOverflowControls take a FrameView.
3247
3248 2012-01-24  Vincent Scheib  <scheib@chromium.org>
3249
3250         Pointer Lock: Implement pointer interface
3251         https://bugs.webkit.org/show_bug.cgi?id=75762
3252
3253         Reviewed by Julien Chaffraix.
3254
3255         Implement the navigator.pointer interface via a new
3256         PointerLockController class, as per
3257         http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html.
3258
3259         The implementation is being made in steps, the feature is still behind
3260         compile-time and run-time flags, 'webkit' prefixed, and not yet enabled
3261         in any browser. (Chromium has a developer flag required.) Follow-up
3262         work will include handling DOM elements being removed, making all
3263         callbacks asynchronous, iframe permissions (similar to Full Screen),
3264         etc.
3265
3266         PointerLockController maintains state of which Element is the current
3267         lock target and the success and failure callbacks. ChromeClient has
3268         methods added to expose the required state change requests.
3269
3270         Tests: pointer-lock/lock-already-locked.html
3271                pointer-lock/lock-fail-responses.html
3272                pointer-lock/mouse-event-delivery.html
3273                pointer-lock/pointerlocklost-event.html
3274
3275         * WebCore.gypi:
3276         * dom/EventNames.h:
3277         * page/ChromeClient.h:
3278         (WebCore::ChromeClient::requestPointerLock):
3279         (WebCore::ChromeClient::requestPointerUnlock):
3280         (WebCore::ChromeClient::isPointerLocked):
3281         * page/Navigator.cpp:
3282         (WebCore::Navigator::webkitPointer):
3283         * page/Page.cpp:
3284         (WebCore::Page::Page):
3285         * page/Page.h:
3286         (WebCore::Page::pointerLockController):
3287         * page/PointerLock.cpp:
3288         (WebCore::PointerLock::PointerLock):
3289         (WebCore::PointerLock::create):
3290         (WebCore::PointerLock::lock):
3291         (WebCore::PointerLock::unlock):
3292         (WebCore::PointerLock::isLocked):
3293         * page/PointerLock.h:
3294         (WebCore::PointerLock::create):
3295         * page/PointerLockController.cpp: Added.
3296         (WebCore::PointerLockController::PointerLockController):
3297         (WebCore::PointerLockController::requestPointerLock):
3298         (WebCore::PointerLockController::requestPointerUnlock):
3299         (WebCore::PointerLockController::isLocked):
3300         (WebCore::PointerLockController::didAcquirePointerLock):
3301         (WebCore::PointerLockController::didNotAcquirePointerLock):
3302         (WebCore::PointerLockController::didLosePointerLock):
3303         (WebCore::PointerLockController::dispatchLockedMouseEvent):
3304         * page/PointerLockController.h: Copied from Source/WebCore/page/PointerLock.h.
3305
3306 2012-01-27  Abhishek Arya  <inferno@chromium.org>
3307
3308         Crash in DocumentLoader::detachFromFrame.
3309         https://bugs.webkit.org/show_bug.cgi?id=62764
3310
3311         Reviewed by Brady Eidson.
3312
3313         r105556 didn't fix the crash because canceling the
3314         main resource loader blows away both the current
3315         document loader and frame underneath. Both protectors
3316         are also used in stopLoading() when m_mainResourceLoader->cancel()
3317         is called. Also, tested the fix under ASAN.
3318
3319         * loader/DocumentLoader.cpp:
3320         (WebCore::DocumentLoader::detachFromFrame):
3321
3322 2012-01-27  Tony Chang  <tony@chromium.org>
3323
3324         flexbox scrollbars don't take flex-direction into account
3325         https://bugs.webkit.org/show_bug.cgi?id=70772
3326
3327         Reviewed by Darin Adler.
3328
3329         This fixes a bug where we always used the logicalScrollbarHeight.
3330         For column flow, this was incorrect.
3331
3332         Also fix a bug where we didn't include the trailing border+padding+scrollbar when computing the
3333         height of a column flow.
3334
3335         Tests: css3/flexbox/cross-axis-scrollbar-expected.html
3336                css3/flexbox/cross-axis-scrollbar.html
3337
3338         * rendering/RenderFlexibleBox.cpp:
3339         (WebCore::RenderFlexibleBox::crossAxisScrollbarExtent): Add a direction aware method for getting the scrollbar size.
3340         (WebCore):
3341         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Use crossAxisScrollbarExtent.
3342         * rendering/RenderFlexibleBox.h:
3343         (RenderFlexibleBox):
3344
3345 2012-01-27  Kentaro Hara  <haraken@chromium.org>
3346
3347         Unreviewed. Rebasedlined run-bindings-tests results.
3348
3349         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
3350         (WebDOMTestInterface::supplementalMethod1):
3351         (WebDOMTestInterface::supplementalMethod2):
3352
3353 2012-01-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
3354
3355         [Qt][WK2] Child layers appear in wrong position when scrolling
3356         https://bugs.webkit.org/show_bug.cgi?id=77063
3357
3358         Reviewed by Simon Fraser.
3359
3360         When using the delegatesScrolling mode in FrameView, the compositor doesn't need
3361         to control the special clip/scroll layers. Also, when we change that mode, we need to let
3362         the compositor reset its backing-stores and rebuild them without scrolling/clipping.
3363
3364         This is tested by compositing tests, when run with Qt in touch mode.
3365
3366         * page/FrameView.cpp:
3367         (WebCore::FrameView::delegatesScrollingDidChange):
3368         (WebCore):
3369         * page/FrameView.h:
3370         (FrameView):
3371         * platform/ScrollView.cpp:
3372         (WebCore::ScrollView::setDelegatesScrolling):
3373         * platform/ScrollView.h:
3374         (WebCore::ScrollView::delegatesScrollingDidChange):
3375         * rendering/RenderLayerCompositor.cpp:
3376         (WebCore::RenderLayerCompositor::requiresScrollLayer):
3377
3378 2012-01-27  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
3379
3380         Removed unused method from CSSStyleSelector
3381         https://bugs.webkit.org/show_bug.cgi?id=77190
3382
3383         Reviewed by Andreas Kling.
3384
3385         * css/CSSStyleSelector.h:
3386         (CSSStyleSelector):
3387
3388 2012-01-27  Zeno Albisser  <zeno@webkit.org>
3389
3390         [Qt][Mac] Build fails after adding ICU support (r105997).
3391         https://bugs.webkit.org/show_bug.cgi?id=77118
3392
3393         Use SmareReplaceCF.cpp code path if platform Mac.
3394
3395         Reviewed by Tor Arne Vestbø.
3396
3397         * Target.pri:
3398
3399 2012-01-27  Ilya Tikhonovsky  <loislo@chromium.org>
3400
3401         Web Inspector: detailed heap snapshot: Replace (Native objects) root element
3402         with '(Detached DOM trees)' and '(Document DOM trees)'
3403         https://bugs.webkit.org/show_bug.cgi?id=77201
3404
3405         I think it'd be nice to replace one group containing all native objects with
3406         separate groups for different types of native objects.
3407
3408         Reviewed by Yury Semikhatsky.
3409
3410         * bindings/v8/RetainedDOMInfo.cpp:
3411         (WebCore::RetainedDOMInfo::GetGroupLabel):
3412         (WebCore):
3413         * bindings/v8/RetainedDOMInfo.h:
3414         (RetainedDOMInfo):
3415
3416 2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
3417
3418         <feImage> doesn't work with local references when using primitiveUnits="objectBoundingBox"
3419         https://bugs.webkit.org/show_bug.cgi?id=77205
3420
3421         Reviewed by Antti Koivisto.
3422
3423         Consider following testcase:
3424         <svg width="1000" height="500">
3425         <defs>
3426             <circle id="c" cx="50%" cy="50%" r="10%"/>
3427             <filter id="f" filterUnits="userSpaceOnUse" x="0" y="0" width="100" height="100" primitiveUnits="objectBoundingBox">
3428                 <feImage xlink:href="#c"/>
3429             </filter>
3430         </defs>
3431         <rect width="100" height="100" filter="url(#f)"/>
3432         </svg>
3433
3434         The <svg> has a viewport of 1000x50. The <circle> in the <defs> element is resolved as <circle cx="500" cy="250" r="79"/>,
3435         as the context for this element (looking at it isolated!) is the viewport of the <svg>. We then setup a 0x0 - 100x100 rect
3436         in user space, which gets filtered, by a filter, also defined in user space (for simplicity), but with primitiveUnits="objectBoundingBox".
3437
3438         That means that the default subregion of the filter effect <feImage/> which has no inputs, is defined in the SVG 1.1 spec to be equal to
3439         the filter region, which is 0x0-100x100 in user space. This <feImage/> is supposed to produce a 100x100 image, containing a circle in the
3440         middle (aka. <circle cx="50" cy="50".../>), but it doesn't, as the <circle> it's trying to paint, is laid out at 500x250, and thus outside
3441         the 100x100 sized image buffer.
3442
3443         So how to resolve this?
3444         The RenderSVGShape thats owned by the <circle> generates its Path value by calling cx().value(lengthContext) and the SVGLengthContext here
3445         resolves to the <svg>. That happens on _layout_. If we would want to change the SVGLengthContext in this case (what I originally planned!)
3446         to carry a custom 100x100 viewport, we'd need to relayout. Unfortunately this is not an option, as this would mean that
3447         SVGImageBufferTools::renderSubtreeToImageBuffer, would need to relayout its children first, but we produce the filter images when painting.
3448         This is very dangerous and has just recently been fixed so that SVGImageBufferTools can ASSERT(!item->needsLayout()) when painting the
3449         subtree to an image buffer.
3450
3451         The only sane solution I see, that does not require relayouts, is to make a map between the <circle> bounding box in user space (500x250
3452         center point) to the filter primitive subregion space (here: 100x100 center point), and concat that transformation before painting the
3453         subtree to the image buffer. Of course this approach only works if all values of the <circle> are relative. If someone uses
3454         <circle id="c" cx="50%" cy="666"> the transformation that I'm looking for is undefined. We'd really need to create a new Path here, to
3455         resolve only cx against the new viewport, and not cy.
3456
3457         Though in practice it turns out this is not a problem. All use cases of feImage + primitiveUnits="objectBoundingBox" link to elements
3458         that are completely defined in percentual values, as this is really the only thing which makes sense - otherwise you can always switch
3459         back to primtiveUnits="userSpaceOnUse". Anyhow, I'm going to fix all known wild-life test cases by my approach, and say we don't support
3460         using mixed length units when referencing those elements from feImages with primitiveUnits="objectBoundingBox".
3461
3462         Adding lots of new testcases, trying all the different feImage modes.
3463
3464         Tests: svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
3465                svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
3466                svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
3467                svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
3468                svg/filters/feImage-position.svg
3469                svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
3470                svg/filters/feImage-subregions-preseveAspectRatio-none.svg
3471                svg/filters/feImage-subregions.svg
3472
3473         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3474         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Reverse logic, simplifying the code a bit. Remove FEImage special cases (absoluteSubregion).
3475         * svg/SVGLengthContext.h: Make determineViewport() public, for use in FEImage.
3476         * svg/graphics/filters/SVGFEImage.cpp:
3477         (WebCore::FEImage::determineAbsolutePaintRect): Don't apply preserveAspectRatio transformation for local elements, it's not defined and breaks content.
3478         (WebCore::FEImage::platformApplySoftware): Figure out the absolute subregion by utilizing filterPrimitiveSubregion() as FETurbulence does.
3479                                                    Map between filter primitive subregion and target object space for primitiveUnits="objectBoundingBox" support on SVG element references.
3480         * svg/graphics/filters/SVGFEImage.h: Remove absoluteSubregion member & setter, it's no longer needed.
3481
3482 2012-01-26  Vsevolod Vlasov  <vsevik@chromium.org>
3483
3484         Web Inspector: Scripts panel: fix event dispatching between FileSelector and EditorContainer.
3485         https://bugs.webkit.org/show_bug.cgi?id=77126
3486
3487         Reviewed by Pavel Feldman.
3488
3489         * inspector/front-end/ScriptsPanel.js:
3490         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
3491         (WebInspector.ScriptsPanel.prototype._reset):