6177432c8e5cff5ee2a3f3b2296596a5c7fd555f
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-27  Alexey Proskuryakov  <ap@apple.com>
2
3         [Mac] Stop using NSMapTable in FormDataStreamMac.mm
4         https://bugs.webkit.org/show_bug.cgi?id=82358
5
6         Reviewed by Darin Adler.
7
8         * platform/network/mac/FormDataStreamMac.mm: Use WTF::HashMap, as we always do. All accesses
9         are protected with a mutex anyway.
10
11 2012-03-27  Joe Thomas  <joethomas@motorola.com>
12
13         Implement vw/vh/vmin (viewport sizes) from CSS3 Values and Units
14         https://bugs.webkit.org/show_bug.cgi?id=27160
15
16         Reviewed by Antti Koivisto.
17
18         vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units.
19         New Length types such as ViewportRelativeWidth, ViewportRelativeHeight and ViewportRelativeMin are added for these length units
20         and included the support for fetching the value of these relative units based on the current viewport size.
21
22         The specification related to this implementation is http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
23
24         Tests: css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html
25                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html
26                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html
27                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html
28                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html
29                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html
30                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html
31
32         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: Modified to support viewport relative Length types.
33         (getAttributeSetForAccessibilityObject):
34         * css/CSSComputedStyleDeclaration.cpp: Ditto.
35         (WebCore::getPositionOffsetValue):
36         (WebCore::getBorderRadiusCornerValues):
37         (WebCore::getBorderRadiusCornerValue):
38         (WebCore::getBorderRadiusShorthandValue):
39         (WebCore::lineHeightFromStyle):
40         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
41         * css/CSSGrammar.y: Added vw/vh/vmin support.
42         * css/CSSParser.cpp: Parsing of relative units and creation of CSSPrimitiveValue.
43         (WebCore::CSSParser::validUnit): Added vw/vh/vmin to the valid units.
44         (WebCore::CSSParser::createPrimitiveNumericValue): Added vw/vh/vmin as valid primitive units.
45         (WebCore::unitFromString):
46         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitiveValue for vw/vh/vmin.
47         (WebCore::CSSParser::detectNumberToken): Parsing the vw/vh/vmin tokens.
48         * css/CSSPrimitiveValue.cpp:
49         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vw/vh/vmin.
50         (WebCore::unitCategory): Ditto.
51         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
52         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Added support for vw/vh/vmin.
53         (WebCore::CSSPrimitiveValue::customCssText): Ditto.
54         (WebCore::CSSPrimitiveValue::viewportRelativeLength): Function to create the Length structure for the viewport-relative unit types.
55         (WebCore):
56         * css/CSSPrimitiveValue.h:
57         (WebCore::CSSPrimitiveValue::isViewportRelativeLength): Checks whether the primitive value is ViewportRelative Lengths.
58         (CSSPrimitiveValue):
59         * css/CSSPrimitiveValue.idl: Added support for vw/vh/vmin.
60         * css/CSSPrimitiveValueMappings.h:
61         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
62         * css/CSSStyleApplyProperty.cpp: Applying relative viewport length units to the specific CSS property.
63         (WebCore::ApplyPropertyLength::applyValue):
64         (WebCore::ApplyPropertyBorderRadius::applyValue):
65         (WebCore::ApplyPropertyFontSize::applyValue):
66         (WebCore::ApplyPropertyLineHeight::applyValue):
67         (WebCore::ApplyPropertyVerticalAlign::applyValue):
68         * css/CSSStyleSelector.cpp: Added support for viewport relative units.
69         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
70         (WebCore::miminumValueForLength):
71         (WebCore::valueForLength):
72         (WebCore::floatValueForLength):
73         * css/LengthFunctions.h: Added new RenderView argument.
74         (WebCore):
75         * dom/Document.cpp:
76         (WebCore::Document::pageSizeAndMarginsInPixels): Modified to support viewport relative Length types.
77         (WebCore::Document::viewportSize): New function to fetch the current viewport size.
78         (WebCore):
79         * dom/Document.h: Ditto.
80         (Document):
81         * html/HTMLAreaElement.cpp: Modified to support viewport relative Length types.
82         (WebCore::HTMLAreaElement::getRegion):
83         * platform/Length.h:
84         (WebCore::Length::isViewportRelative): To check the Length is of type ViewportRelative.
85         (WebCore::Length::viewportRelativeLength): To get the relative value.
86         * rendering/RenderBR.cpp: Modified to support viewport relative Length types.
87         (WebCore::RenderBR::lineHeight):
88         * rendering/RenderBlock.cpp: Ditto.
89         (WebCore::RenderBlock::textIndentOffset):
90         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
91         (WebCore::RenderBlock::lineHeight):
92         * rendering/RenderBox.cpp: Ditto.
93         (WebCore::RenderBox::reflectionOffset):
94         (WebCore::RenderBox::paintBoxDecorations):
95         (WebCore::RenderBox::clipRect):
96         (WebCore::RenderBox::computeLogicalWidthInRegion):
97         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
98         (WebCore::RenderBox::computeInlineDirectionMargins):
99         (WebCore::RenderBox::computeContentLogicalHeightUsing):
100         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
101         (WebCore::RenderBox::computeBlockDirectionMargins):
102         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
103         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
104         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
105         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
106         * rendering/RenderBoxModelObject.cpp: Ditto.
107         (WebCore::RenderBoxModelObject::relativePositionOffsetX):
108         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
109         (WebCore::RenderBoxModelObject::paddingTop):
110         (WebCore::RenderBoxModelObject::paddingBottom):
111         (WebCore::RenderBoxModelObject::paddingLeft):
112         (WebCore::RenderBoxModelObject::paddingRight):
113         (WebCore::RenderBoxModelObject::paddingBefore):
114         (WebCore::RenderBoxModelObject::paddingAfter):
115         (WebCore::RenderBoxModelObject::paddingStart):
116         (WebCore::RenderBoxModelObject::paddingEnd):
117         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
118         (WebCore::RenderBoxModelObject::calculateFillTileSize):
119         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
120         (WebCore::computeBorderImageSide):
121         (WebCore::RenderBoxModelObject::paintNinePieceImage):
122         (WebCore::RenderBoxModelObject::paintBorder):
123         (WebCore::RenderBoxModelObject::paintBoxShadow):
124         * rendering/RenderFlexibleBox.cpp: Ditto.
125         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
126         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
127         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
128         * rendering/RenderInline.cpp: Ditto.
129         (WebCore::computeMargin):
130         (WebCore::RenderInline::lineHeight):
131         * rendering/RenderMenuList.cpp: Ditto.
132         (WebCore::RenderMenuList::updateOptionsWidth):
133         * rendering/RenderObject.cpp: Ditto.
134         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
135         * rendering/RenderReplaced.cpp: Ditto.
136         (WebCore::RenderReplaced::paint):
137         * rendering/RenderScrollbarPart.cpp: Ditto.
138         (WebCore::calcScrollbarThicknessUsing):
139         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
140         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
141         * rendering/RenderTable.cpp: Ditto.
142         (WebCore::RenderTable::computeLogicalWidth):
143         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
144         * rendering/RenderTableCell.cpp: Ditto.
145         (WebCore::RenderTableCell::logicalHeightForRowSizing):
146         * rendering/RenderTableSection.cpp: Ditto.
147         (WebCore::RenderTableSection::calcRowLogicalHeight):
148         * rendering/RenderText.h: Ditto.
149         (WebCore::RenderText::marginLeft):
150         (WebCore::RenderText::marginRight):
151         * rendering/RenderThemeMac.mm: Ditto.
152         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
153         * rendering/RenderView.h:
154         (WebCore::RenderView::viewportSize):
155         * rendering/RenderWidget.cpp: Ditto.
156         (WebCore::RenderWidget::paint):
157         * rendering/RootInlineBox.cpp: Ditto.
158         (WebCore::RootInlineBox::verticalPositionForBox):
159         * rendering/style/RenderStyle.cpp: Ditto.
160         (WebCore::calcRadiiFor):
161         (WebCore::RenderStyle::getRoundedBorderFor):
162         * rendering/style/RenderStyle.h: Ditto.
163         * rendering/svg/RenderSVGRoot.cpp: Ditto.
164         (WebCore::resolveLengthAttributeForSVG):
165         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
166         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
167
168 2012-03-27  Gao Chun  <chun.gao@intel.com>
169
170         Remove deprecated LowPass2FilterNode and HighPass2FilterNode
171         https://bugs.webkit.org/show_bug.cgi?id=82296
172
173         Reviewed by Chris Rogers.
174
175         * CMakeLists.txt:
176         * DerivedSources.make:
177         * DerivedSources.pri:
178         * GNUmakefile.list.am:
179         * Modules/webaudio/AudioContext.cpp:
180         * Modules/webaudio/AudioContext.h:
181         (WebCore):
182         (AudioContext):
183         * Modules/webaudio/AudioContext.idl:
184         * Modules/webaudio/AudioNode.h:
185         * Modules/webaudio/BiquadFilterNode.cpp:
186         (WebCore::BiquadFilterNode::BiquadFilterNode):
187         * Modules/webaudio/BiquadProcessor.cpp:
188         * Modules/webaudio/BiquadProcessor.h:
189         * Modules/webaudio/HighPass2FilterNode.cpp: Removed.
190         * Modules/webaudio/HighPass2FilterNode.h: Removed.
191         * Modules/webaudio/HighPass2FilterNode.idl: Removed.
192         * Modules/webaudio/LowPass2FilterNode.cpp: Removed.
193         * Modules/webaudio/LowPass2FilterNode.h: Removed.
194         * Modules/webaudio/LowPass2FilterNode.idl: Removed.
195         * WebCore.gypi:
196         * WebCore.xcodeproj/project.pbxproj:
197
198 2012-03-27  Sami Kyostila  <skyostil@chromium.org>
199
200         [chromium] Add TextureCopier for copying texture contents
201         https://bugs.webkit.org/show_bug.cgi?id=80870
202
203         Reviewed by Stephen White.
204
205         This patch introduces a TextureCopier class whose job is to copy the
206         contents from one GL texture to another using the most efficient means
207         for the current GPU. This version uses render-to-texture to do the copy,
208         but a path based on EXT_framebuffer_blit can be added later.
209
210         The class is intended to replace the use of image path operations such
211         as glCopyTex{Sub}Image2D for duplicating texture contents. The reason is
212         that such functions may not be very well optimized in some -- mainly
213         mobile -- GPU drivers.
214
215         With this patch the new copier is used just for Canvas2D layer
216         presentation, but another potential use is for WebGL layer presentation.
217
218         Test: webkit_unit_tests: TextureCopierTest
219
220         * WebCore.gypi:
221         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
222         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
223         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
224         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
225         * platform/graphics/chromium/Canvas2DLayerChromium.h:
226         (Canvas2DLayerChromium):
227         * platform/graphics/chromium/LayerRendererChromium.cpp:
228         (WebCore::LayerRendererChromium::initializeSharedObjects):
229         * platform/graphics/chromium/LayerRendererChromium.h:
230         (WebCore):
231         (WebCore::LayerRendererChromium::textureCopier):
232         (LayerRendererChromium):
233         * platform/graphics/chromium/ShaderChromium.cpp:
234         (WebCore::VertexShaderPosTexIdentity::getShaderString):
235         (WebCore):
236         (WebCore::FragmentShaderRGBATexCopy::getShaderString):
237         * platform/graphics/chromium/ShaderChromium.h:
238         (VertexShaderPosTexIdentity):
239         (WebCore::VertexShaderPosTexIdentity::init):
240         (WebCore):
241         (FragmentShaderRGBATexCopy):
242         * platform/graphics/chromium/TextureCopier.cpp: Added.
243         (WebCore):
244         (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier):
245         (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier):
246         (WebCore::AcceleratedTextureCopier::copyTexture):
247         * platform/graphics/chromium/TextureCopier.h: Added.
248         (WebCore):
249         (TextureCopier):
250         (WebCore::TextureCopier::~TextureCopier):
251         (AcceleratedTextureCopier):
252         (WebCore::AcceleratedTextureCopier::create):
253         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
254         (WebCore::CCSingleThreadProxy::doCommit):
255         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
256         (WebCore::CCTextureUpdater::CCTextureUpdater):
257         * platform/graphics/chromium/cc/CCTextureUpdater.h:
258         (WebCore):
259         (CCTextureUpdater):
260         (WebCore::CCTextureUpdater::copier):
261         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
262         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
263
264 2012-03-27  Levi Weintraub  <leviw@chromium.org>
265
266         Correct SVG paint functions that are still using IntPoints
267         https://bugs.webkit.org/show_bug.cgi?id=82343
268
269         Reviewed by Eric Seidel.
270
271         Two small corrections to SVG paint functions that should use LayoutPoint instead
272         of IntPoint.
273
274         No new tests. No change in behavior.
275
276         * rendering/svg/RenderSVGShape.cpp:
277         (WebCore::RenderSVGShape::paint):
278         * rendering/svg/RenderSVGText.cpp:
279         (WebCore::RenderSVGText::paint):
280
281 2012-03-27  Zalan Bujtas  <zbujtas@gmail.com>
282
283         Frame flattening: childframe in FrameView::layout() needs protector.
284         https://bugs.webkit.org/show_bug.cgi?id=82345
285
286         Reviewed by Kenneth Rohde Christiansen.
287
288         RefPtr<FrameView> protector(this) is supposed to protect the current frameview in
289         FrameView::layout() from being destroyed by recalcStyle().
290         However, when frame flattening is on and a child frame is re-starting layout from
291         the topmost parent, the protection is missing and parent's recalcStyle()
292         can destroy the child frame.
293         Moving the protector before the layout re-starting is initiated makes the child frame
294         safe.
295
296         No new tests. Unable to create a test case, where this scenario is reproducible.
297
298         * page/FrameView.cpp:
299         (WebCore::FrameView::layout):
300
301 2012-03-27  Antti Koivisto  <antti@apple.com>
302
303         Construct CSSCharsetRule on CSSOM API access only 
304         https://bugs.webkit.org/show_bug.cgi?id=82332
305
306         Reviewed by Andreas Kling.
307
308         Charset is just a string. There is usually no need to construct CSSCharsetRule at all.
309         
310         - Make CSS parser to return encoding string instead of CSSCharsetRule object. This
311           string is used for constructing CSSCharsetRule if it is needed (and nothing else,
312           @charset has no effect after string decoding).
313         - Remove internal interface for adding and removing rules. It has no clients.
314         
315         * css/CSSGrammar.y:
316         * css/CSSParser.cpp:
317         (WebCore):
318         * css/CSSParser.h:
319         * css/CSSStyleSelector.cpp:
320         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
321         * css/CSSStyleSheet.cpp:
322         (WebCore::CSSStyleSheet::~CSSStyleSheet):
323         (WebCore::CSSStyleSheet::parserAppendRule):
324         (WebCore::CSSStyleSheet::ensureCharsetRule):
325         (WebCore):
326         (WebCore::CSSStyleSheet::length):
327         (WebCore::CSSStyleSheet::item):
328         (WebCore::CSSStyleSheet::clearCharsetRule):
329         (WebCore::CSSStyleSheet::clearRules):
330         (WebCore::CSSStyleSheet::parserSetEncodingFromCharsetRule):
331         (WebCore::CSSStyleSheet::rules):
332         (WebCore::CSSStyleSheet::insertRule):
333         (WebCore::CSSStyleSheet::addRule):
334         (WebCore::CSSStyleSheet::deleteRule):
335         * css/CSSStyleSheet.h:
336         (WebCore):
337         (CSSStyleSheet):
338         (WebCore::CSSStyleSheet::ruleVector):
339         (WebCore::CSSStyleSheet::hasCharsetRule):
340         * inspector/InspectorStyleSheet.cpp:
341         (WebCore::InspectorStyleSheet::reparseStyleSheet):
342
343 2012-03-27  Stephen White  <senorblanco@chromium.org>
344
345         [chromium] Fix filter context creation to be more conservative.
346         https://bugs.webkit.org/show_bug.cgi?id=82349
347
348         Reviewed by James Robinson.
349
350         Covered by webkit_unit_tests, and css3/filters layout tests.
351
352         * platform/graphics/chromium/LayerChromium.cpp:
353         (WebCore::LayerChromium::setFilters):
354         Only request a filter context if the filter lists is non-empty.
355         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
356         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
357         Add a bool param, so tests can cancel a request for filter contexts.
358
359 2012-03-27  Stephen Chenney  <schenney@chromium.org>
360
361         <svg:use> elements in the parser can create elements not marked as created by the parser
362         https://bugs.webkit.org/show_bug.cgi?id=81985
363
364         Reviewed by Adam Barth.
365
366         The SVGUseElement was creating its shadow tree immediately upon
367         demand. This resulted in nodes being created that were not marked as
368         "createdByParser", even during parsing. As it happens, there is
369         already code in there to track "createdByParser" in the SVGUseElement,
370         it was just being ignored all the time. This may even have been
371         inefficient. Now we delay creating the shadow dom tree until children
372         are finished, which is the standard time to handle the createdByParser
373         flag.
374
375         I also verified that other SVG classes that derived from core DOM
376         classes that use the createdByParser flag do correctly pass this flag
377         on.
378
379         No new tests as this is covered by existing tests and does not have new behavior.
380
381         * svg/SVGUseElement.cpp:
382         (WebCore::SVGUseElement::insertedIntoDocument):
383         (WebCore::SVGUseElement::svgAttributeChanged):
384         (WebCore::SVGUseElement::willRecalcStyle):
385         (WebCore::SVGUseElement::finishParsingChildren):
386         * xml/XMLErrors.cpp:
387         (WebCore::XMLErrors::insertErrorMessageBlock):
388
389 2012-03-27  Ming Xie  <mxie@rim.com>
390
391         [BlackBerry] Disable DisallowCType.h usage
392         https://bugs.webkit.org/show_bug.cgi?id=82211
393
394         Reviewed by Rob Buis.
395
396         Build fix: QNX port does use ctype.h, so we should not
397         include <wtf/DisallowCType.h> in WebCore/config.h
398
399         No new tests - Build Fix
400
401         * config.h:
402
403 2012-03-27  Hao Zheng  <zhenghao@chromium.org>
404
405         Change default position attribute of media control panel to relative for Android.
406         https://bugs.webkit.org/show_bug.cgi?id=82303
407
408         Reviewed by Eric Carlson.
409
410         Follow up https://bugs.webkit.org/show_bug.cgi?id=79746 .
411
412         * css/mediaControlsChromiumAndroid.css:
413         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
414
415 2012-03-27  Alexei Filippov  <alexeif@chromium.org>
416
417         Web Inspector: Speed up snapshot parsing.
418         https://bugs.webkit.org/show_bug.cgi?id=82325
419
420         Replacing the iterators with raw nodes/edges access speeds up
421         some phases phasses up to 10 times, taking down the whole init
422         time to less than 6 sec.
423
424         Reviewed by Yury Semikhatsky.
425
426         * inspector/front-end/HeapSnapshot.js:
427         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
428         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
429         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
430
431 2012-03-27  Antti Koivisto  <antti@apple.com>
432
433         Assertion failure in acid2.
434
435         Rubber-stamped by Andreas Kling.
436
437         Remove assert added in http://trac.webkit.org/changeset/112258. It seems insertedInto/removedFromDocument
438         don't always pair.
439
440         * svg/SVGDocumentExtensions.cpp:
441         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
442
443 2012-03-27  Yury Semikhatsky  <yurys@chromium.org>
444
445         Web Inspector: simplify heap profiler front-end
446         https://bugs.webkit.org/show_bug.cgi?id=82338
447
448         Simplify constructors of WebInspector.HeapSnapshotArraySlice and
449         WebInspector.HeapSnapshotEdgesProvider.
450
451         Reviewed by Pavel Feldman.
452
453         * inspector/front-end/HeapSnapshot.js:
454         (WebInspector.HeapSnapshotArraySlice):
455         (WebInspector.HeapSnapshotArraySlice.prototype.item):
456         (WebInspector.HeapSnapshotArraySlice.prototype.slice):
457         (WebInspector.HeapSnapshotNode.prototype.get rawEdges):
458         (WebInspector.HeapSnapshot.prototype._retainersForNode):
459         (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
460         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
461         (WebInspector.HeapSnapshotEdgesProvider):
462
463 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
464
465         Web Inspector: Tabbed pane should set focus on its contents on tab click.
466         https://bugs.webkit.org/show_bug.cgi?id=82323
467
468         Reviewed by Pavel Feldman.
469
470         Otherwise selected tab does not have focus.
471         Also added tabIndex on tabElements to prevent pasting on closing middle click.
472
473         * inspector/front-end/TabbedPane.js:
474         (WebInspector.TabbedPane):
475         (WebInspector.TabbedPane.prototype.focus):
476         (WebInspector.TabbedPane.prototype.selectTab):
477         (WebInspector.TabbedPaneTab.prototype._createTabElement):
478         (WebInspector.TabbedPaneTab.prototype._tabClicked):
479
480 2012-03-27  Pavel Podivilov  <podivilov@chromium.org>
481
482         Web Inspector: dispatch breakpoint-added and breakpoint-removed events on UISourceCode.
483         https://bugs.webkit.org/show_bug.cgi?id=82318
484
485         Reviewed by Vsevolod Vlasov.
486
487         Breakpoint-added and breakpoint-removed events are always related to specific UISourceCode.
488         See bug 82224 for more details.
489
490         * inspector/front-end/BreakpointManager.js:
491         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
492         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
493         * inspector/front-end/DebuggerPresentationModel.js:
494         (WebInspector.DebuggerPresentationModel):
495         (WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
496         (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
497         * inspector/front-end/ScriptsPanel.js:
498         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
499         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
500         (WebInspector.ScriptsPanel.prototype._addBreakpointListeners):
501         (WebInspector.ScriptsPanel.prototype._removeBreakpointListeners):
502         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
503         * inspector/front-end/UISourceCode.js:
504
505 2012-03-27  Jason Liu  <jason.liu@torchmobile.com.cn>
506
507         [BlackBerry]Cleanup WTF string in platform/network/blackberry
508         https://bugs.webkit.org/show_bug.cgi?id=82005
509
510         Reviewed by Rob Buis.
511
512         No new tests. Just replace WTF::String with String.
513
514         * platform/network/blackberry/NetworkJob.cpp:
515         (WebCore::NetworkJob::handleNotifyDataReceived):
516
517 2012-03-27  Alexander Pavlov  <apavlov@chromium.org>
518
519         Web Inspector: Enable "number" parameters in the web inspector protocol methods
520         https://bugs.webkit.org/show_bug.cgi?id=82334
521
522         The generated protocol dispatcher does not understand protocol method parameters of type "number"
523         (mapped to "double" in the native code.)
524
525         Reviewed by Vsevolod Vlasov.
526
527         * inspector/CodeGeneratorInspector.py:
528         (RawTypes.Number.get_getter_name):
529         (RawTypes.Number.get_c_initializer):
530         (RawTypes.Number.get_js_bind_type):
531         (RawTypes.Number.get_validate_method_params.ValidateMethodParams):
532         (RawTypes.Number.get_validate_method_params):
533
534 2012-03-27  Alexei Filippov  <alexeif@chromium.org>
535
536         Web Inspector: Fix missing objects in the dominators view.
537         https://bugs.webkit.org/show_bug.cgi?id=82194
538
539         Due to the nature of dominators tree it is not possible to hide internal
540         objects there because they may happen to contain user objects that can't
541         be hidden.
542         Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
543         function.
544
545         Reviewed by Yury Semikhatsky.
546
547         * inspector/front-end/DetailedHeapshotGridNodes.js:
548         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
549         * inspector/front-end/HeapSnapshot.js:
550         (WebInspector.HeapSnapshotArraySlice.prototype.slice):
551
552 2012-03-27  Antti Koivisto  <antti@apple.com>
553
554         Remove Document::mappedElementSheet() 
555         https://bugs.webkit.org/show_bug.cgi?id=82242
556
557         Reviewed by Andreas Kling and Nikolas Zimmermann.
558
559         The only thing this is used for anymore is SVGFontFaceElement. That can be handled without
560         the confusing extra stylesheet.
561
562         * css/CSSStyleSelector.cpp:
563         (WebCore::CSSStyleSelector::CSSStyleSelector):
564         * css/CSSStyleSelector.h:
565         (CSSStyleSelector):
566         
567             - Add font face rules from registered SVGFontFaceElements.
568             - Simplify the constructor signature. Stylesheets are part of the document.
569             
570         * dom/Document.cpp:
571         (WebCore::Document::~Document):
572         (WebCore::Document::createStyleSelector):
573         (WebCore):
574         (WebCore::Document::updateBaseURL):
575         * dom/Document.h:
576         (WebCore):
577         (WebCore::Document::documentUserSheets):
578         (Document):
579
580             - Remove mappedElementSheet        
581             - Adapt to the CSSStyleSelector constructor signature changes.
582
583         * svg/SVGDocumentExtensions.cpp:
584         (WebCore::SVGDocumentExtensions::svgFontFaceElements):
585         (WebCore):
586         (WebCore::SVGDocumentExtensions::registerSVGFontFaceElement):
587         (WebCore::SVGDocumentExtensions::unregisterSVGFontFaceElement):
588         * svg/SVGDocumentExtensions.h:
589         (WebCore):
590         (SVGDocumentExtensions):
591         
592             - Add map for SVGFontFaceElements
593
594         * svg/SVGFontFaceElement.cpp:
595         (WebCore::SVGFontFaceElement::insertedIntoDocument):
596         (WebCore::SVGFontFaceElement::removedFromDocument):
597         (WebCore):
598         * svg/SVGFontFaceElement.h:
599         (SVGFontFaceElement):
600         (WebCore::SVGFontFaceElement::fontFaceRule):
601         
602             - Switch to updating svgFontFaceElements map.
603             - Use elementSheet as the parent sheet (nothing is ever added to the elementSheet, it is used for
604               resolving relative URLs only).
605
606 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
607
608         Web Inspector: startEditing should remove tabIndex attribute from the element if it was not set before.
609         https://bugs.webkit.org/show_bug.cgi?id=82322
610
611         Reviewed by Pavel Feldman.
612
613         This patch removes tabIndex attribute from the element after editing if it was not present before.
614         Otherwise tabIndex becomes set unexpectedly after exiting edit mode.
615
616         * inspector/front-end/UIUtils.js:
617         (WebInspector.startEditing.cleanUpAfterEditing):
618
619 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
620
621         Web Inspector: Tree outline should not start search on key press if it is being edited.
622         https://bugs.webkit.org/show_bug.cgi?id=82327
623
624         Reviewed by Pavel Feldman.
625
626         This is needed for snippet renaming support.
627
628         * inspector/front-end/treeoutline.js:
629         (TreeOutline):
630         (TreeOutline.prototype._treeKeyPress):
631
632 2012-03-27  Levi Weintraub  <leviw@chromium.org>
633
634         Revert RenderApplet::intrinsicSize to integers
635         https://bugs.webkit.org/show_bug.cgi?id=82206
636
637         Reviewed by Eric Seidel.
638
639         Intrinsic sizes originate either outside of WebCore, or from their initial values,
640         which are always integers. Reverting RenderApplet::intrinsicSize to integers, the
641         last spot improperly using LayoutUnits
642
643         No new tests. No change in behavior.
644
645         * rendering/RenderApplet.cpp:
646         (WebCore::RenderApplet::intrinsicSize):
647         * rendering/RenderApplet.h:
648         (RenderApplet):
649
650
651 2012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
652
653         Increase code sharing between CSSComputedStyleDeclaration and CSSPropertyLonghand.
654         https://bugs.webkit.org/show_bug.cgi?id=82261
655
656         Reviewed by Ryosuke Niwa.
657
658         Use longhands declaration from CSSPropertyLonghand in CSSComputedStyleDeclaration to avoid
659         code duplication.
660
661         No new tests : refactoring only, we shouldn't have any behavior difference.
662
663         * css/CSSComputedStyleDeclaration.cpp:
664         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
665         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties):
666         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
667         * css/CSSComputedStyleDeclaration.h:
668         (WebCore):
669         (CSSComputedStyleDeclaration):
670         * css/CSSPropertyLonghand.cpp:
671         (WebCore::outlineLonghand):
672         Re-order to match the spec default order and also remove outline-offset as it is not part
673         of the shorthand (http://www.w3.org/TR/css3-ui/#outline). Luckily this was cover by a layout test.
674
675 2012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
676
677         Web Inspector: Editable TextViewer should show cursor when it is focused.
678         https://bugs.webkit.org/show_bug.cgi?id=82320
679
680         Reviewed by Pavel Feldman.
681
682         TextViewer now focuses editable inner container unless read-only flag is set.
683
684         * inspector/front-end/TextViewer.js:
685         (WebInspector.TextViewer.prototype.focus):
686         (WebInspector.TextEditorMainPanel):
687         (WebInspector.TextEditorMainPanel.prototype._handleElementFocus):
688         (WebInspector.TextEditorMainPanel.prototype.focus):
689
690 2012-03-26  Levi Weintraub  <leviw@chromium.org>
691
692         Unreviewed. Removing change markers from ChangeLog.
693
694 2012-03-26  Levi Weintraub  <leviw@chromium.org>
695
696         Convert RenderSelectionInfo::rect to LayoutUnits
697         https://bugs.webkit.org/show_bug.cgi?id=82213
698
699         Reviewed by Eric Seidel.
700
701         RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates local to
702         renderers should be stored in LayoutUnits.
703
704         No new tests. No change in behavior.
705
706         * rendering/RenderSelectionInfo.h:
707         (WebCore::RenderSelectionInfo::rect):
708         (RenderSelectionInfo):
709
710 2012-03-26  Levi Weintraub  <leviw@chromium.org>
711
712         Convert RenderSelectionInfo::rect to LayoutUnits
713         https://bugs.webkit.org/show_bug.cgi?id=82213
714
715         Reviewed by Eric Seidel.
716
717         RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates
718         local to renderers should be stored in LayoutUnits as described in
719         http://trac.webkit.org/wiki/LayoutUnit
720
721         No new tests. No change in behavior.
722
723         * rendering/RenderSelectionInfo.h:
724         (WebCore::RenderSelectionInfo::rect):
725         (RenderSelectionInfo):
726
727 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
728
729         Enable animVal support for SVGAnimatedRect
730         https://bugs.webkit.org/show_bug.cgi?id=82317
731
732         Reviewed by Zoltan Herczeg.
733
734         Enable animVal support for SVGAnimatedRect. Very simple now that everything is prepared.
735         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedRectAnimator.
736
737         Extended existing tests to cover this.
738
739         * svg/SVGAnimatedRect.cpp:
740         (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
741         (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation):
742         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
743         (WebCore::SVGAnimatedRectAnimator::animValWillChange):
744         (WebCore::SVGAnimatedRectAnimator::animValDidChange):
745         * svg/SVGAnimatedRect.h:
746         (SVGAnimatedRectAnimator):
747         * svg/SVGAnimatedType.cpp:
748         (WebCore::SVGAnimatedType::supportsAnimVal):
749
750 2012-03-27  Sheriff Bot  <webkit.review.bot@gmail.com>
751
752         Unreviewed, rolling out r112201.
753         http://trac.webkit.org/changeset/112201
754         https://bugs.webkit.org/show_bug.cgi?id=82302
755
756         Breaks chromium's WebPageSerializerTest.HTMLNodes test
757         (Requested by pfeldman on #webkit).
758
759         * loader/cache/CachedCSSStyleSheet.cpp:
760         (WebCore::CachedCSSStyleSheet::error):
761         (WebCore):
762         * loader/cache/CachedCSSStyleSheet.h:
763         (CachedCSSStyleSheet):
764         * loader/cache/CachedFont.cpp:
765         (WebCore):
766         (WebCore::CachedFont::error):
767         * loader/cache/CachedFont.h:
768         (CachedFont):
769         * loader/cache/CachedImage.cpp:
770         (WebCore::CachedImage::error):
771         * loader/cache/CachedResource.h:
772         (CachedResource):
773         * loader/cache/CachedScript.cpp:
774         (WebCore::CachedScript::error):
775         (WebCore):
776         * loader/cache/CachedScript.h:
777         (CachedScript):
778         * loader/cache/CachedXSLStyleSheet.cpp:
779         (WebCore::CachedXSLStyleSheet::error):
780         (WebCore):
781         * loader/cache/CachedXSLStyleSheet.h:
782         (CachedXSLStyleSheet):
783
784 2012-03-27  Levi Weintraub  <leviw@chromium.org>
785
786         LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
787         https://bugs.webkit.org/show_bug.cgi?id=82185
788
789         Reviewed by Eric Seidel.
790
791         Removing an optional parameter for old bounds in LayoutRepainter's constructor that
792         is no longer used. The old bounds are instead always gleaned from the renderer's
793         clippedOverflowRectForRepaint.
794
795         The renderer's bounds and outline rect also are stored in LayoutUnits to properly
796         detect sub-pixel changes during layout. Eventually, we'll pixel snap these values
797         when telling the embedder to invalidate. Adding a comment to that effect.
798
799         No new tests. No change in behavior.
800
801         * rendering/LayoutRepainter.cpp:
802         (WebCore::LayoutRepainter::LayoutRepainter):
803         * rendering/LayoutRepainter.h:
804         (LayoutRepainter):
805
806 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
807
808         Enable animVal support for SVGAnimatedString
809         https://bugs.webkit.org/show_bug.cgi?id=82316
810
811         Reviewed by Zoltan Herczeg.
812
813         Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
814         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.
815
816         Test: svg/animations/svgstring-animation-1.html
817
818         * svg/SVGAnimatedString.cpp:
819         (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
820         (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
821         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
822         (WebCore::SVGAnimatedStringAnimator::animValWillChange):
823         (WebCore::SVGAnimatedStringAnimator::animValDidChange):
824         * svg/SVGAnimatedString.h:
825         (SVGAnimatedStringAnimator):
826         * svg/SVGAnimatedType.cpp:
827         (WebCore::SVGAnimatedType::supportsAnimVal):
828
829 2012-03-27  Levi Weintraub  <leviw@chromium.org>
830
831         Update usage of LayoutUnits in RenderListMarker
832         https://bugs.webkit.org/show_bug.cgi?id=81921
833
834         Reviewed by Eric Seidel.
835
836         Implementing proper pixel snapping in list marker painting, and correcting usage of integers
837         for local coordinates/margins that should be sub-pixel.
838
839         No new tests. No change in behavior.
840
841         * rendering/RenderListMarker.cpp:
842         (WebCore::RenderListMarker::localSelectionRect): Changed to LayoutUnits since this represents
843         a rect in local coordinates.
844         (WebCore::RenderListMarker::paint): Doing proper pixel snapping, and using integers for
845         results from text measurement.
846         (WebCore::RenderListMarker::computePreferredLogicalWidths): Using integers for results
847         from text measurement.
848         (WebCore::RenderListMarker::updateMargins): Fixing to be LayoutUnits.
849         * rendering/RenderListMarker.h:
850         (RenderListMarker):
851
852 2012-03-27  Levi Weintraub  <leviw@chromium.org>
853
854         Revert linesBoundingBox to integers
855         https://bugs.webkit.org/show_bug.cgi?id=82182
856
857         Reviewed by Eric Seidel.
858
859         LayoutRects are intended to be pixel snapped to determine the ultimate screen
860         coordinates, but the Inline Box tree is laid out using floats, and pixel snapping
861         the resulting box from linesBoundingBox would produce a potentially incorrect
862         rectangle. Keeping this using enclosingIntRect retains the previous accuracy and
863         prevents misuse.
864
865         No new tests. No change in behavior.
866
867         * rendering/RenderInline.cpp:
868         (WebCore::RenderInline::linesBoundingBox):
869         * rendering/RenderInline.h:
870         (RenderInline):
871         * rendering/RenderLayer.cpp:
872         (WebCore::RenderLayer::updateLayerPosition):
873         * rendering/RenderText.cpp:
874         (WebCore::RenderText::linesBoundingBox):
875         * rendering/svg/RenderSVGInlineText.cpp:
876         (WebCore::RenderSVGInlineText::linesBoundingBox):
877         * rendering/svg/RenderSVGInlineText.h:
878         (RenderSVGInlineText):
879
880 2012-03-26  Pavel Podivilov  <podivilov@chromium.org>
881
882         Web Inspector: store UIBreakpoints on UISourceCode.
883         https://bugs.webkit.org/show_bug.cgi?id=82214
884
885         This change will allow us to make breakpoint-added and breakpoint-removed events a part of UISourceCode interface.
886         See bug 82224 for more details.
887
888         Reviewed by Vsevolod Vlasov.
889
890         * inspector/front-end/BreakpointManager.js:
891         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
892         (WebInspector.BreakpointManager.prototype.setBreakpoint):
893         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
894         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
895         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
896         (WebInspector.BreakpointManager.prototype.debuggerReset):
897         * inspector/front-end/CompilerScriptMapping.js:
898         (WebInspector.CompilerScriptMapping.prototype.addScript):
899         * inspector/front-end/DebuggerPresentationModel.js:
900         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
901         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode):
902         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
903         (WebInspector.UISourceCodeImpl):
904         (WebInspector.UISourceCodeImpl.prototype.breakpoints):
905         (WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
906         (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
907         * inspector/front-end/RawSourceCode.js:
908         (WebInspector.RawSourceCode.prototype._createUISourceCode):
909         * inspector/front-end/SnippetsModel.js:
910         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
911         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
912         * inspector/front-end/UISourceCode.js:
913         (WebInspector.UISourceCode.prototype.get domain):
914         (WebInspector.UISourceCode.prototype.get folderName):
915         (WebInspector.UISourceCode.prototype.get fileName):
916         (WebInspector.UISourceCode.prototype.get displayName):
917         (WebInspector.UISourceCode.prototype._parseURL):
918         (WebInspector.UISourceCode.prototype._didRequestContent):
919         (WebInspector.UISourceCode.prototype.breakpoints):
920         * inspector/front-end/inspector.html:
921
922 2012-03-27  Nat Duca  <nduca@chromium.org>
923
924         [chromium] Fix crash with fling with tracing enabled
925         https://bugs.webkit.org/show_bug.cgi?id=82306
926
927         The TRACE_EVENT_START instrumentation was deferencing a PassOwnPtr
928         after it had been passed into another OwnPtr. This caused frequent
929         crashes when tracing was enabled.
930
931         Reviewed by Adam Barth.
932
933         * platform/ActivePlatformGestureAnimation.cpp:
934         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
935         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
936         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
937
938 2012-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
939
940         [SOUP] Implement missing methods in CookieJarSoup
941         https://bugs.webkit.org/show_bug.cgi?id=82082
942
943         Reviewed by Martin Robinson.
944
945         * platform/network/soup/CookieJarSoup.cpp:
946         (WebCore::defaultCookieJar): Return a global GRefPtr to store the
947         default cookie jar.
948         (WebCore::soupCookieJar): Return the current cookie jar or create
949         a new one.
950         (WebCore::setSoupCookieJar): Set the current cookie jar.
951         (WebCore::setCookies): Fix coding style.
952         (WebCore::cookiesForDocument): Helper function to get the list of
953         cookies as a string.
954         (WebCore::cookies): Use cookiesForDocument().
955         (WebCore::cookieRequestHeaderFieldValue): Ditto.
956         (WebCore::getRawCookies): Get the list of cookies for the given
957         document and url.
958         (WebCore::deleteCookie): Delete the given cookie.
959         (WebCore::getHostnamesWithCookies): Use GOwnPtr.
960         (WebCore::deleteCookiesForHostname): Use GOwnPtr and
961         soup_cookie_domain_matches() instead of comparing the domain
962         directly with the given hostname.
963         (WebCore::deleteAllCookies): Use GOwnPtr.
964         * platform/network/soup/CookieJarSoup.h:
965         * platform/network/soup/GOwnPtrSoup.cpp:
966         (WTF::SoupCookie): Add GOwnPtr template for SoupCookie.
967         * platform/network/soup/GOwnPtrSoup.h:
968         * platform/network/soup/ResourceHandleSoup.cpp:
969         (WebCore::ensureSessionIsInitialized): Use soupCookieJar() instead
970         of defaultCookieJar().
971
972 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
973
974         Enable animVal support for SVGAnimatedBoolean
975         https://bugs.webkit.org/show_bug.cgi?id=82311
976
977         Reviewed by Antti Koivisto.
978
979         Enable animVal support for SVGAnimatedBoolean. Very simple now that everything is prepared.
980         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedBooleanAnimator.
981
982         Extended existing tests to cover this.
983
984         * svg/SVGAnimatedBoolean.cpp:
985         (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
986         (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
987         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
988         (WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
989         (WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
990         * svg/SVGAnimatedBoolean.h:
991         (SVGAnimatedBooleanAnimator):
992         * svg/SVGAnimatedType.cpp:
993         (WebCore::SVGAnimatedType::setValueAsString):
994         (WebCore::SVGAnimatedType::supportsAnimVal):
995
996 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
997
998         <img style='width: 100%' src='foo.svg'> gets pixellated when stretched
999         https://bugs.webkit.org/show_bug.cgi?id=81631
1000
1001         Reviewed by Antti Koivisto.
1002
1003         Final cleanup of RenderReplaced after the intrinsic size negotiation patch series from some weeks/months ago.
1004         Stop tracking whether a RenderReplaced has an intrinsic size or not with an extra-bool, instead assume each
1005         RenderReplaced derived class has an intrinsic size. If not, the class should override
1006         computeIntrinsicRatioInformation() for any custom logic - currently only done by RenderImage.
1007
1008         Remove all logic depending on m_hasIntrinsicSize from computeReplacedLogicalWidth/Height, which was used
1009         to support different sizing models depending on if the replaced element is a RenderImage or a RenderPart.
1010         Unify all of this in computeIntrinsicRatioInformation right in RenderReplaced. This allows to remove
1011         a hack from RenderImage::computeReplacedLogicalWidth(), which forced the synchroniziation of the intrinsicSize()
1012         before calling the base classes RenderReplaced::computeReplacedLogicalWidth().
1013         Now RenderImage just overrides the layout() method, calls RenderReplaced::layout() and then sets the container
1014         size of the image resources to [contentWidth(), contentHeight()] - reflecting the actual result of the layout.
1015         Furthermore this now allows us to unify CachedImage::imageSizeForRenderer() again for both SVG and non-SVG images.
1016
1017         Propagating the right container size to the image resource fixes the actual bug, that the SVGImage got pixellated.
1018         Adding new tests covering percentage width or height set on an <img> embedding an external SVG, no more pixelation.
1019
1020         Tests: svg/as-image/img-relative-height-expected.html
1021                svg/as-image/img-relative-height.html
1022                svg/as-image/img-relative-width-expected.html
1023                svg/as-image/img-relative-width.html
1024
1025         * loader/cache/CachedImage.cpp:
1026         (WebCore::CachedImage::imageSizeForRenderer):
1027         * rendering/RenderEmbeddedObject.cpp:
1028         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
1029         * rendering/RenderImage.cpp:
1030         (WebCore::RenderImage::layout):
1031         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1032         * rendering/RenderImage.h:
1033         (RenderImage):
1034         * rendering/RenderReplaced.cpp:
1035         (WebCore::RenderReplaced::RenderReplaced):
1036         (WebCore::rendererHasAspectRatio):
1037         (WebCore):
1038         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
1039         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
1040         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1041         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1042         * rendering/RenderReplaced.h:
1043         (WebCore::RenderReplaced::intrinsicSize):
1044         (RenderReplaced):
1045         (WebCore::RenderReplaced::setIntrinsicSize):
1046         * svg/graphics/SVGImage.cpp:
1047         (WebCore::SVGImage::setContainerSize):
1048         * svg/graphics/SVGImage.h:
1049         (WebCore::SVGImage::usesContainerSize):
1050
1051 2012-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
1052
1053         Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
1054         https://bugs.webkit.org/show_bug.cgi?id=82305
1055
1056         Reviewed by Yury Semikhatsky.
1057
1058         * inspector/front-end/HeapSnapshot.js:
1059         (WebInspector.HeapSnapshot.prototype._bfs):
1060
1061 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1062
1063         SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
1064         https://bugs.webkit.org/show_bug.cgi?id=67563
1065
1066         Reviewed by Dirk Schulze.
1067
1068         Add SVGAnimatedIntegerOptionalInteger type handling animation of pair<int, int> objects
1069         as used for the SVG properties 'filterRes' and 'order'. They're currently animated as
1070         SVGAnimatedNumberOptionalNumber - but that won't work for animVal support. Fix that
1071         and enable animVal support for SVGAnimatedInteger(OptionalInteger).
1072
1073         Use 'int' as datatype for SVGAnimatedInteger instead of 'long' for consistency, and
1074         move SVGAnimatedEnumeration from 'int' to 'unsigned short', to make them distinguishable.
1075
1076         Test: svg/animations/svginteger-animation-2.html
1077
1078         * CMakeLists.txt:
1079         * GNUmakefile.list.am:
1080         * Target.pri:
1081         * WebCore.gypi:
1082         * WebCore.vcproj/WebCore.vcproj:
1083         * WebCore.xcodeproj/project.pbxproj:
1084         * svg/SVGAllInOne.cpp:
1085         * svg/SVGAnimatedEnumeration.h:
1086         (WebCore):
1087         * svg/SVGAnimatedInteger.cpp:
1088         (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
1089         (WebCore):
1090         (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
1091         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
1092         (WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
1093         (WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
1094         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
1095         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
1096         * svg/SVGAnimatedInteger.h:
1097         (WebCore):
1098         (SVGAnimatedIntegerAnimator):
1099         * svg/SVGAnimatedIntegerOptionalInteger.cpp: Added.
1100         (WebCore):
1101         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator):
1102         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
1103         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
1104         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
1105         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
1106         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
1107         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
1108         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndToValues):
1109         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndByValues):
1110         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
1111         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance):
1112         * svg/SVGAnimatedIntegerOptionalInteger.h: Copied from Source/WebCore/svg/SVGAnimatedInteger.h.
1113         (WebCore):
1114         (SVGAnimatedIntegerOptionalIntegerAnimator):
1115         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::~SVGAnimatedIntegerOptionalIntegerAnimator):
1116         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1117         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
1118         * svg/SVGAnimatedType.cpp:
1119         (WebCore::SVGAnimatedType::~SVGAnimatedType):
1120         (WebCore::SVGAnimatedType::createIntegerOptionalInteger):
1121         (WebCore):
1122         (WebCore::SVGAnimatedType::integerOptionalInteger):
1123         (WebCore::SVGAnimatedType::valueAsString):
1124         (WebCore::SVGAnimatedType::setValueAsString):
1125         (WebCore::SVGAnimatedType::supportsAnimVal):
1126         * svg/SVGAnimatedType.h:
1127         (SVGAnimatedType):
1128         * svg/SVGAnimatorFactory.h:
1129         (WebCore::SVGAnimatorFactory::create):
1130         * svg/SVGFilterElement.cpp:
1131         (WebCore::SVGFilterElement::setFilterRes):
1132         * svg/SVGFilterElement.h:
1133         (SVGFilterElement):
1134         * svg/SVGPathElement.cpp:
1135         (WebCore::SVGPathElement::getPathSegAtLength):
1136         * svg/SVGPathElement.h:
1137         (SVGPathElement):
1138         * svg/SVGPathParserFactory.cpp:
1139         (WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathByteStream):
1140         * svg/SVGPathParserFactory.h:
1141         (SVGPathParserFactory):
1142         * svg/SVGPathTraversalStateBuilder.cpp:
1143         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
1144         * svg/SVGPathTraversalStateBuilder.h:
1145         (SVGPathTraversalStateBuilder):
1146         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1147         (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
1148         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
1149         (WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue):
1150         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
1151         * svg/properties/SVGPropertyInfo.h:
1152         * svg/properties/SVGPropertyTraits.h:
1153
1154 2012-03-25  Nikolas Zimmermann  <nzimmermann@rim.com>
1155
1156         Enable animVal support for SVGAngle
1157         https://bugs.webkit.org/show_bug.cgi?id=82144
1158
1159         Reviewed by Rob Buis.
1160
1161         Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared.
1162         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator.
1163
1164         Extended existing tests to cover this.
1165
1166         * svg/SVGAnimatedAngle.cpp:
1167         (WebCore::sharedSVGAngle):
1168         (WebCore::SVGAnimatedAngleAnimator::constructFromString):
1169         (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
1170         (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
1171         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
1172         (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
1173         (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
1174         (WebCore::SVGAnimatedAngleAnimator::calculateDistance):
1175         * svg/SVGAnimatedAngle.h:
1176         (SVGAnimatedAngleAnimator):
1177         * svg/SVGAnimatedType.cpp:
1178         (WebCore::SVGAnimatedType::supportsAnimVal):
1179
1180 2012-03-27  Yury Semikhatsky  <yurys@chromium.org>
1181
1182         Web Inspector: remove remains of path finder in heap profiler front-end
1183         https://bugs.webkit.org/show_bug.cgi?id=82304
1184
1185         Removed remainders of heap path finder as this code is not used anymore.
1186
1187         Reviewed by Pavel Feldman.
1188
1189         * inspector/front-end/HeapSnapshot.js:
1190         * inspector/front-end/HeapSnapshotProxy.js:
1191
1192 2012-03-27  Dan Bernstein  <mitz@apple.com>
1193
1194         Reverted r112214, since it was not the right fix for the build.
1195
1196         * css/StylePropertySet.cpp:
1197         (WebCore::StylePropertySet::asText):
1198
1199 2012-03-27  Kentaro Hara  <haraken@chromium.org>
1200
1201         [V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc
1202         https://bugs.webkit.org/show_bug.cgi?id=82201
1203
1204         Reviewed by Adam Barth.
1205
1206         This patch improves performance of createTextNode() by 13%, createElement() by 14%,
1207         and cloneNode() by 16%. Similar performance improvement will be observed in
1208         DOM methods that create a new object every time.
1209
1210         Performance test: https://bugs.webkit.org/attachment.cgi?id=133799
1211
1212         The performance test results are as follows. Since the performance of V8's GC is
1213         really unstable, the average of measured times makes no sense in Chromium.
1214         Instead, let us focus on the median. I believe that this performance
1215         improvement has impact on Dromaeo, but we cannot observe the improvement
1216         due to the unsteadiness of V8's GC, as shown below.
1217
1218         Chromium/V8/Linux (without the patch):
1219         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
1220         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
1221         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
1222         Dromaeo/dom-modify/createElement: 439.17runs/s +-31.60% (<--- pretty noisy)
1223         Dromaeo/dom-modify/createTextNode: 287.71runs/s +-28.39% (<--- pretty noisy)
1224         Dromaeo/dom-modify/cloneNode: 174.62runs/s +-25.68% (<--- pretty noisy)
1225
1226         Chromium/V8/Linux (with the patch):
1227         createTextNode : median=240ms (mean=411.12ms, min=237ms, max=2965ms)
1228         createElement : median=325ms (mean=585.30ms, min=317ms, max=2984ms)
1229         cloneNode : median=310ms (mean=522.48ms, min=302ms, max=2988ms)
1230         Dromaeo/dom-modify/createElement: 507.15runs/s +-36.00% (<--- pretty noisy)
1231         Dromaeo/dom-modify/createTextNode: 251.01runs/s +-6.57%
1232         Dromaeo/dom-modify/cloneNode: 177.85runs/s +-28.74% (<--- pretty noisy)
1233
1234         Chromium/V8/Mac (without the patch):
1235         createTextNode : median=317ms (mean=439.08ms, min=303ms, max=3126ms)
1236         createElement : median=403ms (mean=695.70ms, min=398ms, max=5615ms)
1237         cloneNode : median=384ms (mean=577.96ms, min=372ms, max=5313ms)
1238         Dromaeo/dom-modify/createElement: 493.89runs/s +-28.32% (<--- pretty noisy)
1239         Dromaeo/dom-modify/createTextNode: 279.66runs/s +-1.91%
1240         Dromaeo/dom-modify/cloneNode: 173.06runs/s +-24.41% (<--- pretty noisy)
1241
1242         Chromium/V8/Mac (with the patch):
1243         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
1244         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
1245         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
1246         Dromaeo/dom-modify/createElement: 510.47runs/s +-28.13% (<--- pretty noisy)
1247         Dromaeo/dom-modify/createTextNode: 215.80runs/s +-20.99% (<--- pretty noisy)
1248         Dromaeo/dom-modify/cloneNode: 174.41runs/s +-24.85% (<--- pretty noisy)
1249
1250         Safari/JavaScriptCore/Mac:
1251         createTextNode : median=142ms (mean=141.04ms, min=110ms, max=168ms)
1252         createElement : median=234ms (mean=245.74ms, min=219ms, max=305ms)
1253         cloneNode : median=210ms (mean=213.36ms, min=204ms, max=284ms)
1254         Dromaeo/dom-modify/createElement: 822.49runs/s +-1.69%
1255         Dromaeo/dom-modify/createTextNode: 735.57runs/s +-0.91%
1256         Dromaeo/dom-modify/cloneNode: 135.20runs/s +-4.13%
1257
1258         This patch makes the following two optimizations:
1259
1260         [1] If the currently running context is equal to the context that we are about to enter,
1261         we do not call context->Enter().
1262         [2] We do not create a Local handle of the context until we really need to enter the context.
1263
1264         * bindings/scripts/CodeGeneratorV8.pm:
1265         (GenerateToV8Converters):
1266         * bindings/v8/V8Proxy.cpp:
1267         (WebCore::V8Proxy::persistentContext):
1268         (WebCore):
1269         * bindings/v8/V8Proxy.h:
1270         (V8Proxy):
1271
1272         * WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results.
1273
1274 2012-03-27  Bill Budge  <bbudge@chromium.org>
1275
1276         cross-origin XMLHttpRequest doesn't work with redirect
1277         https://bugs.webkit.org/show_bug.cgi?id=57600
1278
1279         Reviewed by Adam Barth.
1280
1281         Changes DocumentThreadableLoader to follow the CORS redirect steps when
1282         asynchronously loading a cross origin request with access control. Synchronous
1283         loads should not be affected. Also adds methods to ResourceRequestBase to
1284         clear special request headers that aren't allowed when using access control.
1285         Follows the CORS spec as described in the Latest Editor Draft at:
1286         http://www.w3.org/TR/cors/
1287
1288         Test: http/tests/xmlhttprequest/access-control-and-redirects-async.html
1289
1290         * loader/DocumentThreadableLoader.cpp:
1291         * loader/DocumentThreadableLoader.h:
1292         * platform/network/ResourceRequestBase.cpp:
1293         * platform/network/ResourceRequestBase.h:
1294
1295 2012-03-27  Adam Barth  <abarth@webkit.org>
1296
1297         ImageLoader::m_firedLoadEvent is a confusing name
1298         https://bugs.webkit.org/show_bug.cgi?id=82283
1299
1300         Reviewed by Kentaro Hara.
1301
1302         This patch renames m_firedLoadEvent (and friends) to
1303         m_hasPendingLoadEvent (and negates the value).  That name more
1304         accurately reflects the semantics of this piece of state.  For example,
1305         we now initialize m_hasPendingLoadEvent to false, which makes sense as
1306         there is no pending load event, whereas before we initialized
1307         m_firedLoadEvent to true, which made less sense since we hadn't yet
1308         actually fired the load event.
1309
1310         * bindings/v8/V8GCController.cpp:
1311         (WebCore::calculateGroupId):
1312         * html/HTMLImageElement.cpp:
1313         (WebCore::HTMLImageElement::attach):
1314         * html/HTMLImageElement.h:
1315         (HTMLImageElement):
1316         (WebCore::HTMLImageElement::hasPendingLoadEvent):
1317         (WebCore::HTMLImageElement::hasPendingActivity):
1318         * html/ImageInputType.cpp:
1319         (WebCore::ImageInputType::attach):
1320         * loader/ImageLoader.cpp:
1321         (WebCore::ImageLoader::ImageLoader):
1322         (WebCore::ImageLoader::~ImageLoader):
1323         (WebCore::ImageLoader::setImage):
1324         (WebCore::ImageLoader::updateFromElement):
1325         (WebCore::ImageLoader::notifyFinished):
1326         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1327         (WebCore::ImageLoader::dispatchPendingLoadEvent):
1328         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1329         * loader/ImageLoader.h:
1330         (WebCore::ImageLoader::hasPendingBeforeLoadEvent):
1331         (WebCore::ImageLoader::hasPendingLoadEvent):
1332         (ImageLoader):
1333         * svg/SVGImageElement.cpp:
1334         (WebCore::SVGImageElement::haveLoadedRequiredResources):
1335
1336 2012-03-27  Dan Bernstein  <mitz@apple.com>
1337
1338         Tried to fix 32-bit builds.
1339
1340         * css/StylePropertySet.cpp:
1341         (WebCore::StylePropertySet::asText):
1342
1343 2012-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1344
1345         Unreviewed, rolling out r112199.
1346         http://trac.webkit.org/changeset/112199
1347         https://bugs.webkit.org/show_bug.cgi?id=82295
1348
1349         Breaks Chromium Win compilation (Requested by pfeldman on
1350         #webkit).
1351
1352         * bindings/scripts/CodeGeneratorV8.pm:
1353         (GenerateConstructorCallback):
1354         (GenerateNamedConstructorCallback):
1355         (GenerateToV8Converters):
1356         (GetDomMapFunction):
1357         * bindings/scripts/test/V8/V8Float64Array.cpp:
1358         (WebCore::V8Float64Array::wrapSlow):
1359         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1360         (WebCore::V8TestActiveDOMObject::wrapSlow):
1361         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1362         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1363         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1364         (WebCore::V8TestEventConstructor::wrapSlow):
1365         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1366         (WebCore::V8TestEventTarget::wrapSlow):
1367         * bindings/scripts/test/V8/V8TestInterface.cpp:
1368         (WebCore::V8TestInterface::wrapSlow):
1369         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1370         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1371         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1372         (WebCore::V8TestNamedConstructor::wrapSlow):
1373         * bindings/scripts/test/V8/V8TestObj.cpp:
1374         (WebCore::V8TestObj::wrapSlow):
1375         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1376         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1377         * bindings/v8/V8DOMWrapper.cpp:
1378         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
1379         (WebCore):
1380         * bindings/v8/V8DOMWrapper.h:
1381         (WebCore):
1382         (V8DOMWrapper):
1383         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1384         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
1385
1386 2012-03-26  David Kilzer  <ddkilzer@apple.com>
1387
1388         Build system prep work for upstreaming iOS changes
1389         <http://webkit.org/b/82267>
1390
1391         Reviewed by Mark Rowe.
1392
1393         * DerivedSources.make: Move 'bison' into a variable and use
1394         xcrun to find it on Mac OS X.
1395         * bindings/scripts/preprocessor.pm:
1396         (applyPreprocessor): Add local @args variable.  On iOS, the
1397         compiler needs additional "-isysroot $(SDKROOT)" arguments when
1398         invoked, so it's easier to add them to an array, especially if
1399         $SDKROOT contains a space in the path.  Remove now-redundant
1400         $gccLocation variable.
1401
1402 2012-03-26  Nate Chapin  <japhet@chromium.org>
1403
1404         Remove duplicate error() impls in CachedResource subclasses
1405         https://bugs.webkit.org/show_bug.cgi?id=81161
1406
1407         Reviewed by Alexey Proskuryakov.
1408
1409         No new tests, refactor only.
1410
1411         * loader/cache/CachedCSSStyleSheet.cpp:
1412         * loader/cache/CachedCSSStyleSheet.h:
1413         * loader/cache/CachedFont.cpp:
1414         * loader/cache/CachedFont.h:
1415         * loader/cache/CachedImage.cpp:
1416         * loader/cache/CachedResource.h: Make checkNotify()
1417              virtual, so the right checkNotify() gets called in error().
1418         * loader/cache/CachedScript.cpp:
1419         * loader/cache/CachedScript.h:
1420         * loader/cache/CachedXSLStyleSheet.cpp:
1421         * loader/cache/CachedXSLStyleSheet.h:
1422
1423 2012-03-26  Ken Buchanan  <kenrb@chromium.org>
1424
1425         Assert failure from capitalized RenderTextFragment
1426         https://bugs.webkit.org/show_bug.cgi?id=82096
1427
1428         Reviewed by Ryosuke Niwa.
1429
1430         The cause of this bug was the call to RenderTextFragment::setTextInternal
1431         resulting from a style change from RenderObject::addChild. The idea here
1432         is to better separate the code path for transforming existing text from
1433         the code path for replacing the underlying text of a node. For
1434         RenderTextFragment this has to be clear because only in the latter case
1435         does the first-letter get reset.
1436
1437         * rendering/RenderObject.cpp:
1438         (WebCore::RenderObject::addChild): Added call to transformText
1439         * rendering/RenderText.cpp:
1440         (WebCore::RenderText::styleDidChange): Added call to transformText
1441         (WebCore::RenderText::transformText): Added
1442         * rendering/RenderText.h:
1443         (WebCore::RenderText::setText): Changed to virtual so RenderTextFragment can override
1444         (WebCore::RenderText::transformText): Added
1445         * rendering/RenderTextFragment.cpp:
1446         (WebCore::RenderTextFragment::styleDidChange): Removed references to
1447         m_allowFragmentReset which was the previous approach to separating the
1448         code paths
1449         (WebCore::RenderTextFragment::setTextInternal): Deleted
1450         (WebCore::RenderTextFragment::setText): Added with most of logic that was
1451         previously in setTextInternal
1452         (WebCore::RenderTextFragment::transformText): Added
1453         * rendering/RenderTextFragment.h:
1454         (WebCore::RenderTextFragment::setText): Added
1455         (WebCore::RenderTextFragment::transformText): Added
1456         (WebCore::RenderTextFragment::setTextInternal): Deleted
1457
1458 2012-03-26  Adam Klein  <adamk@chromium.org>
1459
1460         Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
1461         https://bugs.webkit.org/show_bug.cgi?id=82256
1462
1463         Reviewed by Adam Barth.
1464
1465         This moves leakRef() calls out of generated code, centralizing them in
1466         V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
1467         PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
1468         (which clearly can't be wrapped in a PassRefPtr).
1469
1470         Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.
1471
1472         * bindings/scripts/CodeGeneratorV8.pm:
1473         (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
1474         (GenerateNamedConstructorCallback): ditto.
1475         (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
1476         instead of directly accessing the wrapper maps and calling set.
1477         (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
1478         (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
1479         * bindings/scripts/test/V8/V8Float64Array.cpp:
1480         (WebCore::V8Float64Array::wrapSlow):
1481         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1482         (WebCore::V8TestActiveDOMObject::wrapSlow):
1483         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1484         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1485         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1486         (WebCore::V8TestEventConstructor::wrapSlow):
1487         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1488         (WebCore::V8TestEventTarget::wrapSlow):
1489         * bindings/scripts/test/V8/V8TestInterface.cpp:
1490         (WebCore::V8TestInterface::wrapSlow):
1491         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1492         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1493         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1494         (WebCore::V8TestNamedConstructor::wrapSlow):
1495         * bindings/scripts/test/V8/V8TestObj.cpp:
1496         (WebCore::V8TestObj::wrapSlow):
1497         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1498         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1499         * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
1500         * bindings/v8/V8DOMWrapper.h:
1501         (WebCore): Forward decls.
1502         (V8DOMWrapper):
1503         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
1504         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
1505         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
1506         this one handles non-active Nodes.
1507         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
1508         DOMNode method, now handles only active Nodes.
1509         (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.
1510
1511 2012-03-26  Pratik Solanki  <psolanki@apple.com>
1512
1513         Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength
1514         https://bugs.webkit.org/show_bug.cgi?id=82254
1515
1516         Reviewed by Benjamin Poulain.
1517
1518         No new tests because no functional changes.
1519
1520         * css/CSSComputedStyleDeclaration.cpp:
1521         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1522         * css/LengthFunctions.cpp:
1523         (WebCore::minimumValueForLength):
1524         (WebCore::valueForLength):
1525         * css/LengthFunctions.h:
1526         (WebCore):
1527         * html/HTMLAreaElement.cpp:
1528         (WebCore::HTMLAreaElement::getRegion):
1529         * platform/win/PopupMenuWin.cpp:
1530         (WebCore::PopupMenuWin::paint):
1531         * rendering/AutoTableLayout.cpp:
1532         (WebCore::AutoTableLayout::layout):
1533         * rendering/RenderBlock.cpp:
1534         (WebCore::RenderBlock::textIndentOffset):
1535         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1536         * rendering/RenderBox.cpp:
1537         (WebCore::RenderBox::computeLogicalWidthInRegion):
1538         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1539         (WebCore::RenderBox::computeInlineDirectionMargins):
1540         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1541         (WebCore::RenderBox::computeBlockDirectionMargins):
1542         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1543         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1544         * rendering/RenderBoxModelObject.cpp:
1545         (WebCore::RenderBoxModelObject::paddingTop):
1546         (WebCore::RenderBoxModelObject::paddingBottom):
1547         (WebCore::RenderBoxModelObject::paddingLeft):
1548         (WebCore::RenderBoxModelObject::paddingRight):
1549         (WebCore::RenderBoxModelObject::paddingBefore):
1550         (WebCore::RenderBoxModelObject::paddingAfter):
1551         (WebCore::RenderBoxModelObject::paddingStart):
1552         (WebCore::RenderBoxModelObject::paddingEnd):
1553         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1554         * rendering/RenderFlexibleBox.cpp:
1555         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
1556         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1557         * rendering/RenderInline.cpp:
1558         (WebCore::computeMargin):
1559         * rendering/RenderMenuList.cpp:
1560         (WebCore::RenderMenuList::updateOptionsWidth):
1561         * rendering/RenderReplaced.cpp:
1562         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1563         * rendering/RenderScrollbarPart.cpp:
1564         (WebCore::calcScrollbarThicknessUsing):
1565         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1566         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1567         * rendering/RenderTable.cpp:
1568         (WebCore::RenderTable::computeLogicalWidth):
1569         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1570         * rendering/RenderTableSection.cpp:
1571         (WebCore::RenderTableSection::calcRowLogicalHeight):
1572         * rendering/RenderText.h:
1573         (WebCore::RenderText::marginLeft):
1574         (WebCore::RenderText::marginRight):
1575         * rendering/style/RenderStyle.h:
1576
1577 2012-03-26  Shinya Kawanaka  <shinyak@chromium.org>
1578
1579         Triggers assertion if dragging from outside of <meter> in a shadow tree to inside of it.
1580         https://bugs.webkit.org/show_bug.cgi?id=82177
1581
1582         Reviewed by Dimitri Glazkov.
1583
1584         VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries has moved the start position or
1585         the end position to the invalid position, i.e. position after (before) the non-existing node.
1586
1587         This patch fixes the problem, and adds assertion that the selection does not cross shadow boundaries.
1588
1589         Test: fast/dom/shadow/drag-to-meter-in-shadow-crash.html
1590
1591         * editing/VisibleSelection.cpp:
1592         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
1593
1594 2012-03-26  Scott Byer  <scottbyer@chromium.org>
1595
1596         Enable layout testing of the scroll animator.
1597         https://bugs.webkit.org/show_bug.cgi?id=81858
1598         Add a call to the InternalSettings that layout tests can use to
1599         turn on scroll animation. Enable animation updates for the
1600         Chromium platform DRT when scroll animation has been turned on in
1601         a test. This should be a no-op for all current layout tests.
1602
1603         Reviewed by James Robinson.
1604
1605         No new tests. Layout test results should be unchanged.
1606
1607         * testing/InternalSettings.cpp:
1608         (WebCore::InternalSettings::setEnableScrollAnimator):
1609         (WebCore):
1610         (WebCore::InternalSettings::scrollAnimatorEnabled):
1611         * testing/InternalSettings.h:
1612         (InternalSettings):
1613         * testing/InternalSettings.idl:
1614
1615 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1616
1617         Fix minor spell error in DocumentLoader.h
1618         https://bugs.webkit.org/show_bug.cgi?id=82141
1619
1620         Reviewed by Nate Chapin.
1621
1622         Just fix spell error, no new tests.
1623
1624         * loader/DocumentLoader.h:
1625         (WebCore::DocumentLoader::setClientRedirectSourceForHistory):
1626
1627 2012-03-26  Brian Salomon  <bsalomon@google.com>
1628
1629         [Skia] Remove use of deprecated Skia constant and struct field names
1630         https://bugs.webkit.org/show_bug.cgi?id=81034
1631
1632         Reviewed by James Robinson.
1633
1634         No behavior change, so no tests. The modified code is executed by many existing tests.
1635
1636         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1637         (WebCore::createAcceleratedCanvas):
1638         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1639         (WebCore::CCRenderSurfaceFilters::apply):
1640         * platform/graphics/skia/ImageBufferSkia.cpp:
1641         (WebCore::createAcceleratedCanvas):
1642
1643 2012-03-26  Nat Duca  <nduca@chromium.org>
1644
1645         [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
1646         https://bugs.webkit.org/show_bug.cgi?id=82265
1647
1648         In threaded compositing mode, the WebWidget is self-scheduled,
1649         receiving damage and processing it without forwarding that damage
1650         up to the embedding WebWidgetClient. In Chromium's case, the
1651         client uses the presence of damage to perform input flow
1652         control. This patch exposes the need for input flow control to the
1653         embedder, while keeping the actual logic about what exactly
1654         warrants input flow control inside the implementation.
1655
1656         Reviewed by James Robinson.
1657
1658         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1659         (WebCore::CCLayerTreeHost::commitComplete):
1660         (WebCore::CCLayerTreeHost::commitRequested):
1661         (WebCore):
1662         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1663         (CCLayerTreeHostClient):
1664         (CCLayerTreeHost):
1665         * platform/graphics/chromium/cc/CCProxy.h:
1666         (CCProxy):
1667         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1668         (WebCore::CCSingleThreadProxy::commitRequested):
1669         (WebCore):
1670         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1671         (CCSingleThreadProxy):
1672         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1673         (WebCore::CCThreadProxy::commitRequested):
1674         (WebCore):
1675         * platform/graphics/chromium/cc/CCThreadProxy.h:
1676         (CCThreadProxy):
1677
1678 2012-03-26  Adam Barth  <abarth@webkit.org>
1679
1680         When <img crossorigin> fails the CORS check, we should fire the error event
1681         https://bugs.webkit.org/show_bug.cgi?id=81998
1682
1683         Reviewed by Nate Chapin.
1684
1685         The spec says we're supposed to fire the error event when the CORS
1686         check fails, but we haven't been.  This patch is larger than it might
1687         otherwise be because we're firing the event asynchronously, but that
1688         seems like the right thing to do.
1689
1690         Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html
1691
1692         * dom/Document.cpp:
1693         (WebCore::Document::implicitClose):
1694         * loader/ImageLoader.cpp:
1695         (WebCore::errorEventSender):
1696         (WebCore):
1697         (WebCore::ImageLoader::ImageLoader):
1698         (WebCore::ImageLoader::~ImageLoader):
1699         (WebCore::ImageLoader::setImage):
1700         (WebCore::ImageLoader::updateFromElement):
1701         (WebCore::ImageLoader::notifyFinished):
1702         (WebCore::ImageLoader::dispatchPendingEvent):
1703         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1704         (WebCore::ImageLoader::dispatchPendingErrorEvents):
1705         * loader/ImageLoader.h:
1706         (ImageLoader):
1707
1708 2012-03-26  Stephen White  <senorblanco@chromium.org>
1709
1710         Make filters and the threaded compositor play well together.
1711         https://bugs.webkit.org/show_bug.cgi?id=78139
1712         
1713         Use a dedicated GraphicsContext3D instance for all filters calls in
1714         the threaded case.  Clone all FilterOperations for thread safety
1715         in the threaded case.
1716
1717         Reviewed by James Robinson.
1718         
1719         Covered by tests in LayoutTests/css3/filters.
1720
1721         * platform/graphics/chromium/LayerChromium.cpp:
1722         (WebCore::LayerChromium::setFilters):
1723         Set a global flag if we've seen content with filters, so we know
1724         we need to create the filter context.
1725         (WebCore::LayerChromium::pushPropertiesTo):
1726         Clone all filter operations if we're in the threaded case.
1727         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1728         (WebCore):
1729         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1730         (WebCore::CCLayerTreeHost::needsFilterContext):
1731         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
1732         (CCLayerTreeHost):
1733         Add flag and accessors for needsFilterContext.
1734         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1735         (WebCore::CCRenderSurface::applyFilters):
1736         Pick up the appropriate context from SharedGraphicsContext3D,
1737         depending if we're in the threaded case or not.
1738         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1739         (WebCore::CCThreadProxy::recreateContext):
1740         For the threaded compositor re-create the filter context
1741         alongside the main compositor context on lost context, if requested.
1742         (WebCore::CCThreadProxy::beginFrame):
1743         Create the filter context in beginFrame, if it was resquested and is
1744         NULL.  This handles the first-use case.
1745         * platform/graphics/filters/CustomFilterOperation.h:
1746         (WebCore::CustomFilterOperation::clone):
1747         Assert if trying to clone the custom filter operation (it has
1748         non-threadsafe members).
1749         * platform/graphics/filters/FilterOperation.h:
1750         (WebCore::DefaultFilterOperation::clone):
1751         (WebCore::PassthroughFilterOperation::clone):
1752         (WebCore::ReferenceFilterOperation::clone):
1753         (WebCore::BasicColorMatrixFilterOperation::clone):
1754         (WebCore::BasicComponentTransferFilterOperation::clone):
1755         (WebCore::GammaFilterOperation::clone):
1756         (WebCore::BlurFilterOperation::clone):
1757         (WebCore::DropShadowFilterOperation::clone):
1758         Add clone methods for all FilterOperations.
1759         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1760         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
1761         (WebCore::SharedGraphicsContext3DImpl::getContext):
1762         (WebCore::SharedGraphicsContext3DImpl::createContext):
1763         (WebCore::SharedGraphicsContext3D::get):
1764         (WebCore::getOrCreateContextForImplThread):
1765         (WebCore::SharedGraphicsContext3D::getForImplThread):
1766         (WebCore::SharedGraphicsContext3D::haveForImplThread):
1767         (WebCore::SharedGraphicsContext3D::createForImplThread):
1768         Split out context creation, lost context recovery, and retrieval
1769         into separate functions, so the impl thread can use only the parts
1770         it wants on the threads it wants (create and have on main, get on impl).
1771         Add asserts to ensure that's how they're called.
1772         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1773         (SharedGraphicsContext3D):
1774         Reuse the SharedGraphicsContext infrastructure to create a new
1775         context singleton for filter use in the threaded compositor.
1776
1777 2012-03-26  Adam Barth  <abarth@webkit.org>
1778
1779         FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
1780         https://bugs.webkit.org/show_bug.cgi?id=81020
1781
1782         Reviewed by Eric Seidel.
1783
1784         The vast majority of security checks in the browser should use a
1785         ScriptExecutionContext (aka a Document) to designate "who" is
1786         attempting to perform a given action.  Unfortunately,
1787         shouldAllowNavigation was using a Frame to designate "who" is
1788         attempting the navigation.
1789
1790         In cases when the executing script is "inactive" (i.e., belongs to a
1791         document that is not currently displayed in a Frame), using the Frame
1792         can cause us to grant the script the privileges of the document that's
1793         currently displayed in the Frame rather than the one that contains the
1794         script.
1795
1796         This patch moves shouldAllowNavigation from FrameLoader to Document
1797         (and renames it to canNavigate), effectively change the context object
1798         from a Frame to a Document.
1799
1800         Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html
1801
1802         * bindings/generic/BindingSecurity.h:
1803         (BindingSecurity):
1804         (WebCore):
1805         * bindings/v8/V8Utilities.cpp:
1806         (WebCore):
1807         * bindings/v8/V8Utilities.h:
1808         (WebCore):
1809             - Deletes unused code.
1810         * dom/Document.cpp:
1811         (WebCore::canAccessAncestor):
1812         (WebCore):
1813         (WebCore::Document::canNavigate):
1814             - canNavigate is copied from FrameLoader::shouldAllowNavigation.
1815               I've added a null-check bailout if the document is inactive.
1816         * dom/Document.h:
1817         (Document):
1818         * loader/FormState.cpp:
1819         (WebCore::FormState::FormState):
1820         (WebCore::FormState::create):
1821         * loader/FormState.h:
1822         (WebCore):
1823         (FormState):
1824         (WebCore::FormState::sourceDocument):
1825         * loader/FormSubmission.cpp:
1826         (WebCore::FormSubmission::create):
1827             - Changes the context object from Frame to Document.
1828         * loader/FrameLoader.cpp:
1829         (WebCore::FrameLoader::submitForm):
1830         (WebCore::FrameLoader::loadFrameRequest):
1831         (WebCore):
1832         (WebCore::FrameLoader::findFrameForNavigation):
1833             - FrameLoader::findFrameForNavigation still incorrectly uses Frame
1834               as the context object, but that's a bug for another patch.
1835         (WebCore::createWindow):
1836         * loader/FrameLoader.h:
1837         (FrameLoader):
1838         * loader/NavigationScheduler.cpp:
1839         (WebCore::ScheduledFormSubmission::fire):
1840         * page/DOMWindow.cpp:
1841         (WebCore::DOMWindow::close):
1842         (WebCore::DOMWindow::setLocation):
1843         (WebCore::DOMWindow::open):
1844         * page/History.cpp:
1845         (WebCore::History::go):
1846
1847 2012-03-26  Vangelis Kokkevis  <vangelis@chromium.org>
1848
1849         [chromium] Simplify and fix CCLayerSorter
1850         https://bugs.webkit.org/show_bug.cgi?id=82114
1851
1852         A significant cleanup, simplification and improvement of the CCLayerSorter code.
1853         Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests.
1854         By treating every layer as two triangles, the old overlap code did a lot of redundant work
1855         including testing two of the vertices of the layer and its diagonal twice. The new overlap
1856         tests check:
1857         1. The four corners of each of the two layers against the other layer.
1858         2. The four edges of each layer against the edges of the other layer.
1859         Unlike the old code, the new code has no early-outs in the overlap tests as those where causing
1860         us to miss legitimate overlaps.
1861         A new technique for breaking dependency cycles introduced by intersecting layers is implemented.
1862         Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of
1863         incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum
1864         of graph edge weights (defined as the max depth difference between two layers). Layers that intersect
1865         have their respective graph edge weight set to zero, making them more likely to be picked for breaking
1866         the cycles (it's not a perfect solution but it seems to perform much better than the previous one).
1867
1868         In addition to being overly complex and doing reduntant work, the old code was missing a
1869         perspective divide when computing the coordinates of the layer's corners in the projected plane
1870         which was the source of a lot of mis-sorted results.
1871
1872         In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as:
1873         http://www.keithclark.co.uk/labs/3dcss/demo/
1874         http://2012.beercamp.com
1875         https://developer.mozilla.org/fr/demos/detail/the-box/launch
1876
1877         Tests: CCLayerSorter unit tests.
1878
1879         Reviewed by Kenneth Russell.
1880
1881         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1882         (WebCore):
1883         (WebCore::perpProduct):
1884         (WebCore::edgeEdgeTest):
1885         (WebCore::CCLayerSorter::checkOverlap):
1886         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1887         (WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint):
1888         (WebCore::CCLayerSorter::createGraphNodes):
1889         (WebCore::CCLayerSorter::createGraphEdges):
1890         (WebCore::CCLayerSorter::sort):
1891         * platform/graphics/chromium/cc/CCLayerSorter.h:
1892         (WebCore::CCLayerSorter::CCLayerSorter):
1893         (CCLayerSorter):
1894         (LayerShape):
1895         (WebCore::CCLayerSorter::GraphNode::GraphNode):
1896         (GraphNode):
1897         (WebCore::CCLayerSorter::GraphEdge::GraphEdge):
1898         (GraphEdge):
1899
1900 2012-03-26  Fady Samuel  <fsamuel@chromium.org>
1901
1902         [Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail
1903         https://bugs.webkit.org/show_bug.cgi?id=81954
1904
1905         Reviewed by James Robinson.
1906
1907         A static variable s_inPaintContents is set when painting, and it ensures
1908         that we don't delete GraphicsLayers or create GraphicsLayers while painting.
1909
1910         However, because this variable is static, it does not permit the existence
1911         of multiple WebViews in different stages (one laying out and one painting).
1912
1913         This manifests itself if one attempts to use the --force-compositing-mode
1914         in Chromium and attempts to navigate to a page with a missing or old plugin
1915         or a browser plugin (which uses a WebViewPlugin as a placeholder until it's
1916         done loading).
1917
1918         The solution to simplify debugging is to make this flag per-Page.
1919         We can access Page from RenderLayerBacking which is a GraphicsLayerClient.
1920         We add a new method GraphicsLayerClient::verifyNotPainting with a default
1921         (do nothing) implementation and override it in RenderLayerBacking to
1922         test the flag set in Page.
1923
1924         * page/Page.cpp:
1925         (WebCore::Page::Page):
1926         * page/Page.h:
1927         (Page):
1928         (WebCore::Page::setIsPainting):
1929         (WebCore::Page::isPainting):
1930         * platform/graphics/GraphicsLayer.cpp:
1931         (WebCore::GraphicsLayer::GraphicsLayer):
1932         (WebCore::GraphicsLayer::~GraphicsLayer):
1933         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1934         * platform/graphics/GraphicsLayerClient.h:
1935         (GraphicsLayerClient):
1936         (WebCore::GraphicsLayerClient::verifyNotPainting):
1937         * rendering/RenderLayerBacking.cpp:
1938         (WebCore::RenderLayerBacking::paintContents):
1939         (WebCore):
1940         (WebCore::RenderLayerBacking::verifyNotPainting):
1941         * rendering/RenderLayerBacking.h:
1942         (RenderLayerBacking):
1943
1944 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1945
1946         cssText should use shorthand notations
1947         https://bugs.webkit.org/show_bug.cgi?id=81737
1948
1949         Reviewed by Enrica Casucci.
1950
1951         Use shorthand properties to serialize style properties for cssText.
1952
1953         The overall algorithm is to look for any property that has a shorthand, and then check if
1954         the shorthand value could be obtained (the condition is quite complicated for border properties).
1955         If it could, then append that value to the string builder, and set the corresponding entries in
1956         shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in
1957         shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties
1958         that use the same shorthand property when we cannot use the shorthand.
1959
1960         Test: fast/css/cssText-shorthand.html
1961
1962         * css/StylePropertySet.cpp:
1963         (WebCore::StylePropertySet::asText):
1964
1965 2012-03-26  Bolin Hsu  <bhsu@google.com>
1966
1967         [Chromium] Add Android keycodes
1968         https://bugs.webkit.org/show_bug.cgi?id=81950
1969
1970         Add the missing Android keycodes listed in the bug.
1971
1972         Reviewed by Adam Barth.
1973
1974         * platform/chromium/KeyCodeConversionAndroid.cpp:
1975         (WebCore::windowsKeyCodeForKeyEvent):
1976         * platform/chromium/KeyboardCodes.h:
1977
1978 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1979
1980         Switch ColumnInfo::addForcedBreak to LayoutUnits
1981         https://bugs.webkit.org/show_bug.cgi?id=82210
1982
1983         Reviewed by Eric Seidel.
1984
1985         Forced breaks are added by local offsets, which should be in LayoutUnits.
1986
1987         No new tests. No change in behavior.
1988
1989         * rendering/ColumnInfo.h:
1990         (WebCore::ColumnInfo::addForcedBreak):
1991
1992 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1993
1994         Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
1995         https://bugs.webkit.org/show_bug.cgi?id=82219
1996
1997         Reviewed by Eric Seidel.
1998
1999         No new tests. No change in behavior.
2000
2001         * dom/ContainerNode.cpp:
2002         (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
2003         of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
2004         * dom/Element.cpp:
2005         (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
2006         coordinates, which are always expressed in integers.
2007         * dom/Element.h:
2008         (Element):
2009         * dom/ElementRareData.h:
2010         (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
2011         INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.
2012
2013 2012-03-26  Adam Klein  <adamk@chromium.org>
2014
2015         Update binding test output for V8 after r112163.
2016
2017         * bindings/scripts/test/V8/V8TestInterface.cpp:
2018         (WebCore::V8TestInterface::constructorCallback):
2019         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2020         (WebCore::V8TestNamedConstructorConstructorCallback):
2021         * bindings/scripts/test/V8/V8TestObj.cpp:
2022         (WebCore::V8TestObj::constructorCallback):
2023         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2024         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2025
2026 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2027
2028         Update localSelectionRect to return a LayoutRect
2029         https://bugs.webkit.org/show_bug.cgi?id=82183
2030
2031         Reviewed by Eric Seidel.
2032
2033         localSelectionRect returns a rectangle in the coordinate space of its renderer,
2034         and therefor should remain LayoutUnits until being promoted to absolute
2035         coordinates or painted. Also fixing an incorrect conversion of startPos and
2036         endPos in selectionRectForRepaint.
2037
2038         No new tests. No change in behavior.
2039
2040         * rendering/InlineTextBox.cpp:
2041         (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
2042         for the value being returned from the font engine since these floating point
2043         values should not be pixel snapped.
2044         * rendering/InlineTextBox.h:
2045         (InlineTextBox):
2046         * rendering/RenderReplaced.cpp:
2047         (WebCore::RenderReplaced::localSelectionRect):
2048         * rendering/RenderReplaced.h:
2049         (RenderReplaced):
2050         * rendering/RenderText.cpp:
2051         (WebCore::localQuadForTextBox):
2052         (WebCore::RenderText::absoluteRectsForRange):
2053         (WebCore::RenderText::absoluteQuadsForRange):
2054         (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
2055         start/endPos to LayoutUnits. These values represent a range of selected characters,
2056         not layout values!
2057         * rendering/svg/RenderSVGInlineText.cpp:
2058         (WebCore::RenderSVGInlineText::localCaretRect):
2059         * rendering/svg/SVGInlineTextBox.cpp:
2060         (WebCore::SVGInlineTextBox::localSelectionRect):
2061         * rendering/svg/SVGInlineTextBox.h:
2062         (SVGInlineTextBox):
2063
2064 2012-03-26  Justin Novosad  <junov@chromium.org>
2065
2066         [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
2067         https://bugs.webkit.org/show_bug.cgi?id=82243
2068
2069         Reviewed by James Robinson.
2070
2071         Adding null pointer check to prevent crash and texture object
2072         validity check to prevent potential graphics glitch
2073
2074         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2075         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
2076
2077 2012-03-26  Adam Klein  <adamk@chromium.org>
2078
2079         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
2080         https://bugs.webkit.org/show_bug.cgi?id=82238
2081
2082         Reviewed by Adam Barth.
2083
2084         The setJSWrapper* methods previously featured a comment that asked
2085         callers to ref the objects before passing them in. This change makes
2086         that contract explicit (and allows the removal of the comment).
2087
2088         In addition, for ConstructorCallbacks, this change slightly reduces
2089         refcount churn by passing on the initial ref via RefPtr::release().
2090
2091         No new tests, no change in behavior.
2092
2093         * bindings/scripts/CodeGeneratorV8.pm:
2094         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
2095         (GenerateNamedConstructorCallback): ditto.
2096         * bindings/v8/V8DOMWindowShell.cpp:
2097         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
2098         * bindings/v8/V8DOMWrapper.cpp:
2099         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
2100         * bindings/v8/V8DOMWrapper.h:
2101         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
2102         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
2103         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
2104         * bindings/v8/V8Proxy.h:
2105         (WebCore::toV8): Remove explicit ref.
2106         * bindings/v8/WorkerContextExecutionProxy.cpp:
2107         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
2108         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2109         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
2110         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2111         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
2112         * bindings/v8/custom/V8WebSocketCustom.cpp:
2113         (WebCore::V8WebSocket::constructorCallback): ditto.
2114         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2115         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
2116
2117 2012-03-26  Alexey Proskuryakov  <ap@apple.com>
2118
2119         Remove obsolete FormDataStreamMac code
2120         https://bugs.webkit.org/show_bug.cgi?id=82244
2121
2122         Reviewed by Brady Eidson.
2123
2124         * platform/network/ResourceHandle.h:
2125         Removed ResourceHandle::didSendBodyDataDelegateExists().
2126
2127         * platform/network/mac/FormDataStreamMac.h:
2128         * platform/network/mac/FormDataStreamMac.mm:
2129         Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
2130         added support for it.
2131
2132         * platform/network/mac/ResourceHandleMac.mm:
2133         (WebCore::ResourceHandle::start):
2134         (WebCore::ResourceHandle::cancel):
2135         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2136         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
2137         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
2138         We no longer need to associate streams with ResourceHandles!
2139
2140 2012-03-26  Adam Klein  <adamk@chromium.org>
2141
2142         V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
2143         https://bugs.webkit.org/show_bug.cgi?id=82222
2144
2145         Reviewed by Eric Seidel.
2146
2147         Instead of holding onto ScriptExecutionContext, cache the boolean value we
2148         care about (context->isDocument()). This avoids problems if the
2149         context goes away as a result of the script we just ran.
2150
2151         Test: fast/frames/subframe-load-js-url-crash.html
2152
2153         * bindings/v8/V8RecursionScope.cpp:
2154         (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
2155         bool instead of calling into the context.
2156         * bindings/v8/V8RecursionScope.h:
2157         (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
2158         the constructor and cache the result.
2159         (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
2160         anything to didLeaveScriptContext since it's now a member.
2161         (V8RecursionScope): Make didLeaveScriptContext a member function and
2162         remove its argument. Add member bool to hold the value of isDocument.
2163
2164 2012-03-26  Dana Jansens  <danakj@chromium.org>
2165
2166         [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
2167         https://bugs.webkit.org/show_bug.cgi?id=82239
2168
2169         Reviewed by Adrienne Walker.
2170
2171         The assert is incorrect and should check the animation state on
2172         the surface, not the owning layer.
2173
2174         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2175         (WebCore::CCLayerTreeHost::updateCompositorResources):
2176
2177 2012-03-26  Levi Weintraub  <leviw@chromium.org>
2178
2179         Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
2180         https://bugs.webkit.org/show_bug.cgi?id=82179
2181
2182         Reviewed by Julien Chaffraix.
2183
2184         Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
2185         adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.
2186
2187         No new tests. No change in behavior.
2188
2189         * rendering/RenderFieldset.cpp:
2190         (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
2191         the actual coordinates we paint.
2192         (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
2193         sub-pixel build.
2194         * rendering/RenderMenuList.cpp:
2195         (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
2196         (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
2197         (WebCore::RenderMenuList::clientPaddingRight): Ditto.
2198
2199 2012-03-26  Dan Bernstein  <mitz@apple.com>
2200
2201         Tried to fix an unused parameter warning after r112154.
2202
2203         * rendering/RenderFlexibleBox.cpp:
2204         (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
2205         layoutFlexItems.
2206         (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
2207         * rendering/RenderFlexibleBox.h:
2208
2209 2012-03-26  Rob Arnold  <robarnold@fb.com>
2210
2211         SyntheticStyleCalc on an element should not force recalculation on its children
2212         https://bugs.webkit.org/show_bug.cgi?id=79389
2213
2214         Reviewed by Simon Fraser.
2215
2216         No new tests. Existing tests cover correctness, not sure how to test for performance.
2217
2218         * dom/Element.cpp:
2219         (WebCore::Element::recalcStyle):
2220
2221 2012-03-26  Tony Chang  <tony@chromium.org>
2222
2223         apply cross axis constraints before aligning children in flexbox
2224         https://bugs.webkit.org/show_bug.cgi?id=82240
2225
2226         Reviewed by Ojan Vafai.
2227
2228         We weren't applying max-height constraints before aligning children.
2229         This would cause center, end, stretch alignment to be wrong if we hit
2230         a max-height on a flexbox.
2231
2232         This patch also moves the repositioning logic to happen after
2233         computeLogicalHeight, which will be useful for flex-line-pack.
2234
2235         New test case in css3/flexbox/flex-align.html
2236
2237         * rendering/RenderFlexibleBox.cpp:
2238         (WebCore::RenderFlexibleBox::layoutBlock):
2239         (WebCore::RenderFlexibleBox::layoutFlexItems):
2240         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2241         * rendering/RenderFlexibleBox.h:
2242
2243 2012-03-26  Anders Carlsson  <andersca@apple.com>
2244
2245         Find in page overlay and bouncy are not always positioned correctly
2246         https://bugs.webkit.org/show_bug.cgi?id=82247
2247         <rdar://problem/10866139>
2248
2249         Reviewed by Sam Weinig.
2250
2251         In WebCore, a lot of code depends on scroll position updates to happen synchronously, so
2252         update the frame view scroll position before asking the scrolling thread to scroll.
2253
2254         * page/scrolling/ScrollingCoordinator.cpp:
2255         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
2256
2257 2012-03-26  Nate Chapin  <japhet@chromium.org>
2258
2259         Simplify setting loading state in DocumentLoader
2260         https://bugs.webkit.org/show_bug.cgi?id=82099
2261
2262         Reviewed by Adam Barth.
2263
2264         The logic for deciding what to return for DocumentLoader::isLoading()
2265         is crazy. It's indirectly based on the ResourceLoaders that have
2266         registered themselves with the DocumentLoader, but we can make that
2267         relationship more direct.
2268
2269         * loader/DocumentLoader.cpp:
2270         (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually
2271             updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done.
2272         (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call
2273             updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to
2274             be private, whereas updateLoading() was public).
2275         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2276         * loader/DocumentLoader.h:
2277         (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence
2278             of non-multipart ResourceLoaders directly.
2279         * loader/FrameLoader.cpp:
2280         (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(),
2281             rather than indirectly the other way around.
2282         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be
2283             absolutely identical to the remaining !pdl->isLoading().
2284         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
2285
2286 2012-03-26  James Robinson  <jamesr@chromium.org>
2287
2288         Scrollable plugins not registered properly in ScrollingCoordinator
2289         https://bugs.webkit.org/show_bug.cgi?id=82163
2290
2291         Reviewed by Anders Carlsson.
2292
2293         Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
2294
2295         * page/scrolling/ScrollingCoordinator.cpp:
2296         (WebCore::computeNonFastScrollableRegion):
2297         (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
2298         (WebCore):
2299         * page/scrolling/ScrollingCoordinator.h:
2300         (ScrollingCoordinator):
2301         * plugins/PluginViewBase.h:
2302         (WebCore::PluginViewBase::scrollable):
2303         (PluginViewBase):
2304
2305 2012-03-26  Joone Hur  <joone.hur@collabora.co.uk>
2306
2307         [GTK] Build fix for Accelerated Compositing with Clutter
2308         https://bugs.webkit.org/show_bug.cgi?id=81785
2309
2310         Reviewed by Martin Robinson.
2311
2312         AcceleratedCompositingContext was introduced to isolate different accelerated 
2313         compositing implementations(r104194), but the Clutter implementation doesn't 
2314         build with it. This includes an initial implementation of GraphicsContext3D 
2315         and fixes the build error.
2316
2317         * GNUmakefile.list.am:
2318         * platform/graphics/clutter/DrawingBufferClutter.cpp: Added.
2319         (WebCore):
2320         (WebCore::DrawingBuffer::DrawingBuffer):
2321         (WebCore::DrawingBuffer::~DrawingBuffer):
2322         (WebCore::DrawingBuffer::platformColorBuffer):
2323         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
2324         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added.
2325         (WebCore):
2326         (WebCore::GraphicsContext3D::create):
2327         (WebCore::GraphicsContext3D::GraphicsContext3D):
2328         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2329         (WebCore::GraphicsContext3D::getImageData):
2330         (WebCore::GraphicsContext3D::paintToCanvas):
2331         (WebCore::GraphicsContext3D::setContextLostCallback):
2332         (WebCore::GraphicsContext3D::setErrorMessageCallback):
2333         (WebCore::GraphicsContext3D::makeContextCurrent):
2334         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2335         (WebCore::GraphicsContext3D::isGLES2Compliant):
2336         (WebCore::GraphicsContext3D::platformLayer):
2337         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added.
2338         (WebCore):
2339         (WebCore::GraphicsContext3DPrivate::create):
2340         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2341         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2342         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
2343         (WebCore::GraphicsContext3DPrivate::platformContext):
2344         (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor):
2345         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added.
2346         (WebCore):
2347         (GraphicsContext3DPrivate):
2348         (WebCore::GraphicsContext3DPrivate::platformLayer):
2349
2350 2012-03-26  Peter Rybin  <prybin@chromium.org>
2351
2352         Web Inspector: Expose InspectorTypeBuilder.h to other components
2353         https://bugs.webkit.org/show_bug.cgi?id=82226
2354
2355         Reviewed by Vsevolod Vlasov.
2356
2357         This is a provisional commit that simplifies passing ealy warning system
2358         for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558
2359
2360         * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI.
2361
2362 2012-03-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
2363
2364         An <area> element remains focusable even though its associated <img> is not rendered.
2365         https://bugs.webkit.org/show_bug.cgi?id=71788
2366
2367         Reviewed by Andy Estes.
2368
2369         HTMLAreaElement::isFocusable() needs to consider the display and
2370         visibility state.
2371
2372         Test: fast/events/tab-test-not-visible-imagemap.html
2373
2374         * html/HTMLAreaElement.cpp:
2375         (WebCore::HTMLAreaElement::imageElement):
2376         (WebCore::HTMLAreaElement::isFocusable):
2377         * html/HTMLAreaElement.h: Make imageElement() const.
2378         (HTMLAreaElement):
2379
2380 2012-03-26  Anton Muhin  <antonm@chromium.org>
2381
2382         Fix a typo in IDL
2383         https://bugs.webkit.org/show_bug.cgi?id=82215
2384
2385         Reviewed by Adam Barth.
2386
2387         No new tests, just a typo fix.
2388
2389         * notifications/WorkerContextNotifications.idl:
2390
2391 2012-03-26  W. James MacLean  <wjmaclean@chromium.org>
2392
2393         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
2394         https://bugs.webkit.org/show_bug.cgi?id=82133
2395
2396         Reviewed by James Robinson.
2397
2398         Covered by existing unit tests.
2399
2400         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2401         (WebCore::CCLayerTreeHostImpl::scrollBegin):
2402
2403 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
2404
2405         CSS3 calc: mixed percent/absolute for box-reflect
2406         https://bugs.webkit.org/show_bug.cgi?id=82161
2407
2408         Reviewed by Ojan Vafai.
2409
2410         Tests: css3/calc/box-reflect-expected.html
2411                css3/calc/box-reflect.html
2412
2413         * css/CSSStyleSelector.cpp:
2414         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2415
2416 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
2417
2418         CSS3 calc: mixed percent/absolute support for vertical-align
2419         https://bugs.webkit.org/show_bug.cgi?id=82152
2420
2421         Reviewed by Ojan Vafai.
2422
2423         Tests: css3/calc/vertical-align-expected.html
2424                css3/calc/vertical-align.html
2425
2426         * css/CSSStyleApplyProperty.cpp:
2427         (WebCore::ApplyPropertyVerticalAlign::applyValue):
2428
2429 2012-03-26  Filip Spacek  <fspacek@rim.com>
2430
2431         [BlackBerry] Accelerated compositing updates
2432         https://bugs.webkit.org/show_bug.cgi?id=82058
2433
2434         Reviewed by Rob Buis.
2435
2436         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
2437         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
2438         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
2439         (WebCore::CanvasLayerWebKitThread::setDevice):
2440         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
2441         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
2442         (WebCore::CanvasLayerWebKitThread::create):
2443         (CanvasLayerWebKitThread):
2444         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
2445         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
2446         (WebCore::InstrumentedPlatformCanvas::save):
2447         (WebCore::InstrumentedPlatformCanvas::saveLayer):
2448         (WebCore::InstrumentedPlatformCanvas::restore):
2449         (WebCore::InstrumentedPlatformCanvas::translate):
2450         (WebCore::InstrumentedPlatformCanvas::scale):
2451         (WebCore::InstrumentedPlatformCanvas::rotate):
2452         (WebCore::InstrumentedPlatformCanvas::skew):
2453         (WebCore::InstrumentedPlatformCanvas::concat):
2454         (WebCore::InstrumentedPlatformCanvas::setMatrix):
2455         (WebCore::InstrumentedPlatformCanvas::clipRect):
2456         (WebCore::InstrumentedPlatformCanvas::clipPath):
2457         (WebCore::InstrumentedPlatformCanvas::clipRegion):
2458         (WebCore::InstrumentedPlatformCanvas::clear):
2459         (WebCore::InstrumentedPlatformCanvas::drawPaint):
2460         (WebCore::InstrumentedPlatformCanvas::drawPoints):
2461         (WebCore::InstrumentedPlatformCanvas::drawRect):
2462         (WebCore::InstrumentedPlatformCanvas::drawPath):
2463         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
2464         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
2465         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
2466         (WebCore::InstrumentedPlatformCanvas::drawSprite):
2467         (WebCore::InstrumentedPlatformCanvas::drawText):
2468         (WebCore::InstrumentedPlatformCanvas::drawPosText):
2469         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
2470         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
2471         (WebCore::InstrumentedPlatformCanvas::drawPicture):
2472         (WebCore::InstrumentedPlatformCanvas::drawVertices):
2473         (WebCore::InstrumentedPlatformCanvas::drawData):
2474         * platform/graphics/blackberry/LayerData.h:
2475         (WebCore::LayerData::LayerData):
2476         (WebCore::LayerData::needsTexture):
2477         (LayerData):
2478         * platform/graphics/blackberry/LayerTiler.cpp:
2479         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2480         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2481         (WebCore::LayerWebKitThread::paintContents):
2482         (WebCore::LayerWebKitThread::setDrawable):
2483         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2484         (WebCore::loadBufferingImageData):
2485         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
2486         (WebCore):
2487         (ImageBufferData):
2488
2489 2012-03-26  Stephen Chenney  <schenney@chromium.org>
2490
2491         Failure to invalidate text position attributes when DOM changes
2492         https://bugs.webkit.org/show_bug.cgi?id=81464
2493
2494         Reviewed by Nikolas Zimmermann.
2495
2496         The text positioning elements data structure in RenderSVGText must be
2497         updated when either the children of the corresponding element are
2498         modified, or the length of the text inside the elements changes.
2499         Previously, the call to clear the text positioning elements (to force
2500         recomputation) was guarded by a flag. If code tried to invalidate when
2501         the flag was not set, then something set the flag, the elements would
2502         be invalid at use time.
2503
2504         This patch modifies the method that invalidates the positining
2505         attributes so that the action always happens. It also renames the
2506         method to more accurately reflect its function.
2507
2508         Test: svg/custom/delete-modified-text-in-defs-crash.svg
2509
2510         * rendering/svg/RenderSVGInlineText.cpp:
2511         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
2512         * rendering/svg/RenderSVGText.cpp:
2513         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
2514         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
2515         * rendering/svg/RenderSVGText.h:
2516         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
2517         * svg/SVGAElement.cpp:
2518         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
2519         * svg/SVGTextContentElement.cpp:
2520         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
2521
2522 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
2523
2524         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
2525         https://bugs.webkit.org/show_bug.cgi?id=81802
2526
2527         Reviewed by Dan Bernstein.
2528
2529         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
2530
2531         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
2532
2533         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
2534         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
2535
2536         * rendering/RenderTextControlSingleLine.cpp:
2537         (WebCore::RenderTextControlSingleLine::layout):
2538         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
2539         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
2540
2541 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
2542
2543         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
2544         https://bugs.webkit.org/show_bug.cgi?id=80531
2545
2546         Reviewed by Ojan Vafai.
2547
2548         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
2549
2550         The existing code would happily query layout information before calling layout (FTW!).
2551         The solution is to properly layout our object, then modify some dimensions as needed while
2552         marking ourself as needing layout and then layouting again.
2553
2554         * rendering/RenderTextControlSingleLine.cpp:
2555         (WebCore::RenderTextControlSingleLine::layout):
2556         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
2557         - layoutBlock handles automatically logical height changes.
2558         - we were not modifying the logical width between layouts so we don't need to force a
2559         child relayout in this case.
2560
2561 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
2562
2563         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
2564         https://bugs.webkit.org/show_bug.cgi?id=79873
2565
2566         Reviewed by Rob Buis.
2567
2568         Initial upstream, no new tests.
2569
2570         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
2571         (WebCore):
2572         (WebCore::LayerCompositingThread::create):
2573         (WebCore::LayerCompositingThread::LayerCompositingThread):
2574         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2575         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
2576         (WebCore::LayerCompositingThread::setLayerRenderer):
2577         (WebCore::LayerCompositingThread::deleteTextures):
2578         (WebCore::LayerCompositingThread::setDrawTransform):
2579         (WebCore::getTransformedRect):
2580         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
2581         (WebCore::LayerCompositingThread::drawTextures):
2582         (WebCore::LayerCompositingThread::drawSurface):
2583         (WebCore::LayerCompositingThread::drawMissingTextures):
2584         (WebCore::LayerCompositingThread::releaseTextureResources):
2585         (WebCore::LayerCompositingThread::setPluginView):
2586         (WebCore::LayerCompositingThread::setMediaPlayer):
2587         (WebCore::LayerCompositingThread::clearAnimations):
2588         (WebCore::LayerCompositingThread::removeSublayer):
2589         (WebCore::LayerCompositingThread::indexOfSublayer):
2590         (WebCore::LayerCompositingThread::rootLayer):
2591         (WebCore::LayerCompositingThread::removeFromSuperlayer):
2592         (WebCore::LayerCompositingThread::setSublayers):
2593         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2594         (WebCore::LayerCompositingThread::setVisible):
2595         (WebCore::LayerCompositingThread::setNeedsCommit):
2596         (WebCore::LayerCompositingThread::scheduleCommit):
2597         (WebCore::LayerCompositingThread::updateAnimations):
2598         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
2599         (WebCore::LayerCompositingThread::createLayerRendererSurface):
2600         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
2601         (Graphics):
2602         (WebCore):
2603         (LayerCompositingThread):
2604         (WebCore::LayerCompositingThread::bindContentsTexture):
2605         (WebCore::LayerCompositingThread::getSublayers):
2606         (WebCore::LayerCompositingThread::setSuperlayer):
2607         (WebCore::LayerCompositingThread::superlayer):
2608         (WebCore::LayerCompositingThread::drawTransform):
2609         (WebCore::LayerCompositingThread::setDrawOpacity):
2610         (WebCore::LayerCompositingThread::drawOpacity):
2611         (WebCore::LayerCompositingThread::layerRendererSurface):
2612         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
2613         (WebCore::LayerCompositingThread::setMaskLayer):
2614         (WebCore::LayerCompositingThread::maskLayer):
2615         (WebCore::LayerCompositingThread::setReplicaLayer):
2616         (WebCore::LayerCompositingThread::replicaLayer):
2617         (WebCore::LayerCompositingThread::getDrawRect):
2618         (WebCore::LayerCompositingThread::getTransformedBounds):
2619         (WebCore::LayerCompositingThread::hasMissingTextures):
2620         (WebCore::LayerCompositingThread::isDirty):
2621         (WebCore::LayerCompositingThread::isVisible):
2622         (WebCore::LayerCompositingThread::setOpacity):
2623         (WebCore::LayerCompositingThread::setTransform):
2624         (WebCore::LayerCompositingThread::hasRunningAnimations):
2625         (WebCore::LayerCompositingThread::numSublayers):
2626
2627 2012-03-26  Kent Tamura  <tkent@chromium.org>
2628
2629         Add a notification function for detaching to TextFieldDecorator
2630         https://bugs.webkit.org/show_bug.cgi?id=82142
2631
2632         Reviewed by Dimitri Glazkov.
2633
2634         Add willDetach() functio to TextFieldDecorator. This will be
2635         needed if a decorator opens a popup UI on handleClick(), and the
2636         popup UI should be closed when the attaching text field is
2637         detached.
2638
2639         No new tests because of no behavior changes in any platforms.
2640
2641         * html/shadow/TextFieldDecorationElement.cpp:
2642         (WebCore::TextFieldDecorationElement::hostInput):
2643         Added. A utilify function to get an HTMLInputElement*.
2644         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
2645         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
2646         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
2647         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
2648         * html/shadow/TextFieldDecorationElement.h:
2649         (TextFieldDecorator):
2650         (TextFieldDecorationElement):
2651
2652 2012-03-26  Dan Bernstein  <mitz@apple.com>
2653
2654         Tried to fix the 32-bit build after r112021.
2655
2656         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2657         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2658
2659 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
2660
2661         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
2662         https://bugs.webkit.org/show_bug.cgi?id=82157
2663
2664         Reviewed by Rob Buis.
2665
2666         AsyncFileSystemBlackBerry is responsible for asynchronous operating
2667         on file system for the blackberry porting. It's just skeleton code
2668         containing no implementation yet.
2669
2670         No new tests because of skeleton code.
2671
2672         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
2673         * platform/AsyncFileSystem.cpp:
2674         (WebCore):
2675         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
2676         (WebCore):
2677         (WebCore::AsyncFileSystem::isAvailable):
2678         (WebCore::AsyncFileSystem::isValidType):
2679         (WebCore::AsyncFileSystem::create):
2680         (WebCore::AsyncFileSystem::openFileSystem):
2681         (WebCore::AsyncFileSystem::crackFileSystemURL):
2682         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
2683         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
2684         (WebCore::AsyncFileSystemBlackBerry::toURL):
2685         (WebCore::AsyncFileSystemBlackBerry::move):
2686         (WebCore::AsyncFileSystemBlackBerry::copy):
2687         (WebCore::AsyncFileSystemBlackBerry::remove):
2688         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
2689         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
2690         (WebCore::AsyncFileSystemBlackBerry::createFile):
2691         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
2692         (WebCore::AsyncFileSystemBlackBerry::fileExists):
2693         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
2694         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
2695         (WebCore::AsyncFileSystemBlackBerry::createWriter):
2696         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
2697         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
2698         (WebCore):
2699         (AsyncFileSystemBlackBerry):
2700
2701 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2702
2703         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
2704         https://bugs.webkit.org/show_bug.cgi?id=82204
2705
2706         Reviewed by Rob Buis.
2707
2708         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
2709         by calling BlackBerry::Platform::Encryptor::encryptString() and
2710         BlackBerry::Platform::Encryptor::encryptString() respectively.
2711
2712         No new tests.
2713
2714         * platform/network/blackberry/CredentialBackingStore.cpp:
2715         (WebCore::CredentialBackingStore::encryptedString):
2716         (WebCore::CredentialBackingStore::decryptedString):
2717
2718 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
2719
2720         Web Inspector: 'use strict' exceptions stop in inspector code
2721         https://bugs.webkit.org/show_bug.cgi?id=82199
2722
2723         Reviewed by Yury Semikhatsky.
2724
2725         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
2726         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
2727
2728         * inspector/InjectedScriptSource.js:
2729
2730 2012-03-26  Mihai Balan  <mibalan@adobe.com>
2731
2732         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
2733         https://bugs.webkit.org/show_bug.cgi?id=81901
2734
2735         Reviewed by Antti Koivisto.
2736
2737         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
2738         declaration, leading to buggy behavior where rules that appear later in the document are superseded
2739         by rules that appear earlier in the document (opposite as how things should be). The fix updates
2740         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
2741
2742         Tests: fast/regions/region-style-rule-position-expected.html
2743                fast/regions/region-style-rule-position.html
2744
2745         * css/CSSStyleSelector.cpp:
2746         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2747
2748 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
2749
2750         [Qt] Disable focus ring in the mobile theme.
2751         https://bugs.webkit.org/show_bug.cgi?id=81934
2752
2753         For mobile devices intended to be used only through
2754         touch, the focus rings makes little sense and feels
2755         awkward.
2756
2757         Reviewed by Kenneth Rohde Christiansen.
2758
2759         No new tests. This is merely a cosmetic touch.
2760
2761         * platform/qt/RenderThemeQtMobile.h:
2762         (RenderThemeQtMobile):
2763         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
2764
2765 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
2766
2767         [BlackBerry] Clean up networking code and remove WML support.
2768         https://bugs.webkit.org/show_bug.cgi?id=82170
2769
2770         Reviewed by Rob Buis.
2771
2772         This just removes the WML support of BlackBerry porting, which is already 
2773         removed from WebCore. No new tests needed.
2774
2775         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
2776         (WebCore):
2777         * platform/network/blackberry/DeferredData.cpp:
2778         (WebCore::DeferredData::DeferredData):
2779         (WebCore::DeferredData::processDeferredData):
2780         * platform/network/blackberry/DeferredData.h:
2781         (DeferredData):
2782         (WebCore::DeferredData::hasDeferredData):
2783         * platform/network/blackberry/NetworkJob.cpp:
2784         * platform/network/blackberry/NetworkJob.h:
2785         (NetworkJob):
2786         * platform/network/blackberry/ResourceResponse.h:
2787         (WebCore::ResourceResponse::ResourceResponse):
2788         (ResourceResponse):
2789         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
2790         (WebCore::ResourceResponse::doPlatformCopyData):
2791         (WebCore::ResourceResponse::doPlatformAdopt):
2792
2793 2012-03-26  Philip Rogers  <pdr@google.com>
2794
2795         Add invalid bounding box concept to SVG containers
2796         https://bugs.webkit.org/show_bug.cgi?id=81104
2797
2798         Reviewed by Nikolas Zimmermann.
2799
2800         An empty <g> element needs to use an invalid bounding box because
2801         an empty bounding box isn't the default state. This change
2802         introduces the concept of an invalid object bounding box for
2803         both RenderSVGContainer and RenderSVGRoot. Code that
2804         does not explicitly check that the bounding box is valid
2805         should be unaffected by this change. We use this new invalid
2806         flag in computeContainerBoundingBoxes so that we do not
2807         include invalid bounding boxes.
2808
2809         This change also contains a small fix in
2810         RenderSVGContainer::toRenderSVGContainer which depended on
2811         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
2812         which it now does.
2813
2814         Test: svg/custom/getBBox-empty-container.html
2815
2816         * rendering/svg/RenderSVGContainer.cpp:
2817         (WebCore::RenderSVGContainer::RenderSVGContainer):
2818         (WebCore::RenderSVGContainer::updateCachedBoundaries):
2819         * rendering/svg/RenderSVGContainer.h:
2820         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
2821         (RenderSVGContainer):
2822         (WebCore::toRenderSVGContainer):
2823         * rendering/svg/RenderSVGRoot.cpp:
2824         (WebCore::RenderSVGRoot::RenderSVGRoot):
2825         (WebCore::RenderSVGRoot::updateCachedBoundaries):
2826         * rendering/svg/RenderSVGRoot.h:
2827         (RenderSVGRoot):
2828         * rendering/svg/SVGRenderSupport.cpp:
2829         (WebCore):
2830         (WebCore::updateObjectBoundingBox):
2831         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2832         * rendering/svg/SVGRenderSupport.h:
2833         (SVGRenderSupport):
2834
2835 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
2836
2837         Web Inspector: Speed up the retainers build phase.
2838         https://bugs.webkit.org/show_bug.cgi?id=81763
2839
2840         Replacing the edge iterator in retainers building phase
2841         makes it run 10 times faster (400 ms vs. 4 sec).
2842
2843         Reviewed by Yury Semikhatsky.
2844
2845         * inspector/front-end/HeapSnapshot.js:
2846         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2847
2848 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
2849
2850         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
2851         https://bugs.webkit.org/show_bug.cgi?id=81923
2852
2853         Reviewed by Pavel Feldman.
2854
2855         No new tests, as this is a refactoring.
2856
2857         * inspector/CodeGeneratorInspector.py:
2858         * inspector/InspectorCSSAgent.cpp:
2859         (SelectorProfile):
2860         (WebCore::SelectorProfile::toInspectorObject):
2861         (WebCore::InspectorCSSAgent::clearFrontend):
2862         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2863         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2864         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2865         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2866         (WebCore::InspectorCSSAgent::getStyleSheet):
2867         (WebCore::InspectorCSSAgent::setPropertyText):
2868         (WebCore::InspectorCSSAgent::toggleProperty):
2869         (WebCore::InspectorCSSAgent::setRuleSelector):
2870         (WebCore::InspectorCSSAgent::addRule):
2871         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2872         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
2873         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2874         (WebCore::InspectorCSSAgent::collectStyleSheets):
2875         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
2876         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2877         * inspector/InspectorCSSAgent.h:
2878         (InspectorCSSAgent):
2879         * inspector/InspectorStyleSheet.cpp:
2880         (WebCore::buildSourceRangeObject):
2881         (WebCore::buildMediaObject):
2882         (WebCore::fillMediaListChain):
2883         (WebCore::InspectorStyle::buildObjectForStyle):
2884         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2885         (WebCore::InspectorStyle::styleWithProperties):
2886         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2887         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2888         (WebCore::InspectorStyleSheet::buildObjectForRule):
2889         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2890         * inspector/InspectorStyleSheet.h:
2891         (WebCore::InspectorCSSId::asProtocolValue):
2892         (InspectorStyle):
2893         (InspectorStyleSheet):
2894
2895 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
2896
2897         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
2898         https://bugs.webkit.org/show_bug.cgi?id=82191
2899
2900         Reviewed by Vsevolod Vlasov.
2901
2902         Test: http/tests/inspector/modify-cross-domain-rule.html
2903
2904         * inspector/InspectorStyleSheet.cpp:
2905         (WebCore::asCSSRuleList):
2906         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2907
2908 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2909
2910         Unreviewed. Fix make distcheck.
2911
2912         * GNUmakefile.list.am: Add missing files.
2913
2914 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
2915
2916         [BlackBerry] Cookies mismatch when login to gmail.
2917         https://bugs.webkit.org/show_bug.cgi?id=82165
2918
2919         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
2920         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
2921         for redirection loading.
2922
2923         This issue didn't happen before because we used m_cookieData not the cookie header.
2924         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
2925
2926         Reviewed by George Staikos.
2927
2928         No new tests. It is a refactoring issue.
2929
2930         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2931         (WebCore::ResourceRequest::initializePlatformRequest):
2932
2933 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
2934
2935         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
2936         https://bugs.webkit.org/show_bug.cgi?id=81960
2937
2938         Reviewed by Antti Koivisto.
2939
2940         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
2941         to avoid code duplication.
2942
2943         No new tests : refactoring only, we shouldn't have any behavior difference.
2944
2945         * css/CSSPropertyLonghand.cpp:
2946         (WebCore::backgroundLonghand):
2947         Re-order the array to match the spec default order.
2948         (WebCore::webkitMaskLonghand):
2949         Re-order to match the original order.
2950         (WebCore::webkitTransformOriginLonghand):
2951         A LayoutTest shows that a property was missing.
2952         * css/StylePropertySet.cpp:
2953         (WebCore::StylePropertySet::getPropertyValue):
2954         (WebCore::StylePropertySet::borderSpacingValue):
2955         (WebCore::StylePropertySet::get4Values):
2956         (WebCore::StylePropertySet::getLayeredShorthandValue):
2957         (WebCore::StylePropertySet::getShorthandValue):
2958         (WebCore::StylePropertySet::getCommonValue):
2959         (WebCore::StylePropertySet::asText):
2960         * css/StylePropertySet.h:
2961         (WebCore):
2962         (StylePropertySet):
2963
2964 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2965
2966         [Qt] Assert in GestureTapHighlighter.
2967         https://bugs.webkit.org/show_bug.cgi?id=82187
2968
2969         Reviewed by Kenneth Rohde Christiansen.
2970
2971         Adjust the boundaries of the center-rect before performing the intersection test,
2972         since adjusting the boundary may cause a new intersection.
2973
2974         * page/GestureTapHighlighter.cpp:
2975
2976 2012-03-26  Antti Koivisto  <antti@apple.com>
2977
2978         Split MediaList into internal and CSSOM types
2979         https://bugs.webkit.org/show_bug.cgi?id=82149
2980
2981         Reviewed by Andread Kling.
2982
2983         MediaList is a CSSOM type and should not be used internally.
2984         
2985         - Use new type MediaQuerySet internally to represent a collection of media queries.
2986         - Create MediaList wrapper on-demand for CSSOM purposes only.
2987         
2988         This moves us forward in separating CSSOM from the internal stylesheet implementation.
2989         
2990         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
2991         
2992         * css/CSSGrammar.y:
2993         * css/CSSImportRule.cpp:
2994         (WebCore::CSSImportRule::create):
2995         (WebCore):
2996         (WebCore::CSSImportRule::CSSImportRule):
2997         (WebCore::CSSImportRule::~CSSImportRule):
2998         (WebCore::CSSImportRule::media):
2999         (WebCore::CSSImportRule::cssText):
3000         * css/CSSImportRule.h:
3001         (WebCore):
3002         (CSSImportRule):
3003         (WebCore::CSSImportRule::mediaQueries):
3004         * css/CSSMediaRule.cpp:
3005         (WebCore::CSSMediaRule::CSSMediaRule):
3006         (WebCore::CSSMediaRule::~CSSMediaRule):
3007         (WebCore::CSSMediaRule::cssText):
3008         * css/CSSMediaRule.h:
3009         (WebCore::CSSMediaRule::create):
3010         (WebCore::CSSMediaRule::media):
3011         (WebCore::CSSMediaRule::mediaQueries):
3012         (CSSMediaRule):
3013         * css/CSSParser.cpp:
3014         (WebCore::CSSParser::parseMediaQuery):
3015         (WebCore::CSSParser::createMediaQuerySet):
3016         (WebCore::CSSParser::createImportRule):
3017         (WebCore::CSSParser::createMediaRule):
3018         (WebCore::CSSParser::updateLastMediaLine):
3019         * css/CSSParser.h:
3020         (WebCore):
3021         (CSSParser):
3022         * css/CSSStyleSelector.cpp:
3023         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3024         * css/CSSStyleSheet.cpp:
3025         (WebCore):
3026         (WebCore::CSSStyleSheet::media):
3027         (WebCore::CSSStyleSheet::setMediaQueries):
3028         * css/CSSStyleSheet.h:
3029         (WebCore):
3030         (CSSStyleSheet):
3031         (WebCore::CSSStyleSheet::mediaQueries):
3032         * css/MediaList.cpp:
3033         (WebCore):
3034         (WebCore::MediaQuerySet::MediaQuerySet):
3035         (WebCore::MediaQuerySet::~MediaQuerySet):
3036         (WebCore::parseMediaDescriptor):
3037         (WebCore::MediaQuerySet::parse):
3038         (WebCore::MediaQuerySet::add):
3039         (WebCore::MediaQuerySet::remove):
3040         (WebCore::MediaQuerySet::addMediaQuery):
3041         (WebCore::MediaQuerySet::mediaText):
3042         (WebCore::MediaQuerySet::ensureMediaList):
3043         
3044             - Use OwnPtr<> for MediaQuery ownership.
3045             - Move the appropriate functions to MediaQuerySet.
3046             - Clean up a bit to make this more readable and better aligned to WebKit style.
3047         
3048         (WebCore::MediaList::MediaList):
3049         (WebCore::MediaList::~MediaList):
3050         (WebCore::MediaList::setMediaText):
3051         (WebCore::MediaList::item):
3052         (WebCore::MediaList::deleteMedium):
3053         (WebCore::MediaList::appendMedium):
3054         * css/MediaList.h:
3055         (WebCore):
3056         (WebCore::MediaQuerySet::create):
3057         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
3058         (MediaQuerySet):
3059         (WebCore::MediaQuerySet::queryVector):
3060         (WebCore::MediaQuerySet::lastLine):
3061         (WebCore::MediaQuerySet::setLastLine):
3062         (MediaList):
3063         (WebCore::MediaList::ref):
3064         (WebCore::MediaList::deref):
3065         (WebCore::MediaList::length):
3066         (WebCore::MediaList::mediaText):
3067         (WebCore::MediaList::queries):
3068         * css/MediaQueryEvaluator.cpp:
3069         (WebCore::MediaQueryEvaluator::eval):
3070         * css/MediaQueryEvaluator.h:
3071         (WebCore):
3072         (MediaQueryEvaluator):
3073         * css/MediaQueryList.cpp:
3074         (WebCore::MediaQueryList::create):
3075         (WebCore::MediaQueryList::MediaQueryList):
3076         * css/MediaQueryList.h:
3077         (WebCore):
3078         (MediaQueryList):
3079         * css/MediaQueryMatcher.cpp:
3080         (WebCore::MediaQueryMatcher::evaluate):
3081         (WebCore::MediaQueryMatcher::matchMedia):
3082         * css/MediaQueryMatcher.h:
3083         (WebCore):
3084         (MediaQueryMatcher):
3085         * css/StyleMedia.cpp:
3086         (WebCore::StyleMedia::matchMedium):
3087         * css/StyleSheet.cpp:
3088         (WebCore::StyleSheet::~StyleSheet):
3089         
3090             Move the media query ownership to CSSStyleSheet where it belongs.
3091         
3092         (WebCore):
3093         * css/StyleSheet.h:
3094         (WebCore::StyleSheet::media):
3095         (StyleSheet):
3096         * dom/DOMImplementation.cpp:
3097         (WebCore::DOMImplementation::createCSSStyleSheet):
3098         * dom/ProcessingInstruction.cpp:
3099         (WebCore::ProcessingInstruction::setCSSStyleSheet):
3100         * dom/StyleElement.cpp:
3101         (WebCore::StyleElement::createSheet):
3102         * html/HTMLLinkElement.cpp:
3103         (WebCore::HTMLLinkElement::process):
3104         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3105         * html/HTMLMediaElement.cpp:
3106         (WebCore::HTMLMediaElement::selectNextSourceChild):
3107         * html/parser/HTMLPreloadScanner.cpp:
3108         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
3109         * inspector/InspectorStyleSheet.cpp:
3110         (WebCore::buildMediaObject):
3111
3112 2012-03-26  Zeno Albisser  <zeno@webkit.org>
3113
3114         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
3115         https://bugs.webkit.org/show_bug.cgi?id=82178
3116
3117         If TextureMapperShaderManager already has a reference to an instance of the
3118         requested shader program type, this instance should be reused instead of
3119         creating a new one.
3120
3121         Reviewed by Noam Rosenthal.
3122
3123         * platform/graphics/texmap/TextureMapperShaderManager.h:
3124         (WebCore::TextureMapperShaderManager::getShaderProgram):
3125
3126 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
3127
3128         [Chromium] Web Inspector: dedicated worker inspector is empty
3129         https://bugs.webkit.org/show_bug.cgi?id=82181
3130
3131         "beforeunload" event for worker inspector front-end is ingnored if the
3132         window url is "about:blank" as it is just unload of the default content
3133         before the front-end page load.
3134
3135         Reviewed by Pavel Feldman.
3136
3137         * inspector/front-end/WorkerManager.js:
3138         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
3139
3140 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
3141
3142         Web Inspector: split nodes and containment edges into two different arrays
3143         https://bugs.webkit.org/show_bug.cgi?id=81930
3144
3145         Extract heap profile nodes and edges into two separate arrays. This
3146         way we will have a continuous array of the heap graph nodes and can
3147         aviod additional mapping between node index and its position in the
3148         heap snapshot.
3149
3150         Reviewed by Pavel Feldman.
3151
3152         * inspector/front-end/HeapSnapshot.js:
3153         (WebInspector.HeapSnapshot.prototype._init):
3154         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
3155         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
3156         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
3157         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
3158         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
3159         * inspector/front-end/HeapSnapshotProxy.js:
3160         (WebInspector.HeapSnapshotWorker):
3161
3162 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
3163
3164         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
3165         https://bugs.webkit.org/show_bug.cgi?id=81897
3166
3167         Reviewed by Vsevolod Vlasov.
3168
3169         SourceMapParser should only deal with payload parsing.
3170
3171         * inspector/front-end/CompilerScriptMapping.js:
3172         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3173         (WebInspector.CompilerScriptMapping.prototype.addScript):
3174         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3175         (WebInspector.SourceMapPayload):
3176         (WebInspector.SourceMapParser):
3177         (WebInspector.SourceMapParser.prototype.sourceContent):
3178         (WebInspector.SourceMapParser.prototype.findEntry):
3179         (WebInspector.SourceMapParser.prototype.findEntryReversed):
3180         * inspector/front-end/ContentProviders.js:
3181         (WebInspector.CompilerSourceMappingContentProvider):
3182         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
3183
3184 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
3185
3186         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
3187         https://bugs.webkit.org/show_bug.cgi?id=82175
3188
3189         We were using aString.indexOf("Window") but it is not effective from performance point of view.
3190         I'm replaced it with RegExp.
3191
3192         Reviewed by Yury Semikhatsky.
3193
3194         * inspector/front-end/HeapSnapshot.js:
3195         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
3196         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
3197
3198 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
3199
3200         Web Inspector: breakpoints should be disabled while live editing JavaScript.
3201         https://bugs.webkit.org/show_bug.cgi?id=81947
3202
3203         Reviewed by Yury Semikhatsky.
3204
3205         This change disables (removes from the backend) the breakpoints while editing script.
3206         Undoing or committing the change restores the breakpoints. Main logic is implemented within
3207         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
3208         undo/redo wrapper and better detection of the noop opterations.
3209
3210         * inspector/front-end/JavaScriptSourceFrame.js:
3211         (WebInspector.JavaScriptSourceFrame):
3212         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
3213         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
3214         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
3215         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
3216         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
3217         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
3218         * inspector/front-end/TextEditorModel.js:
3219         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3220         * inspector/front-end/TextViewer.js:
3221         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
3222         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
3223         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
3224         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
3225
3226 2012-03-25  Nat Duca  <nduca@chromium.org>
3227
3228         [chromium] Route willBeginFrame from compositor to WebWidget
3229         https://bugs.webkit.org/show_bug.cgi?id=82171
3230
3231         Reviewed by Darin Fisher.
3232
3233         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3234         (CCLayerTreeHostClient):
3235         (WebCore::CCLayerTreeHost::willBeginFrame):
3236         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3237         (WebCore::CCThreadProxy::beginFrame):
3238
3239 2012-03-25  Hayato Ito  <hayato@chromium.org>
3240
3241         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
3242         https://bugs.webkit.org/show_bug.cgi?id=79197
3243
3244         Reviewed by Dimitri Glazkov.
3245
3246         Add internal APIs which can be used to traverse Reified DOM tree, which is
3247         a result of node distribution algorithm explained in Shadow DOM spec.
3248         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
3249
3250         Every public functions defined in ReifiedTreeTraversal are static
3251         functions and are named in a similar way to ones defined in WebCore::Node class.
3252         The only difference is that ReifiedTreeTraversal APIs consider shadow
3253         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
3254         transparently.
3255
3256         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
3257         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
3258
3259         Test: fast/dom/shadow/reified-tree-traversal.html
3260
3261         * CMakeLists.txt:
3262         * GNUmakefile.list.am:
3263         * Target.pri:
3264         * WebCore.exp.in:
3265         * WebCore.gypi:
3266         * WebCore.vcproj/WebCore.vcproj:
3267         * WebCore.xcodeproj/project.pbxproj:
3268         * dom/ReifiedTreeTraversal.cpp: Added.
3269         (WebCore):
3270         (WebCore::isShadowHost):
3271         (WebCore::shadowTreeFor):
3272         (WebCore::shadowTreeOfParent):
3273         (WebCore::ReifiedTreeTraversal::firstChild):
3274         (WebCore::ReifiedTreeTraversal::lastChild):
3275         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
3276         (WebCore::ReifiedTreeTraversal::traverseChild):
3277         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
3278         (WebCore::ReifiedTreeTraversal::traverseNode):
3279         (WebCore::ReifiedTreeTraversal::nextSibling):
3280         (WebCore::ReifiedTreeTraversal::previousSibling):
3281         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
3282         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
3283         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
3284         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
3285         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
3286         (WebCore::ReifiedTreeTraversal::parentNode):
3287         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
3288         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
3289         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
3290         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
3291         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
3292         (WebCore::ReifiedTreeTraversal::traverseNextNode):
3293         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
3294         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
3295         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
3296         * dom/ReifiedTreeTraversal.h: Added.
3297         (WebCore):
3298         (ReifiedTreeTraversal):
3299         * dom/ShadowTree.cpp:
3300         (WebCore::ShadowTree::insertionPointFor):
3301         (WebCore::ShadowTree::selectionFor):
3302         (WebCore):
3303         * dom/ShadowTree.h:
3304         (WebCore):
3305         (ShadowTree):
3306         * html/shadow/HTMLContentSelector.cpp:
3307         (WebCore::HTMLContentSelector::findFor):
3308         * html/shadow/HTMLContentSelector.h:
3309         (HTMLContentSelectionSet):
3310         (WebCore::HTMLContentSelectionSet::find):
3311         (HTMLContentSelector):
3312         * html/shadow/InsertionPoint.h:
3313         (WebCore::isInsertionPoint):
3314         (WebCore::toInsertionPoint):
3315         (WebCore):
3316         * testing/Internals.cpp:
3317         (WebCore::Internals::nextSiblingInReifiedTree):
3318         (WebCore):
3319         (WebCore::Internals::firstChildInReifiedTree):
3320         (WebCore::Internals::lastChildInReifiedTree):
3321         (WebCore::Internals::traverseNextNodeInReifiedTree):
3322         (WebCore::Internals::traversePreviousNodeInReifiedTree):
3323         * testing/Internals.h:
3324         (Internals):
3325         * testing/Internals.idl:
3326
3327 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
3328
3329         Web Inspector: Indenting fully selected line should not indent the line next to it
3330         https://bugs.webkit.org/show_bug.cgi?id=81758
3331
3332         In the editor, you can select a whole line by moving caret at 0 column
3333         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
3334         indents 2 lines: fully selected one and the line next to it. The patch
3335         changes this behaviour to indent only fully selected line since that is
3336         what pretty-match all the other code editors do.
3337
3338         Reviewed by Pavel Feldman.
3339
3340         Test: inspector/editor/indentation.html
3341
3342         * inspector/front-end/TextViewer.js:
3343         (WebInspector.TextEditorMainPanel.prototype._indentLines):
3344             Do not insert indent at the begging of the last line if a selection
3345             ends on its 0 column.
3346         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
3347             Do not remove indent at the begging of the last line if a selection
3348             ends on its 0 column.
3349
3350 2012-03-25  Abhishek Arya  <inferno@chromium.org>
3351
3352         Crash in ContainerNode::resumePostAttachCallbacks.
3353         https://bugs.webkit.org/show_bug.cgi?id=82159
3354
3355         Reviewed by Hajime Morita.
3356
3357         Test: plugins/object-onfocus-mutation-crash.html
3358
3359         * dom/ContainerNode.cpp:
3360         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
3361         callbacks when our attach depth is 1 can fire mutation events such as onfocus
3362         which can blow away |this|. Need to protect it with a RefPtr.
3363         * html/HTMLPlugInImageElement.cpp:
3364         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
3365         until the function completes.
3366
3367 2012-03-25  Dana Jansens  <danakj@chromium.org>
3368
3369         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
3370         https://bugs.webkit.org/show_bug.cgi?id=82117
3371
3372         Reviewed by Adrienne Walker.
3373
3374         For animating transforms, instead of early-outing when the layer's
3375         visible rect is empty, let it prepaint regardless.
3376
3377         For now, we just only paint the outermost tiles, and only for small
3378         layers, with at most 9 tiles.
3379
3380         This changes the behaviour of ContentLayerChromium's
3381         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
3382         prepainting functions that it calls to ensure the old behaviour holds
3383         without animations, and the new behaviour works with them.
3384
3385         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
3386                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
3387                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
3388                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
3389
3390         * platform/graphics/chromium/ContentLayerChromium.cpp:
3391         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
3392         * platform/graphics/chromium/TiledLayerChromium.cpp:
3393         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
3394         (WebCore::TiledLayerChromium::needsIdlePaint):
3395         (WebCore::TiledLayerChromium::idlePaintRect):
3396         * platform/graphics/chromium/TiledLayerChromium.h:
3397         (WebCore::TiledLayerChromium::numPaintedTiles):
3398         (TiledLayerChromium):
3399
3400 2012-03-25  Antti Koivisto  <antti@apple.com>
3401
3402         Don't use CSSRuleList for child rule ownership
3403         https://bugs.webkit.org/show_bug.cgi?id=82127
3404
3405         Reviewed by Andreas Kling.
3406
3407         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
3408         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
3409         instantiated on-demand for API purposes only.
3410         
3411         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
3412           and WebKitRegionRule.
3413         - Add direct accessors, use internally instead of CSSRuleList.
3414         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
3415         - Instantiate CSSRuleLists on-demand.
3416         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
3417           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
3418           
3419         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
3420         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
3421
3422         * css/CSSGrammar.y:
3423         * css/CSSMediaRule.cpp:
3424         (WebCore::CSSMediaRule::CSSMediaRule):
3425         (WebCore::CSSMediaRule::~CSSMediaRule):
3426         (WebCore::CSSMediaRule::append):
3427         (WebCore::CSSMediaRule::insertRule):
3428         (WebCore::CSSMediaRule::deleteRule):
3429         (WebCore::CSSMediaRule::cssText):
3430         (WebCore::CSSMediaRule::cssRules):
3431         * css/CSSMediaRule.h:
3432         (WebCore::CSSMediaRule::create):
3433         (CSSMediaRule):
3434         (WebCore::CSSMediaRule::ruleCount):
3435         (WebCore::CSSMediaRule::ruleAt):
3436         * css/CSSParser.cpp:
3437         (WebCore::CSSParser::createMediaRule):
3438         (WebCore::CSSParser::createRuleList):
3439         (WebCore::CSSParser::createRegionRule):
3440         * css/CSSParser.h:
3441         (WebCore):
3442         * css/CSSRuleList.cpp:
3443         (WebCore):
3444         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
3445         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
3446         (WebCore::StaticCSSRuleList::deref):
3447         (WebCore::StaticCSSRuleList::item):        
3448         * css/CSSRuleList.h:
3449         (CSSRuleList):
3450
3451             Turn CSSRuleList into abstract interface.
3452                     
3453         (StaticCSSRuleList):
3454         (WebCore::StaticCSSRuleList::create):
3455         (WebCore::StaticCSSRuleList::ref):
3456         (WebCore::StaticCSSRuleList::rules):
3457         (WebCore::StaticCSSRuleList::styleSheet):
3458         (WebCore::StaticCSSRuleList::length):
3459         
3460             Concrete implementation for fixed list of rules.
3461     
3462         (WebCore):
3463         (LiveCSSRuleList):
3464         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
3465         (WebCore::LiveCSSRuleList::ref):
3466         (WebCore::LiveCSSRuleList::deref):
3467         (WebCore::LiveCSSRuleList::length):
3468         (WebCore::LiveCSSRuleList::item):
3469         (WebCore::LiveCSSRuleList::styleSheet):
3470         
3471             Concrete implemenation for live list backed by the underlying container rule.
3472             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
3473         
3474         * css/CSSStyleSelector.cpp:
3475         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
3476         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3477         * css/CSSStyleSelector.h:
3478         (CSSStyleSelector):
3479         * css/CSSStyleSheet.cpp:
3480         
3481             The same scheme for CSSStyleSheet.cssRule as with container rules.
3482         
3483         (StyleSheetCSSRuleList):
3484         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
3485         (WebCore::StyleSheetCSSRuleList::ref):
3486         (WebCore::StyleSheetCSSRuleList::deref):
3487         (WebCore::StyleSheetCSSRuleList::length):
3488         (WebCore::StyleSheetCSSRuleList::item):
3489         (WebCore::StyleSheetCSSRuleList::styleSheet):
3490         (WebCore):
3491         (WebCore::CSSStyleSheet::rules):
3492         (WebCore::CSSStyleSheet::cssRules):
3493         * css/CSSStyleSheet.h:
3494         (CSSStyleSheet):
3495         * css/WebKitCSSKeyframesRule.cpp:
3496         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
3497         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
3498         (WebCore):
3499         (WebCore::WebKitCSSKeyframesRule::append):
3500         (WebCore::WebKitCSSKeyframesRule::deleteRule):
3501         (WebCore::WebKitCSSKeyframesRule::findRule):
3502         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
3503         (WebCore::WebKitCSSKeyframesRule::cssText):
3504         (WebCore::WebKitCSSKeyframesRule::cssRules):
3505         * css/WebKitCSSKeyframesRule.h:
3506         (WebKitCSSKeyframesRule):
3507         (WebCore::WebKitCSSKeyframesRule::ruleCount):
3508         (WebCore::WebKitCSSKeyframesRule::ruleAt):
3509         (WebCore::WebKitCSSKeyframesRule::length):
3510         (WebCore::WebKitCSSKeyframesRule::item):
3511         * css/WebKitCSSRegionRule.cpp:
3512         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
3513         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
3514         (WebCore::WebKitCSSRegionRule::cssText):
3515         (WebCore::WebKitCSSRegionRule::cssRules):
3516         * css/WebKitCSSRegionRule.h:
3517         * inspector/InspectorStyleSheet.cpp:
3518         (WebCore::asCSSRuleList):
3519         (WebCore::InspectorStyleSheet::addRule):
3520         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3521
3522 2012-03-25  Kentaro Hara  <haraken@chromium.org>
3523
3524         Remove duplicated GenerateConditionalString() from code generators
3525         https://bugs.webkit.org/show_bug.cgi?id=82148
3526
3527         Reviewed by Adam Barth.
3528
3529         Previously GenerateConditionalString()s were defined in each code generator,
3530         and they were doing the same thing. This patch puts GenerateConditionalString()
3531         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
3532
3533         No tests. No change in the generated code.
3534
3535         * bindings/scripts/CodeGenerator.pm:
3536         (GenerateConditionalString):
3537         * bindings/scripts/CodeGeneratorCPP.pm:
3538         (GenerateHeader):
3539         (GenerateImplementation):
3540         * bindings/scripts/CodeGeneratorGObject.pm:
3541         (GenerateProperty):
3542         (GenerateProperties):
3543         (GenerateFunction):
3544         (WriteData):
3545         * bindings/scripts/CodeGeneratorJS.pm:
3546         (GenerateHeaderContentHeader):
3547         (GenerateImplementationContentHeader):
3548         (GenerateHeader):
3549         (GenerateImplementation):
3550         (GenerateCallbackHeader):
3551         (GenerateCallbackImplementation):
3552         * bindings/scripts/CodeGeneratorObjC.pm:
3553         (GenerateHeader):
3554         (GenerateImplementation):
3555         * bindings/scripts/CodeGeneratorV8.pm:
3556         (GenerateHeader):
3557         (GenerateNormalAttrGetter):
3558         (GenerateNormalAttrSetter):
3559         (GenerateOverloadedFunctionCallback):
3560         (GenerateFunctionCallback):
3561         (GenerateBatchedAttributeData):
3562         (GenerateImplementation):
3563         (GenerateHeaderContentHeader):
3564         (GenerateImplementationContentHeader):
3565         (GenerateCallbackHeader):
3566         (GenerateCallbackImplementation):
3567
3568 2012-03-25  Kentaro Hara  <haraken@chromium.org>
3569
3570         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
3571         https://bugs.webkit.org/show_bug.cgi?id=82146
3572
3573         Reviewed by Adam Barth.
3574
3575         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
3576         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
3577         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
3578         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
3579
3580         No tests. No change in behavior.
3581
3582         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
3583         (WebCore):
3584         (WebCore::DOMWindowWebDatabase::openDatabase):
3585         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
3586         (WebCore):
3587         (DOMWindowWebDatabase):
3588         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
3589         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
3590         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
3591         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
3592         (WebCore):
3593         (WebCore::WorkerContextWebDatabase::openDatabase):
3594         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
3595         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
3596         (WebCore):
3597         (WorkerContextWebDatabase):
3598         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
3599         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
3600         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
3601
3602         * DerivedSources.make:
3603         * DerivedSources.pri:
3604         * GNUmakefile.list.am:
3605         * Target.pri:
3606         * WebCore.gypi:
3607         * WebCore.vcproj/WebCore.vcproj:
3608         * WebCore.xcodeproj/project.pbxproj:
3609
3610 2012-03-25  Philip Rogers  <pdr@google.com>
3611
3612         Avoid race condition when iterating over pending resources
3613         https://bugs.webkit.org/show_bug.cgi?id=82115
3614
3615         Reviewed by Nikolas Zimmermann.
3616
3617         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
3618         where pending elements can become non-pending while we iterate over them.
3619
3620         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
3621         resources are removed. Because pending resources can be modified while
3622         iterating over them, we introduce m_pendingResourcesForRemoval that
3623         holds pending resources that are marked for removal. Instead of iterating
3624         over this list we simply remove each pending resource from
3625         m_pendingResourcesForRemoval; if a pending resource is modified or removed
3626         during the processing of another pending resource this list is updated before
3627         the next element can be accessed.
3628
3629         This change also removes removePendingResourceForElement which is no longer
3630         referenced.
3631
3632         Test: http/tests/svg/change-id-with-pending-resources.html
3633
3634         * svg/SVGDocumentExtensions.cpp:
3635         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
3636         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3637         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
3638         (WebCore):
3639         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
3640         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
3641         * svg/SVGDocumentExtensions.h:
3642         (SVGDocumentExtensions):
3643         * svg/SVGStyledElement.cpp:
3644         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
3645
3646 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
3647
3648         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
3649         https://bugs.webkit.org/show_bug.cgi?id=82104
3650         RIM PR: 145963
3651
3652         Reviewed by Rob Buis.
3653
3654         The embedder may use vertex buffers, which affected the interpretation
3655         our vertex array pointers from memory pointers to offsets into a vertex
3656         buffer. The resulting geometry often resulted in no visible layers on
3657         screen.
3658
3659         Fixed by getting rid of any bound buffer when we enter
3660         LayerRenderer::drawLayers().
3661
3662         * platform/graphics/blackberry/LayerRenderer.cpp:
3663         (WebCore::LayerRenderer::drawLayers):
3664
3665 2012-03-24  Nat Duca  <nduca@chromium.org>
3666
3667         [chromium] Instrument gesture animations with async traces
3668         https://bugs.webkit.org/show_bug.cgi?id=82076
3669
3670         Reviewed by Adrienne Walker.
3671
3672         * platform/ActivePlatformGestureAnimation.cpp:
3673         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
3674         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
3675         * platform/PlatformGestureCurve.h:
3676         (PlatformGestureCurve):
3677         * platform/TouchpadFlingPlatformGestureCurve.h:
3678         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
3679         * platform/WheelFlingPlatformGestureCurve.h:
3680         (WebCore::WheelFlingPlatformGestureCurve::debugName):
3681         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
3682         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
3683         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
3684         * platform/graphics/chromium/cc/CCGestureCurve.h:
3685         (CCGestureCurve):
3686
3687 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
3688
3689         XML error document creation should not fire mutation events
3690         https://bugs.webkit.org/show_bug.cgi?id=80765
3691
3692         Reviewed by Adam Barth.
3693
3694         Broke two tests that expected the old behavior, which have now been updated.
3695
3696         * xml/XMLErrors.cpp:
3697         (WebCore::createXHTMLParserErrorHeader):
3698         (WebCore::XMLErrors::insertErrorMessageBlock):
3699
3700 2012-03-24  Florin Malita  <fmalita@google.com>
3701
3702         ForeignObject content is zoomed two times
3703         https://bugs.webkit.org/show_bug.cgi?id=76282
3704
3705         Reviewed by Nikolas Zimmermann.
3706
3707         Test: svg/zoom/page/zoom-foreign-content.svg
3708
3709         Reset the effective zoom property for FO-nested content to avoid
3710         having the zoom factor applied multiple times (zooming is handled by
3711         the top level SVG root element).
3712
3713         * css/CSSStyleSelector.cpp:
3714         (WebCore::CSSStyleSelector::adjustRenderStyle):
3715
3716 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
3717
3718         AX: Support solution to handle invalid ax text marker
3719         https://bugs.webkit.org/show_bug.cgi?id=82023
3720
3721         Reviewed by Oliver Hunt.
3722
3723         This provides methods to better use text markers so that assistive technologies
3724         can know when they are valid, and can convert them to and from absolute positions.
3725
3726         Test: platform/mac/accessibility/textmarker-routines.html
3727
3728         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3729         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3730         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
3731         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
3732         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
3733         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3734
3735 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
3736
3737         Quick fix for rendering controls regression.
3738         https://bugs.webkit.org/show_bug.cgi?id=82125
3739
3740         Reviewed by Eric Carlson.
3741
3742         Only temporary fix. Tests to cover the problem should be added
3743
3744         * html/shadow/MediaControlElements.cpp:
3745         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
3746         property should be toggled only by the media element now.
3747         (WebCore::MediaControlPanelElement::makeTransparent): The timer
3748         that toggles the dispalay:none shouldn't be used now.
3749
3750 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
3751
3752         [wx] Unreviewed. Add header needed for compilation.
3753
3754         * html/shadow/TextFieldDecorationElement.cpp:
3755
3756 2012-03-24  Abhishek Arya  <inferno@chromium.org>
3757
3758         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
3759         https://bugs.webkit.org/show_bug.cgi?id=81959
3760
3761         Reviewed by Ryosuke Niwa.
3762
3763         Test: editing/execCommand/apply-style-command-crash.html
3764
3765         * editing/ApplyStyleCommand.cpp:
3766         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
3767         node iterator |node|.
3768         * editing/ApplyStyleCommand.h:
3769         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
3770
3771 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3772
3773         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
3774
3775         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
3776
3777         * platform/graphics/texmap/TextureMapperShaderManager.h:
3778         (WebCore::TextureMapperShaderManager::getShaderProgram):
3779
3780 2012-03-24  Zeno Albisser  <zeno@webkit.org>
3781
3782         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
3783         https://bugs.webkit.org/show_bug.cgi?id=82049
3784
3785         Change the getShaderProgram() function to not be a template.
3786         This is a workaround for a compiler bug that leads to an assert
3787         when compiling in debug mode on mac.
3788
3789         Reviewed by Noam Rosenthal.
3790
3791         * platform/graphics/texmap/TextureMapperGL.cpp:
3792         (WebCore::TextureMapperGL::drawTexture):
3793         (WebCore::TextureMapperGL::beginClip):
3794         * platform/graphics/texmap/TextureMapperShaderManager.h:
3795         (TextureMapperShaderProgram):
3796         (WebCore::TextureMapperShaderManager::getShaderProgram):
3797         (TextureMapperShaderManager):
3798
3799 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
3800
3801         [chromium] Incorrect replica originTransform used in CCDamageTracker
3802         https://bugs.webkit.org/show_bug.cgi?id=82118
3803
3804         Reviewed by Adrienne Walker.
3805
3806         Unit test added to CCDamageTrackerTest.cpp
3807
3808         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3809         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
3810
3811 2012-03-23  Dana Jansens  <danakj@chromium.org>
3812
3813         [chromium] When prepainting fails, tiles dirty rects may be cleared
3814         https://bugs.webkit.org/show_bug.cgi?id=82107
3815
3816         Reviewed by Adrienne Walker.
3817
3818         When prepainting, if a tile is unable to be reserved due to memory
3819         limits, we bail out of prepareToUpdateTiles. But we would have
3820         cleared the dirty rect of any previous tiles. This leaves them
3821         in a bad state where their textures are reserved, but their textureIds
3822         are set to 0, and they are not marked dirty. This means that they will
3823         not be updated and displayed if they become visible, since it is
3824         assumed that valid textures with zero textureId must have a dirty
3825         region.
3826
3827         We fix this by not clearing the dirty rects until we know we are
3828         going to update the layer.
3829
3830         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
3831
3832         * platform/graphics/chromium/TiledLayerChromium.cpp:
3833         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3834         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3835         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
3836         (WebCore):
3837         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3838         (CCTiledLayerImpl):
3839
3840 2012-03-23  Stephanie Lewis  <slewis@apple.com>
3841
3842         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
3843         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
3844         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
3845         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
3846         that state the GC collection can take a substantial amount of time.
3847
3848         Reviewed by Geoff Garen.
3849
3850         Performance Change, no change in behavior.
3851
3852         * platform/mac/MemoryPressureHandlerMac.mm:
3853         (WebCore::MemoryPressureHandler::releaseMemory):
3854
3855 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
3856
3857         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
3858         https://bugs.webkit.org/show_bug.cgi?id=82106
3859
3860         Reviewed by Adrienne Walker.
3861
3862         Existing unit tests updated.
3863
3864         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
3865         wheel handlers are present.
3866
3867         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3868         (WebCore::CCLayerTreeHostImpl::scrollBegin):
3869
3870 2012-03-23  Adam Barth  <abarth@webkit.org>
3871
3872         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
3873         https://bugs.webkit.org/show_bug.cgi?id=79635
3874
3875         Reviewed by Kentaro Hara.
3876
3877         This patch moves the NotificationCenter from WorkerContext to
3878         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
3879         this patch, Notifications are almost entirely contained in the
3880         notifications directory.
3881
3882         * CMakeLists.txt:
3883         * DerivedSources.make:
3884         * DerivedSources.pri:
3885         * GNUmakefile.list.am:
3886         * Target.pri:
3887         * WebCore.gypi:
3888         * WebCore.vcproj/WebCore.vcproj:
3889         * WebCore.xcodeproj/project.pbxproj:
3890         * workers/WorkerContext.cpp:
3891         (WebCore::WorkerContext::~WorkerContext):
3892         * workers/WorkerContext.h:
3893         (WebCore):
3894         (WorkerContext):
3895         * workers/WorkerContext.idl:
3896
3897 2012-03-23  Michal Mocny  <mmocny@google.com>
3898
3899         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
3900         https://bugs.webkit.org/show_bug.cgi?id=82111
3901
3902         Reviewed by Adrienne Walker.
3903
3904         * platform/graphics/chromium/LayerRendererChromium.cpp:
3905         (WebCore::LayerRendererChromium::beginDrawingFrame):
3906         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3907         (WebCore::CCLayerTreeHostImpl::drawLayers):
3908
3909 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
3910
3911         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
3912         https://bugs.webkit.org/show_bug.cgi?id=82109
3913
3914         Reviewed by Dirk Pranke.
3915
3916         If the main thread commits twice before the impl thread actually
3917         draws, then the updateRect of the first frame gets lost forever,
3918         and not propagated to the damage tracker.
3919
3920         The solution is to accumulate the updateRect. The CCLayerImpl
3921         updateRect is already being correctly cleared at the appropriate
3922         time after drawing.
3923
3924         Unit test added to LayerChromiumTest.cpp.
3925
3926         * platform/graphics/chromium/LayerChromium.cpp:
3927         (WebCore::LayerChromium::pushPropertiesTo):
3928
3929 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
3930
3931         [MutationObservers] attributeFilter should be case sensitive at all times
3932         https://bugs.webkit.org/show_bug.cgi?id=81822
3933
3934         Reviewed by Ryosuke Niwa.
3935
3936         This removes the behavior in MutationObserverRegistration which treats
3937         attributeFilter as case insensitive for HTML elements in HTML documents.
3938
3939         Relevant tests have been updated.
3940
3941         * dom/MutationObserverRegistration.cpp:
3942         (WebCore::MutationObserverRegistration::resetObservation):
3943         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
3944         * dom/MutationObserverRegistration.h:
3945         (MutationObserverRegistration):
3946
3947 2012-03-23  Kentaro Hara  <haraken@chromium.org>
3948
3949         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
3950         https://bugs.webkit.org/show_bug.cgi?id=79663
3951
3952         Reviewed by Adam Barth.
3953
3954         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
3955         to WorkerContextWebSocket.idl.
3956
3957         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
3958
3959         * CMakeLists.txt:
3960         * DerivedSources.make:
3961         * DerivedSources.pri:
3962         * GNUmakefile.list.am:
3963         * Modules/websockets/WorkerContextWebSocket.idl: Added.
3964         * WebCore.gypi:
3965         * WebCore.xcodeproj/project.xcodeproj:
3966         * workers/WorkerContext.idl:
3967
3968 2012-03-23  Parag Radke  <parag@motorola.com>
3969
3970         REGRESSION: can select text of an input button
3971         https://bugs.webkit.org/show_bug.cgi?id=13624
3972
3973         Reviewed by Ryosuke Niwa.
3974
3975         Text in a button should never have a selection background of its own painted
3976         but if the button is inside an editable area, then the whole button should
3977         have it's selection background painted.
3978
3979         Test: editing/selection/selection-button-text.html
3980
3981         * rendering/RenderButton.h:
3982         Added implementation for the virtual function canBeSelectionLeaf()
3983         which returns true if the button renderer is editable, false other wise.
3984         * rendering/RenderTextFragment.h:
3985         Added implementation for the virtual function canBeSelectionLeaf()
3986         which returns true if the text fragment renderer is editable, false other wise.
3987
3988 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
3989
3990         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
3991         https://bugs.webkit.org/show_bug.cgi?id=82095
3992
3993         Reviewed by Dan Bernstein.
3994
3995         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
3996
3997         * html/track/LoadableTextTrack.cpp:
3998         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
3999
4000 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
4001
4002         Layout Test media/video-source-load.html is failing
4003         https://bugs.webkit.org/show_bug.cgi?id=82094
4004
4005         Reviewed by Alexey Proskuryakov.
4006
4007         No new tests, tested by media/video-source-load.html.
4008
4009         * html/HTMLMediaElement.cpp:
4010         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
4011             with networkState == NETWORK_EMPTY because the resource selection algorithm has
4012             not started yet.
4013
4014 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
4015
4016         [Mac] No need for platform-specific ENABLE_BLOB values
4017         https://bugs.webkit.org/show_bug.cgi?id=82102
4018
4019         Reviewed by David Kilzer.
4020
4021         * Configurations/FeatureDefines.xcconfig:
4022
4023 2012-03-23  Kent Tamura  <tkent@chromium.org>
4024
4025         Add TextFieldDecorator and TextFieldDecorationElement
4026         https://bugs.webkit.org/show_bug.cgi?id=80580
4027
4028         Reviewed by Dimitri Glazkov.
4029
4030         These classes will be used to add a decoration icon to a text field
4031         <input> from outside of WebCore. We have a plan to use them in Chromium
4032         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
4033         non-Chromium build files.
4034
4035         How it works:
4036         When a shadow subtree for a text field is created, we ask ChromeClient
4037         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
4038         existing shadow subtree or another shadow tree. A TextFieldDecorator is
4039         associated to a TextFieldDecorationElement, and it provides decoration
4040         icon images and a click handler.
4041
4042         No new tests. This patch won't make any behavior change for now.
4043
4044         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
4045         * dom/Element.h:
4046         (WebCore::Element::isTextFieldDecoration):
4047         * html/TextFieldInputType.cpp: