Need a way to produce leaner markup when pasting a fragment containing verbose markup
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-14  Enrica Casucci  <enrica@apple.com>
2
3         Need a way to produce leaner markup when pasting a fragment containing verbose markup
4         https://bugs.webkit.org/show_bug.cgi?id=74514
5         <rdar://problem/10208653>
6
7         Reviewed by Ryosuke Niwa.
8
9         This patch is another step in the direction of reducing the verbosity of the markup
10         produced with editing operations.
11         After the copied fragment is inserted in the document, it is analyzed to remove all
12         the elements that don't contribute to the style. The decision is made comparing the
13         render styles. As part of the cleanup, unstyled divs with single child element are
14         removed. The logic to determine the blocks that can be removed is the same used in
15         DeleteSelectionCommand and has been moved in CompositeEditCommand.
16         
17         Test: editing/pasteboard/paste-and-sanitize.html
18
19         * editing/CompositeEditCommand.cpp:
20         (WebCore::CompositeEditCommand::isRemovableBlock): Implements logic to determine
21         if a block can be removed.
22         * editing/CompositeEditCommand.h: Added isRemovableBlock declaration.
23         * editing/DeleteSelectionCommand.cpp:
24         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Implemented using
25         isRemovableBlock from CompositeEditCommand.
26         * editing/Editor.cpp:
27         (WebCore::Editor::replaceSelectionWithFragment): Added SanitizeFragment option.
28         * editing/ReplaceSelectionCommand.cpp:
29         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Added initialization
30         of m_sanitizeFragment member.
31         (WebCore::ReplaceSelectionCommand::removeRedundantMarkup): New method implementing
32         the cleanup logic.
33         (WebCore::ReplaceSelectionCommand::doApply): Added call to removeRedundantMarkup
34         after the fragment is inserted in the document.
35         * editing/ReplaceSelectionCommand.h: Added new value to the enum CommandOption,
36         a new member variable and the new method declaration.
37
38 2011-12-14  Adrienne Walker  <enne@google.com>
39
40         [chromium] Refactor tile drawing to be more data-driven
41         https://bugs.webkit.org/show_bug.cgi?id=73059
42
43         Reviewed by James Robinson.
44
45         Partially tested by compositor layout tests. Debug borders and
46         checkerboarding tested manually.
47
48         This is the first part of a move towards rendering quads on screen
49         from a bag of data rather than in virtual CCLayerImpl::draw functions.
50
51         CCDrawQuad-derived classes store material-specific pieces of data to
52         use when rendering. CCLayerImpl classes now create these CCDrawQuad
53         objects rather than issuing direct GL commands. Where this data is
54         shared between quads that come from the same layer, that data is
55         stored in a CCSharedQuadState object rather than duplicated.
56
57         CCRenderPass is the class that holds the list of quads and the target
58         surface that they draw into. Drawing a frame consists of drawing a
59         series of render passes onto their respective surfaces.
60
61         CCLayerTreeHostImpl constructs these render passes from the output of
62         calculateDrawTransformsAndVisibility by asking each layer to insert
63         quads into a list and hands them off to LayerRendererChromium for
64         rendering.
65
66         * WebCore.gypi:
67         * platform/graphics/chromium/LayerRendererChromium.cpp:
68         (WebCore::LayerRendererChromium::clearSurfaceForDebug):
69         (WebCore::LayerRendererChromium::beginDrawingFrame):
70         (WebCore::LayerRendererChromium::drawRenderPass):
71         (WebCore::LayerRendererChromium::drawQuad):
72         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
73         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
74         (WebCore::LayerRendererChromium::drawSolidColorQuad):
75         (WebCore::tileUniformLocation):
76         (WebCore::findTileProgramUniforms):
77         (WebCore::LayerRendererChromium::drawTileQuad):
78         (WebCore::LayerRendererChromium::drawCustomLayerQuad):
79         (WebCore::LayerRendererChromium::finishDrawingFrame):
80         (WebCore::LayerRendererChromium::useRenderSurface):
81         * platform/graphics/chromium/LayerRendererChromium.h:
82         * platform/graphics/chromium/ShaderChromium.h:
83         (WebCore::FragmentTexAlphaBinding::edgeLocation):
84         (WebCore::FragmentTexAlphaBinding::fragmentTexTransformLocation):
85         (WebCore::FragmentTexOpaqueBinding::edgeLocation):
86         (WebCore::FragmentTexOpaqueBinding::fragmentTexTransformLocation):
87         * platform/graphics/chromium/TiledLayerChromium.cpp:
88         (WebCore::TiledLayerChromium::pushPropertiesTo):
89         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp: Added.
90         (WebCore::CCCustomLayerDrawQuad::create):
91         (WebCore::CCCustomLayerDrawQuad::CCCustomLayerDrawQuad):
92         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h: Added.
93         (WebCore::CCCustomLayerDrawQuad::layer):
94         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Added.
95         (WebCore::CCDebugBorderDrawQuad::create):
96         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
97         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Added.
98         (WebCore::CCDebugBorderDrawQuad::color):
99         (WebCore::CCDebugBorderDrawQuad::width):
100         * platform/graphics/chromium/cc/CCDrawQuad.cpp: Added.
101         (WebCore::CCDrawQuad::CCDrawQuad):
102         (WebCore::CCDrawQuad::toDebugBorderDrawQuad):
103         (WebCore::CCDrawQuad::toRenderSurfaceDrawQuad):
104         (WebCore::CCDrawQuad::toSolidColorDrawQuad):
105         (WebCore::CCDrawQuad::toTileDrawQuad):
106         (WebCore::CCDrawQuad::toCustomLayerDrawQuad):
107         * platform/graphics/chromium/cc/CCDrawQuad.h: Added.
108         (WebCore::CCDrawQuad::quadRect):
109         (WebCore::CCDrawQuad::quadTransform):
110         (WebCore::CCDrawQuad::layerTransform):
111         (WebCore::CCDrawQuad::layerRect):
112         (WebCore::CCDrawQuad::clipRect):
113         (WebCore::CCDrawQuad::opacity):
114         (WebCore::CCDrawQuad::drawsOpaque):
115         (WebCore::CCDrawQuad::needsBlending):
116         (WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
117         (WebCore::CCDrawQuad::material):
118         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
119         (WebCore::CCLayerImpl::createSharedQuadState):
120         (WebCore::CCLayerImpl::appendQuads):
121         (WebCore::CCLayerImpl::appendDebugBorderQuad):
122         (WebCore::CCLayerImpl::quadTransform):
123         * platform/graphics/chromium/cc/CCLayerImpl.h:
124         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
125         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
126         (WebCore::computeScreenSpaceTransformForSurface):
127         (WebCore::damageInSurfaceSpace):
128         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
129         (WebCore::CCLayerTreeHostImpl::drawLayers):
130         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
131         * platform/graphics/chromium/cc/CCRenderPass.cpp: Added.
132         (WebCore::CCRenderPass::create):
133         (WebCore::CCRenderPass::CCRenderPass):
134         (WebCore::CCRenderPass::appendQuadsForLayer):
135         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
136         * platform/graphics/chromium/cc/CCRenderPass.h: Added.
137         (WebCore::CCRenderPass::quadList):
138         (WebCore::CCRenderPass::targetSurface):
139         (WebCore::CCRenderPass::setSurfaceDamageRect):
140         (WebCore::CCRenderPass::surfaceDamageRect):
141         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: Added.
142         (WebCore::CCRenderSurfaceDrawQuad::create):
143         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
144         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: Added.
145         (WebCore::CCRenderSurfaceDrawQuad::layer):
146         (WebCore::CCRenderSurfaceDrawQuad::surfaceDamageRect):
147         * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Added.
148         (WebCore::CCSharedQuadState::create):
149         (WebCore::CCSharedQuadState::CCSharedQuadState):
150         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
151         * platform/graphics/chromium/cc/CCSharedQuadState.h: Added.
152         (WebCore::CCSharedQuadState::quadTransform):
153         (WebCore::CCSharedQuadState::layerTransform):
154         (WebCore::CCSharedQuadState::layerRect):
155         (WebCore::CCSharedQuadState::clipRect):
156         (WebCore::CCSharedQuadState::opacity):
157         (WebCore::CCSharedQuadState::isOpaque):
158         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Added.
159         (WebCore::CCSolidColorDrawQuad::create):
160         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
161         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Added.
162         (WebCore::CCSolidColorDrawQuad::color):
163         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Added.
164         (WebCore::CCTileDrawQuad::create):
165         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
166         * platform/graphics/chromium/cc/CCTileDrawQuad.h: Added.
167         (WebCore::CCTileDrawQuad::textureId):
168         (WebCore::CCTileDrawQuad::textureOffset):
169         (WebCore::CCTileDrawQuad::textureSize):
170         (WebCore::CCTileDrawQuad::textureFilter):
171         (WebCore::CCTileDrawQuad::swizzleContents):
172         (WebCore::CCTileDrawQuad::leftEdgeAA):
173         (WebCore::CCTileDrawQuad::topEdgeAA):
174         (WebCore::CCTileDrawQuad::rightEdgeAA):
175         (WebCore::CCTileDrawQuad::bottomEdgeAA):
176         (WebCore::CCTileDrawQuad::isAntialiased):
177         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
178         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
179         (WebCore::CCTiledLayerImpl::quadTransform):
180         (WebCore::CCTiledLayerImpl::appendQuads):
181         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
182         (WebCore::CCTiledLayerImpl::setContentsSwizzled):
183         (WebCore::CCTiledLayerImpl::contentsSwizzled):
184
185 2011-12-14  Ojan Vafai  <ojan@chromium.org>
186
187         Implement flexDirection and flexWrap and make flexFlow a proper shorthand.
188         https://bugs.webkit.org/show_bug.cgi?id=74542
189
190         Reviewed by Tony Chang.
191
192         In a followup patch, I'll cleanup all the *Flow methods in RenderFlexibleBox.
193
194         Existing tests cover all the rendering behaviors, so only need to test
195         the css property parsing.
196
197         * css/CSSComputedStyleDeclaration.cpp:
198         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
199         * css/CSSMutableStyleDeclaration.cpp:
200         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
201         * css/CSSParser.cpp:
202         (WebCore::CSSParser::parseValue):
203         * css/CSSPrimitiveValueMappings.h:
204         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
205         (WebCore::CSSPrimitiveValue::operator EFlexDirection):
206         * css/CSSProperty.cpp:
207         (WebCore::CSSProperty::isInheritedProperty):
208         * css/CSSPropertyLonghand.cpp:
209         (WebCore::initShorthandMap):
210         * css/CSSPropertyNames.in:
211         * css/CSSStyleApplyProperty.cpp:
212         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
213         * css/CSSStyleSelector.cpp:
214         (WebCore::CSSStyleSelector::applyProperty):
215         * rendering/RenderBox.cpp:
216         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
217         * rendering/RenderFlexibleBox.cpp:
218         (WebCore::RenderFlexibleBox::isColumnFlow):
219         (WebCore::RenderFlexibleBox::isLeftToRightFlow):
220         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
221         (WebCore::RenderFlexibleBox::alignChildren):
222         * rendering/style/RenderStyle.h:
223         (WebCore::InheritedFlags::flexDirection):
224         (WebCore::InheritedFlags::isColumnFlexDirection):
225         (WebCore::InheritedFlags::setFlexDirection):
226         (WebCore::InheritedFlags::initialFlexDirection):
227         * rendering/style/RenderStyleConstants.h:
228         * rendering/style/StyleFlexibleBoxData.cpp:
229         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
230         (WebCore::StyleFlexibleBoxData::operator==):
231         * rendering/style/StyleFlexibleBoxData.h:
232
233 2011-12-13  Jon Lee  <jonlee@apple.com>
234
235         Enable notifications on Mac.
236
237         Reviewed by Sam Weinig.
238
239         * Configurations/FeatureDefines.xcconfig:
240
241 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
242
243         COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
244         https://bugs.webkit.org/show_bug.cgi?id=74327
245
246         Reviewed by Darin Adler.
247
248         Always use unsigned instead of bool and unsigned in the bitfields of RuleData to shrink
249         its size under MSVC.
250
251         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
252         in bitfields. e.g. if you have:
253         sturct AB {
254             unsigned m_1 : 31;
255             bool m_2 : 1;
256         }
257         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
258         only allocate sizeof(unsigned) * 1 for AB.
259
260         * css/CSSStyleSelector.cpp:
261         (WebCore::RuleData::RuleData):
262
263 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
264
265         NodeChildList shouldn't be in NodeListNodeData
266         https://bugs.webkit.org/show_bug.cgi?id=73969
267
268         Reviewed by Sam Weinig.
269
270         Move NodeChildList out of NodeListNodeData to separate it from the other node lists in order to
271         resolve the bug 73853. Unlike other DynamicNodeList, we don't need to invalidate NodeChildList
272         on ancestors when children change. Moving ChildNodeList out of NodeListNodeData makes this difference
273         apparent and makes DynamicNodeList::Caches in NodeListNodeData always held by a DynamicSubtreeNodeList,
274         eliminating the need for hasOwnCaches() checks in various places.
275
276         Also renamed the existing DynamicNodeList to DynamicSubtreeNodeList and re-introduced DynamicNodeList
277         from which DynamicSubtreeNodeList and ChildNodeList both inherit to share the code for itemWithName.
278
279         In addition, renamed registerDynamicNodeList and unregisterDynamicNodeList, which updates a counter for
280         TreeScope::hasNodeListCaches, to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList
281         respectively. They are no longer called by ChildNodeList in order to avoid walking up the DOM tree
282         inside invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged.
283
284         Test: fast/dom/childnode-item-after-itemname.html
285
286         * bindings/js/JSNodeListCustom.cpp:
287         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
288         * dom/ChildNodeList.cpp:
289         (WebCore::ChildNodeList::ChildNodeList):
290         (WebCore::ChildNodeList::length):
291         (WebCore::ChildNodeList::item):
292         (WebCore::ChildNodeList::nodeMatches):
293         * dom/ChildNodeList.h:
294         * dom/ClassNodeList.cpp:
295         (WebCore::ClassNodeList::ClassNodeList):
296         (WebCore::ClassNodeList::~ClassNodeList):
297         * dom/ClassNodeList.h:
298         * dom/ContainerNode.cpp:
299         (WebCore::ContainerNode::childrenChanged):
300         * dom/DynamicNodeList.cpp:
301         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
302         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
303         (WebCore::DynamicSubtreeNodeList::length):
304         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
305         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
306         (WebCore::DynamicSubtreeNodeList::item):
307         (WebCore::DynamicNodeList::itemWithName):
308         (WebCore::DynamicSubtreeNodeList::isDynamicNodeList):
309         (WebCore::DynamicSubtreeNodeList::invalidateCache):
310         (WebCore::DynamicSubtreeNodeList::Caches::Caches):
311         (WebCore::DynamicSubtreeNodeList::Caches::create):
312         (WebCore::DynamicSubtreeNodeList::Caches::reset):
313         * dom/DynamicNodeList.h:
314         (WebCore::DynamicNodeList::DynamicNodeList):
315         (WebCore::DynamicNodeList::~DynamicNodeList):
316         (WebCore::DynamicNodeList::node):
317         (WebCore::DynamicSubtreeNodeList::rootNode):
318         * dom/NameNodeList.cpp:
319         (WebCore::NameNodeList::NameNodeList):
320         (WebCore::NameNodeList::~NameNodeList):
321         * dom/NameNodeList.h:
322         * dom/Node.cpp:
323         (WebCore::Node::childNodes):
324         (WebCore::Node::registerDynamicSubtreeNodeList):
325         (WebCore::Node::unregisterDynamicSubtreeNodeList):
326         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
327         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
328         (WebCore::Node::removeCachedClassNodeList):
329         (WebCore::Node::removeCachedNameNodeList):
330         (WebCore::Node::removeCachedTagNodeList):
331         (WebCore::Node::removeCachedLabelsNodeList):
332         (WebCore::NodeListsNodeData::invalidateCaches):
333         (WebCore::NodeListsNodeData::isEmpty):
334         (WebCore::NodeRareData::clearChildNodeListCache):
335         * dom/Node.h:
336         * dom/NodeRareData.h:
337         (WebCore::NodeRareData::nodeLists):
338         (WebCore::NodeRareData::ensureChildNodeListCache):
339         * dom/TagNodeList.cpp:
340         (WebCore::TagNodeList::TagNodeList):
341         (WebCore::TagNodeList::~TagNodeList):
342         * dom/TagNodeList.h:
343         * html/LabelsNodeList.cpp:
344         (WebCore::LabelsNodeList::LabelsNodeList):
345         * html/LabelsNodeList.h:
346
347 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
348
349         Push more member functions from EditCommand to CompositeEditCommand
350         https://bugs.webkit.org/show_bug.cgi?id=74249
351
352         Reviewed by Enrica Casucci.
353
354         Moved startingRootEditableElement and endingRootEditableElement from EditCommand to EditCommandComposition,
355         and isTypingCommand, preservesTypingStyle, shouldRetainAutocorrectionIndicator,
356         setShouldRetainAutocorrectionIndicator, and shouldStopCaretBlinking from EditCommand to CompositeEditCommand.
357         Also removed EditCommand::updateLayout().
358
359         * editing/ApplyBlockElementCommand.cpp:
360         (WebCore::ApplyBlockElementCommand::doApply):
361         * editing/ApplyStyleCommand.cpp:
362         (WebCore::ApplyStyleCommand::applyBlockStyle):
363         (WebCore::ApplyStyleCommand::applyInlineStyle):
364         * editing/CompositeEditCommand.cpp:
365         (WebCore::EditCommandComposition::EditCommandComposition):
366         (WebCore::EditCommandComposition::setStartingSelection):
367         (WebCore::EditCommandComposition::setEndingSelection):
368         (WebCore::CompositeEditCommand::preservesTypingStyle):
369         (WebCore::CompositeEditCommand::isTypingCommand):
370         (WebCore::CompositeEditCommand::shouldRetainAutocorrectionIndicator):
371         (WebCore::CompositeEditCommand::setShouldRetainAutocorrectionIndicator):
372         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
373         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
374         (WebCore::CompositeEditCommand::moveParagraphs):
375         * editing/CompositeEditCommand.h:
376         (WebCore::EditCommandComposition::startingRootEditableElement):
377         (WebCore::EditCommandComposition::endingRootEditableElement):
378         (WebCore::CompositeEditCommand::shouldStopCaretBlinking):
379         * editing/DeleteSelectionCommand.cpp:
380         (WebCore::DeleteSelectionCommand::removeNode):
381         (WebCore::DeleteSelectionCommand::fixupWhitespace):
382         * editing/EditCommand.cpp:
383         (WebCore::EditCommand::apply):
384         (WebCore::EditCommand::unapply):
385         (WebCore::EditCommand::reapply):
386         (WebCore::EditCommand::setStartingSelection):
387         (WebCore::EditCommand::setEndingSelection):
388         (WebCore::EditCommand::setParent):
389         * editing/EditCommand.h:
390         (WebCore::EditCommand::isEditCommandComposition):
391         * editing/Editor.cpp:
392         (WebCore::dispatchEditableContentChangedEvents):
393         (WebCore::Editor::appliedEditing):
394         (WebCore::Editor::unappliedEditing):
395         (WebCore::Editor::reappliedEditing):
396         * editing/Editor.h:
397         (WebCore::Editor::lastEditCommand):
398         * editing/FrameSelection.cpp:
399         (WebCore::FrameSelection::updateAppearance):
400         * editing/IndentOutdentCommand.cpp:
401         (WebCore::IndentOutdentCommand::outdentParagraph):
402         * editing/InsertLineBreakCommand.cpp:
403         (WebCore::InsertLineBreakCommand::doApply):
404         * editing/InsertParagraphSeparatorCommand.cpp:
405         (WebCore::InsertParagraphSeparatorCommand::doApply):
406         * editing/TypingCommand.cpp:
407         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
408         * editing/TypingCommand.h:
409         (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator):
410
411 2011-12-14  Tony Chang  <tony@chromium.org>
412
413         Fix compile on gcc on Mac.
414
415         css/CSSStyleSelector.cpp:1254:166: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
416         css/CSSStyleSelector.cpp:1425:134: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
417
418         * css/CSSStyleSelector.cpp:
419         (WebCore::CSSStyleSelector::styleForElement):
420         (WebCore::CSSStyleSelector::pseudoStyleForElement):
421
422 2011-12-14  Brady Eidson  <beidson@apple.com>
423
424         <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
425         REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
426
427         Reviewed by Darin Adler.
428
429         Test: media/crash-closing-page-with-media-as-plugin-fallback.html
430
431         Switch HTMLPlugInImageElement from using document activation callbacks to using the ActiveDOMObject
432         mechanism which will prevent the unnecessary (and crashy) work at Document teardown:
433         * html/HTMLPlugInImageElement.cpp:
434         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
435         (WebCore::HTMLPlugInImageElement::canSuspend):
436         (WebCore::HTMLPlugInImageElement::suspend):
437         (WebCore::HTMLPlugInImageElement::resume):
438         * html/HTMLPlugInImageElement.h:
439
440 2011-12-14  Adrienne Walker  <enne@google.com>
441
442         [chromium] Compositor needs to set texture filtering on canvas layers
443         https://bugs.webkit.org/show_bug.cgi?id=74530
444
445         Reviewed by James Robinson.
446
447         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
448         (WebCore::CCCanvasLayerImpl::draw):
449
450 2011-12-14  Tony Chang  <tony@chromium.org>
451
452         Remove added calls to CSSStyleSelector to gain back another 2% in page cyclers
453         https://bugs.webkit.org/show_bug.cgi?id=74537
454
455         Reviewed by Ojan Vafai.
456
457         In r102234, calls to initForRegionStyling() were added in CSSStyleSelector.
458         There's still a 2% perf regression in chromium page cyclers, so try removing
459         these calls.
460
461         * css/CSSStyleSelector.cpp:
462         (WebCore::CSSStyleSelector::styleForElement):
463         (WebCore::CSSStyleSelector::pseudoStyleForElement):
464
465 2011-12-14  Jonathan Backer  <backer@chromium.org>
466
467         [chromium] Plumb through flag for enabling partial swap
468         https://bugs.webkit.org/show_bug.cgi?id=74513
469
470         Reviewed by James Robinson.
471
472         * page/Settings.h:
473         (WebCore::Settings::setPartialSwapEnabled):
474         (WebCore::Settings::partialSwapEnabled):
475         * platform/graphics/chromium/LayerRendererChromium.cpp:
476         (WebCore::LayerRendererChromium::initialize):
477         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
478         (WebCore::CCSettings::CCSettings):
479
480 2011-12-14  Mike Reed  <reed@google.com>
481
482         [skia] cache typeface in FontPlatformData
483         https://bugs.webkit.org/show_bug.cgi?id=74415
484
485         Reviewed by Stephen White.
486
487         No new tests. Existing tests apply, this is just an optimization
488         to avoid looking up the typeface on each drawText call.
489
490         * platform/graphics/chromium/FontChromiumWin.cpp:
491         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
492         (WebCore::Font::drawGlyphs):
493         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
494         (WebCore::createTypefaceFromHFont):
495         (WebCore::FontPlatformData::FontPlatformData):
496         (WebCore::FontPlatformData::operator=):
497         (WebCore::FontPlatformData::~FontPlatformData):
498         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
499         (WebCore::FontPlatformData::typeface):
500         (WebCore::FontPlatformData::lfQuality):
501         (WebCore::FontPlatformData::hash):
502         (WebCore::FontPlatformData::operator==):
503         * platform/graphics/skia/SkiaFontWin.cpp:
504         (WebCore::setupPaintForFont):
505         (WebCore::paintSkiaText):
506         * platform/graphics/skia/SkiaFontWin.h:
507
508 2011-12-14  Simon Fraser  <simon.fraser@apple.com>
509
510         Make -webkit-filter animatable
511         https://bugs.webkit.org/show_bug.cgi?id=68476
512
513         Reviewed by Chris Marrin.
514         
515         Add -webkit-filter to the list of CSS properties that are animatable. Animate
516         it like we do transforms, by looking for matching lists of filter functions.
517         Each kind of filter operation has a blend() method that handles blending
518         for that filter.
519
520         Test: css3/filters/filter-animation.html
521
522         * GNUmakefile.list.am: Add FilterOperation.cpp to the build.
523         * Target.pri: Ditto
524         * WebCore.gypi: Ditto
525         * WebCore.vcproj/WebCore.vcproj: Ditto
526         * WebCore.xcodeproj/project.pbxproj: Ditto
527         * page/animation/AnimationBase.cpp:
528         (WebCore::blendFunc): New blendFunc() for FilterOperations, which does per-filter blending.
529         (WebCore::AnimationBase::ensurePropertyMap): Make PropertyWrapper for filters.
530         (WebCore::AnimationBase::AnimationBase): Adjust initialization order.
531         * page/animation/AnimationBase.h: Adjusted the member variable order to minimize padding.
532         (WebCore::AnimationBase::filterFunctionListsMatch): Accessor for the flag.
533         * page/animation/ImplicitAnimation.cpp:
534         (WebCore::ImplicitAnimation::reset):
535         (WebCore::ImplicitAnimation::validateTransformFunctionList): Adjust comment. The "is valid" terminology is confusing.
536         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
537         of filter functions.
538         * page/animation/ImplicitAnimation.h:
539         * page/animation/KeyframeAnimation.cpp:
540         (WebCore::KeyframeAnimation::KeyframeAnimation):
541         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
542         of filter functions.
543         * page/animation/KeyframeAnimation.h:
544         * rendering/style/FilterOperation.cpp: Added.
545         (WebCore::BasicColorMatrixFilterOperation::blend):
546         (WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
547         (WebCore::BasicComponentTransferFilterOperation::blend):
548         (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Different filters have
549         different values for m_amount for the "passthrough" behavior. This method returns the appropriate value.
550         (WebCore::GammaFilterOperation::blend):
551         (WebCore::BlurFilterOperation::blend):
552         (WebCore::DropShadowFilterOperation::blend):
553         * rendering/style/FilterOperation.h:
554         (WebCore::FilterOperation::blend):
555         (WebCore::PassthroughFilterOperation::create): New "no-op" filter.
556         (WebCore::PassthroughFilterOperation::operator==):
557         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
558         * rendering/style/FilterOperations.cpp:
559         (WebCore::FilterOperations::operationsMatch):
560         * rendering/style/FilterOperations.h:
561
562 2011-12-14  Adam Klein  <adamk@chromium.org>
563
564         Broaden support for mutation observation of attributes
565         https://bugs.webkit.org/show_bug.cgi?id=74448
566
567         Reviewed by Ryosuke Niwa.
568
569         The previously-landed MutationObserver support for attributes was incomplete:
570         it didn't support mutations related to Attr nodes (methods on Attrs,
571         setAttributeNode/removeAttributeNode on Element, or methods on NamedNodeMap).
572
573         This patch adds full support of mutation observation for all these cases,
574         and adds test cases for all these situations.
575
576         * dom/Attr.cpp:
577         (WebCore::Attr::setValue): Enqueue a mutation record when Attr.value is set from JS.
578         (WebCore::Attr::childrenChanged): Enqueue a mutation record when an Attr's value
579         changes to due additions/removals of Text children.
580         * dom/Element.cpp:
581         (WebCore::Element::enqueueAttributesMutationRecordIfRequested): Previously a static,
582         expose as part of Element's interface to allow it to be re-used by NamedNodeMap and Attr.
583         (WebCore::Element::removeAttribute): Remove enqueue call now handled by NamedNodeMap.
584         (WebCore::Element::setAttributeInternal): Fixup call of enqueueAttributesMutationRecordIfRequested.
585         * dom/Element.h:
586         * dom/NamedNodeMap.cpp:
587         (WebCore::NamedNodeMap::setNamedItem): Enqueue a mutation record when an attribute
588         is changed via Element.attributes.setNamedItem from JS.
589         (WebCore::NamedNodeMap::removeNamedItem): Enqueue a mutation record when an
590         attribute is removed, either via Element.attributes.removeNamedItem or Element.removeAttribute.
591
592 2011-12-14  Raymond Toy  <rtoy@google.com>
593
594         * platform/audio/Distance.h (WebCore): 
595
596         Incorrect calculation for DistanceEffect linearGain
597         https://bugs.webkit.org/show_bug.cgi?id=72871
598
599         Reviewed by Kenneth Russell.
600
601         Tests still need to be written for all distance models.  This
602         does not add a new API and just corrects an implementation error. 
603
604         * platform/audio/Distance.cpp:
605         (WebCore::DistanceEffect::linearGain): Implement correct
606         linearGain function.  (Fix proposed by davidgaleano@hotmail.com.)
607         * platform/audio/Distance.h: Add link to Open AL specification. 
608         
609
610 2011-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
611
612         Web Inspector: consider disabling network tracking while running the CPU profile.
613         https://bugs.webkit.org/show_bug.cgi?id=74221
614
615         The WebCore instrumentation on the backend affects the performance of inspected page.
616         As the result the CPU profiler's stats data are far away from the reality.
617         Solution: the profiler code will temporary disable the resource tracking on backend.
618         Side effect: the resource tree gets out of sinc because it uses Network Agent's notifications for updating the resource tree.
619         Solution: NetworkManager will report about the changes of the resource tracking state and ResourcePanel will re-fetch the resources tree.
620
621         Reviewed by Pavel Feldman.
622
623         * inspector/front-end/NetworkManager.js:
624         (WebInspector.NetworkManager.prototype.enableResourceTracking.networkAgentEnabled):
625         (WebInspector.NetworkManager.prototype.enableResourceTracking):
626         (WebInspector.NetworkManager.prototype.disableResourceTracking.networkAgentDisabled):
627         (WebInspector.NetworkManager.prototype.disableResourceTracking):
628         (WebInspector.NetworkManager.prototype.inflightResourceForURL):
629         * inspector/front-end/ProfileView.js:
630         (WebInspector.CPUProfileType.prototype.buttonClicked):
631         * inspector/front-end/ResourceTreeModel.js:
632         (WebInspector.ResourceTreeModel):
633         (WebInspector.ResourceTreeModel.prototype._onResourceTrackingEnabled):
634
635 2011-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
636
637         [GTK] Fix PlatformScreen::screenAvailableRect when there's no view widget
638         https://bugs.webkit.org/show_bug.cgi?id=74520
639
640         Reviewed by Martin Robinson.
641
642         Use the default screen to get the available screen area instead of
643         just returning an empty rectangle. This is useful for WebKit2,
644         since there's no view widget in the web process.
645
646         * platform/gtk/PlatformScreenGtk.cpp:
647         (WebCore::screenAvailableRect):
648
649 2011-12-14  Eric Carlson  <eric.carlson@apple.com>
650
651         Media url with fragment may not load
652         https://bugs.webkit.org/show_bug.cgi?id=74443
653
654         Reviewed by Darin Adler.
655
656         Test: media/media-extension-with-fragment.html
657
658         * html/HTMLMediaElement.cpp:
659         (WebCore::HTMLMediaElement::loadResource): Pass the KURL to MediaPlayer, let it extract a
660             String when it needs it.
661
662         * platform/graphics/MediaPlayer.cpp:
663         (WebCore::MediaPlayer::load): Take a KURL, not a String. Look for the file extension in the 
664             last path component so we don't examine fragments and/or queries.
665         * platform/graphics/MediaPlayer.h:
666
667 2011-12-14  Jacky Jiang  <zhajiang@rim.com>
668
669         [BlackBerry] Remove some duplicate entries in Source/WebCore/PlatformBlackBerry.cmake
670         https://bugs.webkit.org/show_bug.cgi?id=74484
671
672         Reviewed by Daniel Bates.
673
674         Trivial fix, so no new tests.
675
676         * PlatformBlackBerry.cmake:
677
678 2011-12-14  Anders Carlsson  <andersca@apple.com>
679
680         Add back the callOnMainThread overload that takes a WTF::Function
681         https://bugs.webkit.org/show_bug.cgi?id=74512
682
683         Reviewed by Darin Adler.
684
685         Explicitly qualify the Function enum flag, since MSVC2005 is too stupid to disambiguate
686         the Function class template and the enum flag.
687
688         * bindings/js/JSDOMWindowCustom.cpp:
689         (WebCore::JSDOMWindow::getOwnPropertySlot):
690         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
691         * bindings/js/JSHistoryCustom.cpp:
692         (WebCore::JSHistory::getOwnPropertySlotDelegate):
693         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
694         * bindings/js/JSLocationCustom.cpp:
695         (WebCore::JSLocation::getOwnPropertySlotDelegate):
696         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
697
698 2011-12-14  Kenneth Russell  <kbr@google.com>
699
700         Unreviewed, rolling out r102688.
701         http://trac.webkit.org/changeset/102688
702         https://bugs.webkit.org/show_bug.cgi?id=74220
703
704         Under the hypothesis that it might be the cause of
705         browser_tests and ui_tests crashes on Chromium canaries --
706         will reland if not.
707
708         * bindings/v8/V8Proxy.cpp:
709         (WebCore::addMessageToConsole):
710         (WebCore::logInfo):
711         (WebCore::V8Proxy::reportUnsafeAccessTo):
712         * bindings/v8/V8Proxy.h:
713         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
714         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
715
716 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
717
718         Web Inspector: DatabaseTableView should escape table name.
719         https://bugs.webkit.org/show_bug.cgi?id=74503
720
721         Reviewed by Pavel Feldman.
722
723         Test: inspector/database-table-name-excaping.html
724
725         * inspector/front-end/DatabaseTableView.js:
726         (WebInspector.DatabaseTableView.prototype._escapeTableName):
727         (WebInspector.DatabaseTableView.prototype.update):
728
729 2011-12-14  Philippe Normand  <pnormand@igalia.com>
730
731         [GStreamer] padTemplate leak in webkitwebaudiosrc
732         https://bugs.webkit.org/show_bug.cgi?id=74495
733
734         Reviewed by Martin Robinson.
735
736         Use a GstPadTemplate smart pointer in webkit_web_audio_src_init to
737         avoid a memory leak after the ghost pad creation.
738
739         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
740         (webkit_web_audio_src_init):
741         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
742         (WTF::adoptGRef):
743         (WTF::GstPadTemplate):
744         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
745
746 2011-12-14  Julien Chaffraix  <jchaffraix@webkit.org>
747
748         Crash in RenderBox::paintBoxDecorations when documentElement has no renderer
749         https://bugs.webkit.org/show_bug.cgi?id=64284
750
751         Reviewed by Ryosuke Niwa.
752
753         Test: fast/dynamic/crash-paint-no-documentElement-renderer.html
754
755         * rendering/RenderBox.cpp:
756         (WebCore::RenderBox::paintBackground): Check the documentElement's
757         renderer before using it which matches what RenderView does.
758
759 2011-12-14  Tom Sepez  <tsepez@chromium.org>
760
761         DocumentLoader should ref its mainResourceLoader.
762         https://bugs.webkit.org/show_bug.cgi?id=74424
763
764         Reviewed by Adam Barth.
765
766         Tests: platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html
767                platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked.html
768
769         * loader/DocumentLoader.cpp:
770         (WebCore::DocumentLoader::startLoadingMainResource):
771         * loader/MainResourceLoader.cpp:
772         (WebCore::MainResourceLoader::loadNow):
773
774 2011-12-14  Stephen White  <senorblanco@chromium.org>
775
776         CSS Filters should support GPU acceleration
777         https://bugs.webkit.org/show_bug.cgi?id=74441
778
779         Reviewed by Darin Adler.
780
781         Will be covered by existing CSS filters tests, when run in GPU mode.
782
783         * rendering/FilterEffectRenderer.cpp:
784         (WebCore::FilterEffectRenderer::prepare):
785         * rendering/RenderLayer.cpp:
786         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
787
788 2011-12-14  Brian Salomon  <bsalomon@google.com>
789
790         [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
791         https://bugs.webkit.org/show_bug.cgi?id=73953
792
793         Reviewed by Stephen White.
794
795         Tested by existing canvas2d layout tests.
796
797         * platform/graphics/skia/ImageBufferSkia.cpp:
798         (WebCore::putImageData):
799         (WebCore::ImageBuffer::putUnmultipliedImageData):
800         (WebCore::ImageBuffer::putPremultipliedImageData):
801
802 2011-12-14  Mary Wu  <mary.wu@torchmobile.com.cn>
803
804         Remove SharedBufferBlackBerry.cpp from WebCore/platform/blackberry
805         https://bugs.webkit.org/show_bug.cgi?id=74488
806
807         Reviewed by Rob Buis.
808
809         Remove dead code, no new tests.
810
811         * platform/blackberry/SharedBufferBlackBerry.cpp: Removed.
812
813 2011-12-14  Kentaro Hara  <haraken@chromium.org>
814
815         Use [Supplemental] IDL in WebSocket
816         https://bugs.webkit.org/show_bug.cgi?id=74160
817
818         Reviewed by Adam Barth.
819
820         By using the [Supplemental] IDL, this patch moves declarations of WebSocket
821         attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
822         which helps make WebSocket a self-contained module.
823
824         No new tests, no change in behavior.
825         Confirm that http/tests/websocket/* pass.
826
827         * WebCore.gypi: Added DOMWindowWebSocket.idl.
828         * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
829         * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
830
831 2011-12-14  Pierre Rossi  <pierre.rossi@gmail.com>
832
833         Unreviewed fix. Broke qt minimal release compilation.
834
835         * platform/qt/RenderThemeQtMobile.cpp:
836
837 2011-12-14  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
838
839         Add different salt to different types of selectors. So the CSS fast
840         path can tell the different between tags and class attributes with
841         otherwise identical values.
842         https://bugs.webkit.org/show_bug.cgi?id=74284
843
844         Reviewed by Antti Koivisto.
845
846         * css/SelectorChecker.cpp:
847         (WebCore::collectElementIdentifierHashes):
848         (WebCore::collectDescendantSelectorIdentifierHashes):
849         * css/SelectorChecker.h:
850
851 2011-12-14  Pierre Rossi  <pierre.rossi@gmail.com>
852
853         [Qt] Mobile theme could use a little refresh
854         https://bugs.webkit.org/show_bug.cgi?id=74293
855
856         The look and feel of the "mobile theme" we're
857         using in QtWebKit dates back to the maemo 5 days.
858         This is an attempt at making it look less out of
859         place, and also support progress and range.
860
861         Reviewed by Kenneth Rohde Christiansen.
862
863         No new tests, this is still not the default theme
864         for tests.
865
866         * DerivedSources.pri:
867         * css/mobileThemeQt.css: Added.
868         (input[type="submit"], select):
869         (input[type="submit"]:disabled, input[type="submit"]:disabled:active, select:disabled, input[type="text"]:disabled):
870         (input[type="submit"]:active):
871         * platform/qt/RenderThemeQt.cpp:
872         (WebCore::RenderThemeQt::extraDefaultStyleSheet):
873         (WebCore::StylePainter::StylePainter):
874         (WebCore::StylePainter::init):
875         (WebCore::StylePainter::~StylePainter):
876         * platform/qt/RenderThemeQt.h:
877         * platform/qt/RenderThemeQtMobile.cpp:
878         (WebCore::drawRectangularControlBackground):
879         (WebCore::shrinkRectToSquare):
880         (WebCore::StylePainterMobile::StylePainterMobile):
881         (WebCore::StylePainterMobile::~StylePainterMobile):
882         (WebCore::StylePainterMobile::drawCheckableBackground):
883         (WebCore::StylePainterMobile::sizeForPainterScale):
884         (WebCore::StylePainterMobile::drawChecker):
885         (WebCore::StylePainterMobile::findCheckBox):
886         (WebCore::StylePainterMobile::drawRadio):
887         (WebCore::StylePainterMobile::findRadio):
888         (WebCore::StylePainterMobile::drawMultipleComboButton):
889         (WebCore::StylePainterMobile::drawSimpleComboButton):
890         (WebCore::StylePainterMobile::getButtonImageSize):
891         (WebCore::StylePainterMobile::findComboButton):
892         (WebCore::StylePainterMobile::drawLineEdit):
893         (WebCore::StylePainterMobile::drawCheckBox):
894         (WebCore::StylePainterMobile::drawRadioButton):
895         (WebCore::StylePainterMobile::drawPushButton):
896         (WebCore::StylePainterMobile::drawComboBox):
897         (WebCore::StylePainterMobile::drawProgress):
898         (WebCore::StylePainterMobile::drawSliderThumb):
899         (WebCore::RenderThemeQtMobile::paintButton):
900         (WebCore::RenderThemeQtMobile::paintTextField):
901         (WebCore::RenderThemeQtMobile::setPopupPadding):
902         (WebCore::RenderThemeQtMobile::paintMenuList):
903         (WebCore::RenderThemeQtMobile::paintMenuListButton):
904         (WebCore::RenderThemeQtMobile::animationDurationForProgressBar):
905         (WebCore::RenderThemeQtMobile::paintProgressBar):
906         (WebCore::RenderThemeQtMobile::paintSliderTrack):
907         (WebCore::RenderThemeQtMobile::paintSliderThumb):
908         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
909         * platform/qt/RenderThemeQtMobile.h:
910
911 2011-12-14  Rakesh KN  <rakesh.kn@motorola.com>
912
913         [Non-Mac] Change event should be fired when changing option by using keyboard.
914         https://bugs.webkit.org/show_bug.cgi?id=74384
915
916         Reviewed by Kent Tamura.
917
918         Fire onchange event when option is changed using up/down/right/left/pageup/pagedown/home/end keys.
919
920         Test: fast/forms/select/menulist-onchange-fired-with-key-up-down.html
921
922         * html/HTMLSelectElement.cpp:
923         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
924         Setting the DispatchChangeEvent selection option flag when the option is selected using
925         up/down/right/left/pageup/pagedown/home/end keys.
926
927 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
928
929         Web Inspector: TreeOutline's is broken when li elements have padding-left different from 14px.
930         https://bugs.webkit.org/show_bug.cgi?id=74445
931
932         Reviewed by Pavel Feldman.
933
934         * inspector/front-end/treeoutline.js:
935         (TreeElement.prototype.isEventWithinDisclosureTriangle):
936
937 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
938
939         Web Inspector: [Regression] Scripts panel debug sidebar toolbar should not be scrolled out of the screen.
940         https://bugs.webkit.org/show_bug.cgi?id=74447
941
942         Reviewed by Pavel Feldman.
943
944         * inspector/front-end/ScriptsPanel.js:
945         (WebInspector.ScriptsPanel.prototype.wasShown):
946         * inspector/front-end/scriptsPanel.css:
947         (#scripts-debug-toolbar):
948         (#scripts-debug-sidebar-contents):
949
950 2011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
951
952         [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
953         https://bugs.webkit.org/show_bug.cgi?id=74417
954
955         Reviewed by Simon Hausmann.
956
957         Based on original patch by Kenneth Christiansen.
958
959         Already covered by current tests.
960
961         * dom/DeviceOrientationController.h:
962         (WebCore::DeviceOrientationController::client):
963
964 2011-12-14  Jacky Jiang  <zhajiang@rim.com>
965
966         [BlackBerry] Switch to libjpeg for decoding
967         https://bugs.webkit.org/show_bug.cgi?id=74475
968
969         Reviewed by Daniel Bates.
970
971         Switch to cross platform JPEG image decoder for decoding as this keeps
972         us inline with other ports and less to maintain.
973
974         * PlatformBlackBerry.cmake:
975
976 2011-12-03  Philippe Normand  <pnormand@igalia.com>
977
978         [GTK] Bad text rendering since r101343
979         https://bugs.webkit.org/show_bug.cgi?id=73744
980
981         Reviewed by Martin Robinson.
982
983         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
984         (WebCore::setCairoFontOptionsFromFontConfigPattern): Keep Cairo
985         hint metrics unchanged for better visual font rendering results.
986
987 2011-12-13  Hajime Morrita  <morrita@chromium.org>
988
989         Unreviewed attempt for fixing windows build.
990
991         - Included <wtf/MathExtras.h> which defined portable version of lround().
992         - Add some static_cast<> to suppress warnings.
993
994         * platform/animation/AnimationUtilities.h:
995         (WebCore::blend):
996
997 2011-12-13  Wei Charles  <charles.wei@torchmobile.com.cn>
998
999         [BlackBerry] Add the new plugin files into the build system.
1000         https://bugs.webkit.org/show_bug.cgi?id=74483
1001
1002         Reviewed by Daniel Bates.
1003
1004         No new tests, just add new files to the build system.
1005
1006         * PlatformBlackBerry.cmake:
1007
1008 2011-12-13  Yosifumi Inoue  <yosin@chromium.org>
1009
1010         [Forms] Default selection of select(menulist) should not be disabled
1011         https://bugs.webkit.org/show_bug.cgi?id=74270
1012
1013         Reviewed by Kent Tamura.
1014
1015         This patch changes default selection of select(menulist) element to
1016           1. Selected option element. If there are multiple options which have
1017              selected state, we pick the largest index option up. (same as current)
1018           2. Non-disabled option element (new behavior)
1019           3. The first option if all options are disabled. (new behavior)
1020
1021         Tests: fast/forms/select/menulist-disabled-option-expected.html
1022                fast/forms/select/menulist-disabled-option.html
1023
1024         * html/HTMLSelectElement.cpp:
1025         (WebCore::HTMLSelectElement::recalcListItems): Implement new logic for selection.
1026
1027 2011-12-13  Simon Fraser  <simon.fraser@apple.com>
1028
1029         Share blend progress code
1030         https://bugs.webkit.org/show_bug.cgi?id=74464
1031
1032         Reviewed by Dean Jackson.
1033         
1034         Lots of places in the code had copies of the animation interpolation
1035         logic "from + (to - from) * progress", in various forms.
1036         
1037         Coalesce all these into calls to a few new inline functions in a new
1038         AnimationUtilities.h header. Color and Length get their own blend fuctions
1039         in their respective headers.
1040
1041         Covered by existing tests.
1042
1043         * GNUmakefile.list.am:
1044         * Target.pri:
1045         * WebCore.gypi:
1046         * WebCore.vcproj/WebCore.vcproj:
1047         * WebCore.xcodeproj/project.pbxproj:
1048         * css/CSSGradientValue.cpp:
1049         * page/animation/AnimationBase.cpp:
1050         (WebCore::blendFunc):
1051         * platform/Length.h:
1052         (WebCore::Length::blend):
1053         * platform/animation/AnimationUtilities.h: Added.
1054         (WebCore::blend):
1055         * platform/graphics/Color.h:
1056         (WebCore::blend):
1057         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1058         (WebCore::PerspectiveTransformOperation::blend):
1059         * platform/graphics/transforms/RotateTransformOperation.cpp:
1060         (WebCore::RotateTransformOperation::blend):
1061         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1062         (WebCore::ScaleTransformOperation::blend):
1063         * platform/graphics/transforms/SkewTransformOperation.cpp:
1064         (WebCore::SkewTransformOperation::blend):
1065         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1066         (WebCore::TranslateTransformOperation::blend):
1067         * svg/SVGLength.h:
1068         (WebCore::SVGLength::blend):
1069         * svg/SVGPathBlender.cpp:
1070         (WebCore::blendFloatPoint):
1071         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
1072         (WebCore::SVGPathBlender::blendArcToSegment):
1073
1074 2011-12-13  Mary Wu  <mary.wu@torchmobile.com.cn>
1075
1076         Upstream 3 files into WebCore/platform/blackberry
1077         ClipboardBlackBerry.cpp/h, PasteboardBlackBerry.cpp
1078         https://bugs.webkit.org/show_bug.cgi?id=74381
1079
1080         Reviewed by Rob Buis.
1081
1082         Main contributor:
1083         Mike Fenton <mifenton@rim.com>
1084
1085         Initial upstream, no new tests.
1086
1087         * platform/blackberry/ClipboardBlackBerry.cpp: Added.
1088         * platform/blackberry/ClipboardBlackBerry.h: Added.
1089         * platform/blackberry/PasteboardBlackBerry.cpp: Added.
1090
1091 2011-12-13  James Robinson  <jamesr@chromium.org>
1092
1093         Unreviewed, rolling out r102726.
1094         http://trac.webkit.org/changeset/102726
1095         https://bugs.webkit.org/show_bug.cgi?id=74154
1096
1097         Does not compile on clang
1098
1099         * platform/graphics/chromium/TiledLayerChromium.cpp:
1100         (WebCore::UpdatableTile::UpdatableTile):
1101         (WebCore::TiledLayerChromium::createTile):
1102         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1103         (WebCore::CCLayerTilingData::addTile):
1104         (WebCore::CCLayerTilingData::takeTile):
1105         (WebCore::CCLayerTilingData::tileAt):
1106         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1107         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1108         (WebCore::DrawableTile::DrawableTile):
1109         (WebCore::CCTiledLayerImpl::createTile):
1110
1111 2011-12-13  Hajime Morrita  <morrita@chromium.org>
1112
1113         Unreviewed, rolling out r102732.
1114         http://trac.webkit.org/changeset/102732
1115
1116         The last fix makes no sense...
1117
1118         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1119
1120 2011-12-13  Hajime Morrita  <morrita@chromium.org>
1121
1122         HTML details summary not working with form controls
1123         https://bugs.webkit.org/show_bug.cgi?id=74398
1124
1125         Reviewed by Kent Tamura.
1126
1127         Allowed HTMLSummaryElement to skip the toggle logic if the event
1128         target is a form control.
1129
1130         Test: fast/html/details-click-controls.html
1131
1132         * html/HTMLSummaryElement.cpp:
1133         (WebCore::isClickableControl):
1134         (WebCore::HTMLSummaryElement::defaultEventHandler):
1135
1136 2011-12-13  James Wei <james.wei@intel.com> 
1137
1138         Optimize to not use pow() in the inner loop in AudioParamTimeline
1139         https://bugs.webkit.org/show_bug.cgi?id=73530
1140
1141         Reviewed by Kenneth Russell.
1142
1143         No new tests.
1144
1145         * webaudio/AudioParamTimeline.cpp:
1146         (WebCore:AudioParamTimeline:valuesForTimeRangeImpl):
1147
1148 2011-12-13  Hajime Morrita  <morrita@chromium.org>
1149
1150         Unreviewed Chromium-Mac build fix trial.
1151
1152         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1153
1154 2011-12-13  David Reveman  <reveman@chromium.org>
1155
1156         [Chromium] Initialize Settings::m_perTileDrawingEnabled properly.
1157         https://bugs.webkit.org/show_bug.cgi?id=74476
1158
1159         Reviewed by James Robinson.
1160
1161         Add m_perTileDrawingEnabled(false) to WebCore::Settings initialize list.
1162
1163         No new tests.
1164
1165         * page/Settings.cpp:
1166         (WebCore::Settings::Settings):
1167
1168 2011-12-13  Anders Carlsson  <andersca@apple.com>
1169
1170         Add a very bare-bones implementation of bind and Function to WTF
1171         https://bugs.webkit.org/show_bug.cgi?id=74462
1172
1173         Reviewed by Sam Weinig.
1174
1175         Add a forwarding header for Functional.h.
1176
1177         * ForwardingHeaders/wtf/Functional.h: Added.
1178
1179 2011-12-13  Adrienne Walker  <enne@google.com>
1180
1181         [chromium] Use HashMap<..., OwnPtr<Tile>> for compositor tilemap
1182         https://bugs.webkit.org/show_bug.cgi?id=74154
1183
1184         Reviewed by James Robinson.
1185
1186         After r102410 landed, it's now possible to properly use an OwnPtr to
1187         store tiles rather than hackily use a RefPtr.
1188
1189         Covered by the compositing/ layout tests.
1190
1191         * platform/graphics/chromium/TiledLayerChromium.cpp:
1192         (WebCore::UpdatableTile::create):
1193         (WebCore::UpdatableTile::UpdatableTile):
1194         (WebCore::TiledLayerChromium::createTile):
1195         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1196         (WebCore::CCLayerTilingData::addTile):
1197         (WebCore::CCLayerTilingData::takeTile):
1198         (WebCore::CCLayerTilingData::tileAt):
1199         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1200         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1201         (WebCore::DrawableTile::create):
1202         (WebCore::DrawableTile::DrawableTile):
1203         (WebCore::CCTiledLayerImpl::createTile):
1204
1205 2011-12-13  Dmitry Lomov  <dslomov@google.com>
1206
1207         https://bugs.webkit.org/show_bug.cgi?id=73691
1208         [JSC] Implement correct order of window.postMessage arguments.
1209         This change supports a new signature of windowPostMessage:
1210           postMessage(message, targetOrigin[, transferrables])
1211         as well as the legacy webkit-proprietary:
1212           postMessage(message, [transferrables,] targetOrigin)
1213         The latter is only supported for cases when targetOrigin is a String.
1214
1215         Reviewed by David Levin.
1216
1217         * bindings/js/JSDOMWindowCustom.cpp:
1218         (WebCore::handlePostMessage):
1219         * page/DOMWindow.idl:
1220
1221 2011-12-13  Rafael Weinstein  <rafaelw@chromium.org>
1222
1223         [MutationObservers] Avoid allocations if no observers are present
1224         https://bugs.webkit.org/show_bug.cgi?id=74423
1225
1226         Reviewed by Ojan Vafai.
1227
1228         This patch adds Node::mayHaveMutationObserversOfType which can be used to check
1229         if there are any observers at all which could receive a give type of mutation.
1230         MutationObserverInterestGroup uses this to possibly exit early (returning
1231         null) if no observers are present.
1232
1233         No tests needed. This patch is just a refactor.
1234
1235         * css/CSSMutableStyleDeclaration.cpp:
1236         * dom/CharacterData.cpp:
1237         (WebCore::CharacterData::dispatchModifiedEvent):
1238         * dom/ChildListMutationScope.cpp:
1239         (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel):
1240         * dom/Element.cpp:
1241         (WebCore::enqueueAttributesMutationRecord):
1242         * dom/Node.cpp:
1243         (WebCore::Node::mayHaveMutationObserversOfType):
1244         * dom/Node.h:
1245         * dom/WebKitMutationObserver.cpp:
1246         (WebCore::MutationObserverInterestGroup::createIfNeeded):
1247         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
1248         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
1249         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
1250         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
1251         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
1252         * dom/WebKitMutationObserver.h:
1253
1254 2011-12-13  Robin Dunn  <robin@alldunn.com>
1255
1256         Don't make the bitmap transparent when using theme drawing
1257         calls that don't support transparent bitmaps.
1258         https://bugs.webkit.org/show_bug.cgi?id=74319
1259
1260         Reviewed by Kevin Ollivier.
1261
1262         * platform/wx/LocalDC.h:
1263         (WebCore::LocalDC::LocalDC):
1264         * platform/wx/RenderThemeWx.cpp:
1265         (WebCore::RenderThemeWx::paintButton):
1266
1267 2011-12-13  Tony Chang  <tony@chromium.org>
1268
1269         Inline all of initForRegionStyling except for the rarely used part for non-null regions.
1270         https://bugs.webkit.org/show_bug.cgi?id=74435
1271
1272         Reviewed by Andreas Kling.
1273
1274         * css/CSSStyleSelector.cpp:
1275         (WebCore::CSSStyleSelector::initForRegionStyling): Inline setting of m_regionForStyling
1276         (WebCore::CSSStyleSelector::initRegionRules): Move code that only
1277         applies to CSSRegions into non-inlined code.
1278         * css/CSSStyleSelector.h:
1279
1280 2011-12-13  James Simonsen  <simonjam@chromium.org>
1281
1282         Unreviewed, Chromium Mac build fix.
1283
1284         * page/PerformanceTiming.h:
1285
1286 2011-12-13  Adam Klein  <adamk@chromium.org>
1287
1288         Update variable names in NamedNodeMap methods to match WebKit style
1289         https://bugs.webkit.org/show_bug.cgi?id=74437
1290
1291         Reviewed by Ojan Vafai.
1292
1293         While reading these methods in preparation for a refactor, I found
1294         them hard to understand due to short or confusing variable names.
1295         I think the new names are much clearer, and match WebKit style.
1296
1297         * dom/NamedNodeMap.cpp:
1298         (WebCore::NamedNodeMap::setNamedItem):
1299         (WebCore::NamedNodeMap::removeNamedItem):
1300
1301 2011-12-13  Xingnan Wang  <xingnan.wang@intel.com>
1302
1303         Implement a function of vector multiply with SSE2 optimization in VectorMath.cpp.
1304         https://bugs.webkit.org/show_bug.cgi?id=74048
1305
1306         Reviewed by Benjamin Poulain.
1307
1308         The vmul is a function for an element-by-element multiply of two float vectors and we 
1309         get about 3.4x performance improvement with SSE2 optimization compared with the common 
1310         multiply.
1311
1312         Use vmul in AudioBus::copyWithSampleAccurateGainValuesFrom().
1313
1314         * platform/audio/AudioBus.cpp:
1315         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
1316         * platform/audio/VectorMath.cpp:
1317         (WebCore::VectorMath::vmul):
1318         * platform/audio/VectorMath.h:
1319
1320 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
1321
1322         Web Inspector: [Regression] ResourceHeadersView sections should be expanded by default.
1323         https://bugs.webkit.org/show_bug.cgi?id=74434
1324
1325         Reviewed by Pavel Feldman.
1326
1327         * inspector/front-end/treeoutline.js:
1328
1329 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
1330
1331         Web Inspector: Network item view does not correctly decode "+" in request parameters.
1332         https://bugs.webkit.org/show_bug.cgi?id=74422
1333
1334         Reviewed by Pavel Feldman.
1335
1336         Test: http/tests/inspector/network/request-parameters-decoding.html
1337
1338         * inspector/front-end/ResourceHeadersView.js:
1339         (WebInspector.ResourceHeadersView.prototype._formatParameter):
1340         (WebInspector.ResourceHeadersView.prototype._refreshParms):
1341
1342 2011-12-13  Alok Priyadarshi  <alokp@chromium.org>
1343
1344         [chromium] compositing/masks layout tests fail with accelerated drawing
1345         https://bugs.webkit.org/show_bug.cgi?id=72760
1346
1347         Reviewed by Stephen White.
1348
1349         Accelerated drawing path used to render bottom-up upright textures, which was opposite of what the software path rendered.
1350         The textures produced by the accelerated path was flipped along Y in the shader to make it upside down as expected by the compositor.
1351         This strategy does not work in case of masks which do not go through a shader and hence do not get flipped,
1352         which results in a case where texture in the render surface is top-down, while that in the mask is bottom-up.
1353         This patch makes accelerated drawing path render textures in the same orientation as the software path.
1354         LayerTextureUpdater::Orientation was added to support the difference in texture orientation between software and accelerated paths.
1355         Now that both paths produce textures in the same orientation, there is no need for it.
1356
1357         No new tests needed. Covered by existing compositing tests.
1358
1359         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1360         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1361         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1362         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
1363         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
1364         * platform/graphics/chromium/ImageLayerChromium.cpp:
1365         * platform/graphics/chromium/LayerTextureUpdater.h:
1366         * platform/graphics/chromium/TiledLayerChromium.cpp:
1367         (WebCore::TiledLayerChromium::TiledLayerChromium):
1368         (WebCore::TiledLayerChromium::setLayerTreeHost):
1369         (WebCore::TiledLayerChromium::pushPropertiesTo):
1370         * platform/graphics/chromium/TiledLayerChromium.h:
1371         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1372         (WebCore::CCTiledLayerImpl::drawTiles):
1373         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1374         (WebCore::CCTiledLayerImpl::setSkipsDraw):
1375
1376 2011-12-09  Zhenyao Mo  <zmo@google.com>
1377
1378         Implement GLES2 CheckFramebufferStatus() behavior
1379         https://bugs.webkit.org/show_bug.cgi?id=74228
1380
1381         Reviewed by Kenneth Russell.
1382
1383         * html/canvas/WebGLFramebuffer.cpp:
1384         (WebCore::WebGLFramebuffer::getColorBufferWidth): Add ColorBuffer to the function name - this is more accurate.
1385         (WebCore::WebGLFramebuffer::getColorBufferHeight): Ditto.
1386         (WebCore::WebGLFramebuffer::checkStatus): Implement full semantics of GLES2 glCheckFramebufferStatus().
1387         (WebCore::WebGLFramebuffer::onAccess): Call checkStatus().
1388         * html/canvas/WebGLFramebuffer.h:
1389         * html/canvas/WebGLRenderingContext.cpp:
1390         (WebCore::WebGLRenderingContext::checkFramebufferStatus): Call checkStatus().
1391         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): No longer check framebuffer status.
1392         (WebCore::WebGLRenderingContext::getBoundFramebufferWidth): Call getColorBufferWidth.
1393         (WebCore::WebGLRenderingContext::getBoundFramebufferHeight): Call getColorBufferHeight.
1394
1395 2011-12-13  James Simonsen  <simonjam@chromium.org>
1396
1397         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
1398         https://bugs.webkit.org/show_bug.cgi?id=58354
1399
1400         Reviewed by Pavel Feldman.
1401
1402         No new tests. Relies on existing webtiming-* tests.
1403
1404         * CMakeLists.txt:
1405         * GNUmakefile.list.am:
1406         * WebCore.gypi:
1407         * WebCore.pro:
1408         * WebCore.vcproj/WebCore.vcproj:
1409         * WebCore.xcodeproj/project.pbxproj:
1410         * dom/Document.cpp: Use monotonic times.
1411         (WebCore::Document::setReadyState):
1412         (WebCore::Document::finishedParsing):
1413         * inspector/InspectorInstrumentation.cpp:
1414         (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
1415         * inspector/InspectorResourceAgent.cpp:
1416         (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
1417         (WebCore::buildObjectForResourceResponse): Plumbing for above.
1418         (WebCore::buildObjectForCachedResource): Ditto.
1419         (WebCore::InspectorResourceAgent::willSendRequest): Ditto.
1420         (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
1421         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
1422         * loader/DocumentLoadTiming.cpp: Added.
1423         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
1424         (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
1425         (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
1426         (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
1427         * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
1428         (WebCore::DocumentLoadTiming::setUnloadEventStart):
1429         (WebCore::DocumentLoadTiming::setUnloadEventEnd):
1430         (WebCore::DocumentLoadTiming::setRedirectStart):
1431         (WebCore::DocumentLoadTiming::setRedirectEnd):
1432         (WebCore::DocumentLoadTiming::setFetchStart):
1433         (WebCore::DocumentLoadTiming::setResponseEnd):
1434         (WebCore::DocumentLoadTiming::setLoadEventStart):
1435         (WebCore::DocumentLoadTiming::setLoadEventEnd):
1436         (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
1437         (WebCore::DocumentLoadTiming::navigationStart):
1438         (WebCore::DocumentLoadTiming::unloadEventStart):
1439         (WebCore::DocumentLoadTiming::unloadEventEnd):
1440         (WebCore::DocumentLoadTiming::redirectStart):
1441         (WebCore::DocumentLoadTiming::redirectEnd):
1442         (WebCore::DocumentLoadTiming::redirectCount):
1443         (WebCore::DocumentLoadTiming::fetchStart):
1444         (WebCore::DocumentLoadTiming::responseEnd):
1445         (WebCore::DocumentLoadTiming::loadEventStart):
1446         (WebCore::DocumentLoadTiming::loadEventEnd):
1447         (WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
1448         (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
1449         * loader/FrameLoader.cpp:
1450         (WebCore::FrameLoader::stopLoading):
1451         (WebCore::FrameLoader::commitProvisionalLoad):
1452         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
1453         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1454         * loader/MainResourceLoader.cpp:
1455         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
1456         (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
1457         (WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
1458         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
1459         (WebCore::MainResourceLoader::load):
1460         * page/DOMWindow.cpp:
1461         (WebCore::DOMWindow::dispatchLoadEvent):
1462         * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
1463         * page/PerformanceNavigation.cpp:
1464         (WebCore::PerformanceNavigation::redirectCount):
1465         * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
1466         (WebCore::PerformanceTiming::navigationStart):
1467         (WebCore::PerformanceTiming::unloadEventStart):
1468         (WebCore::PerformanceTiming::unloadEventEnd):
1469         (WebCore::PerformanceTiming::redirectStart):
1470         (WebCore::PerformanceTiming::redirectEnd):
1471         (WebCore::PerformanceTiming::fetchStart):
1472         (WebCore::PerformanceTiming::responseEnd):
1473         (WebCore::PerformanceTiming::domLoading):
1474         (WebCore::PerformanceTiming::domInteractive):
1475         (WebCore::PerformanceTiming::domContentLoadedEventStart):
1476         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
1477         (WebCore::PerformanceTiming::domComplete):
1478         (WebCore::PerformanceTiming::loadEventStart):
1479         (WebCore::PerformanceTiming::loadEventEnd):
1480         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
1481         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
1482         * page/PerformanceTiming.h:
1483         * platform/network/ResourceLoadTiming.cpp:
1484         (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
1485         * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
1486
1487 2011-12-13  Adam Klein  <adamk@chromium.org>
1488
1489         Reduce code duplication in Element::setAttribute methods
1490         https://bugs.webkit.org/show_bug.cgi?id=74425
1491
1492         Reviewed by Ryosuke Niwa.
1493
1494         Two overloads of Element::setAttribute share almost all their code,
1495         including tricky logic around updating the appropriate Attribute and
1496         Attr objects and notifying the Inspector and MutationObservers.
1497
1498         This patch puts the common logic in a new setAttributeInternal method
1499         which is called by the other two.
1500
1501         No new tests, refactoring only.
1502
1503         * dom/Element.cpp:
1504         (WebCore::Element::setAttribute):
1505         (WebCore::Element::setAttributeInternal):
1506         * dom/Element.h:
1507
1508 2011-12-13  Brady Eidson  <beidson@apple.com>
1509
1510         <http://webkit.org/b/74420> Disable deprecation warnings around more code where we 
1511         cannot easily switch away from the deprecated APIs.
1512
1513         Reviewed by Mark Rowe.
1514
1515         * bindings/objc/DOMInternal.mm:
1516         * bridge/objc/objc_instance.mm:
1517
1518 2011-12-12  Robert Hogan  <robert@webkit.org>
1519
1520         CSS 2.1 failure: eof-002.htm fails
1521         https://bugs.webkit.org/show_bug.cgi?id=74309
1522
1523         Reviewed by Dean Jackson.
1524
1525         Test: css2.1/20110323/eof-002-expected.html
1526
1527         * css/CSSGrammar.y: Treat EOF during a function expression with an open parenthesis as a close parenthesis.
1528
1529 2011-12-13  Adam Klein  <adamk@chromium.org>
1530
1531         V8Proxy cleanup: replace custom logging methods with standard WebCore calls
1532         https://bugs.webkit.org/show_bug.cgi?id=74220
1533
1534         Reviewed by Adam Barth.
1535
1536         * bindings/v8/V8Proxy.cpp:
1537         (WebCore::V8Proxy::reportUnsafeAccessTo):
1538         * bindings/v8/V8Proxy.h:
1539         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1540         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
1541
1542 2011-12-13  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1543
1544         [Qt] Get rid of layering violations in includes
1545
1546         WebKit/qt/API and WebKit/qt/WebCoreSupport should not be included
1547         in the webcore.prf, but rather in each target that specificly needs
1548         headers in these location. We used to include them directly in webcore
1549         since we had layering violations between WebCore and WebKit, but now
1550         that they are gone there's no reason to do that.
1551
1552         Reviewed by Simon Hausmann.
1553
1554         * bridge/qt/qt_instance.cpp:
1555         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1556         * platform/graphics/qt/ImageQt.cpp:
1557         * platform/network/qt/QNetworkReplyHandler.cpp:
1558         * platform/network/qt/ResourceHandleQt.cpp:
1559         * platform/qt/CookieJarQt.cpp:
1560         * platform/qt/RenderThemeQStyle.cpp:
1561         * platform/qt/RenderThemeQt.cpp:
1562
1563 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
1564
1565         Web Inspector: Add scripts navigator sidebar to scripts panel.
1566         https://bugs.webkit.org/show_bug.cgi?id=73086
1567
1568         Reviewed by Pavel Feldman.
1569
1570         * WebCore.gypi:
1571         * WebCore.vcproj/WebCore.vcproj:
1572         * inspector/compile-front-end.sh:
1573         * inspector/front-end/Images/domain.png: Added.
1574         * inspector/front-end/JavaScriptSourceFrame.js:
1575         (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
1576         * inspector/front-end/ScriptsNavigator.js: Added.
1577         * inspector/front-end/ScriptsPanel.js:
1578         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
1579         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
1580         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
1581         (WebInspector.ScriptsPanel.prototype._reset):
1582         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
1583         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
1584         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
1585         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
1586         (WebInspector.ScriptsPanel.prototype._scriptSelectedInNavigator):
1587         (WebInspector.ScriptsPanel.prototype._createDebugToolbar):
1588         * inspector/front-end/Settings.js:
1589         * inspector/front-end/TabbedPane.js:
1590         (WebInspector.TabbedPane.prototype.appendTab):
1591         (WebInspector.TabbedPane.prototype.selectTab):
1592         (WebInspector.TabbedPane.prototype.highlightLine):
1593         (WebInspector.TabbedPane.prototype.elementsToRestoreScrollPositionsFor):
1594         * inspector/front-end/UISourceCode.js:
1595         (WebInspector.UISourceCode.prototype.get domain):
1596         (WebInspector.UISourceCode.prototype.get folderName):
1597         (WebInspector.UISourceCode.prototype.get displayName):
1598         (WebInspector.UISourceCode.prototype._parseURL):
1599         * inspector/front-end/WebKit.qrc:
1600         * inspector/front-end/inspector.css:
1601         (.tabbed-pane):
1602         (.tabbed-pane-content):
1603         * inspector/front-end/inspector.html:
1604         * inspector/front-end/networkPanel.css:
1605         * inspector/front-end/scriptsPanel.css:
1606         (#scripts-navigator-resizer-widget):
1607         (.scripts-navigator-domain-tree-item .icon):
1608         (.scripts-navigator-folder-tree-item .icon):
1609         (.scripts-navigator-script-tree-item .icon):
1610         (.scripts.panel .navigator):
1611         (#scripts-navigator-tabbed-pane .tabbed-pane-header):
1612         (#scripts-navigator-tabbed-pane .tabbed-pane-content):
1613         (.scripts.panel .navigator li):
1614         (.scripts.panel .navigator :focus li.selected):
1615         (.scripts.panel .navigator li.selected .selection):
1616         (.scripts.panel .navigator :focus li.selected .selection):
1617         (.scripts.panel .navigator .icon):
1618         (.scripts.panel .base-navigator-tree-element-title):
1619         * inspector/front-end/treeoutline.js:
1620         (TreeOutline):
1621         (TreeOutline.prototype.appendChild):
1622
1623 2011-12-12  Andreas Kling  <kling@webkit.org>
1624
1625         CollectionCache: Remove unused copy constructor and make it noncopyable.
1626         <http://webkit.org/b/74378>
1627
1628         Reviewed by Simon Hausmann.
1629
1630         * html/CollectionCache.cpp:
1631         * html/CollectionCache.h:
1632
1633 2011-12-13  Jarred Nicholls  <jarred@sencha.com>
1634
1635         XHR should use m_responseTypeCode internally to be consistent with WebKit coding style
1636         https://bugs.webkit.org/show_bug.cgi?id=74330
1637
1638         Reviewed by Alexey Proskuryakov.
1639
1640         No new tests needed, no behavioral changes.
1641
1642         * xml/XMLHttpRequest.cpp:
1643         (WebCore::XMLHttpRequest::responseText):
1644         (WebCore::XMLHttpRequest::responseXML):
1645         (WebCore::XMLHttpRequest::responseBlob):
1646         (WebCore::XMLHttpRequest::didReceiveData):
1647         * xml/XMLHttpRequest.h:
1648         (WebCore::XMLHttpRequest::asBlob):
1649
1650 2011-12-13  Kentaro Hara  <haraken@chromium.org>
1651
1652         Use the [Supplemental] IDL for webaudio attributes in Chromium
1653         https://bugs.webkit.org/show_bug.cgi?id=73394
1654
1655         Reviewed by Adam Barth.
1656
1657         - Overview: Using the [Supplemental] IDL, this patch moves the attribute
1658         declarations of webaudio from DOMWindow.idl into a new IDL file
1659         webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
1660         feature (aka a module).
1661
1662         - This patch changes the build flow of WebCore.gyp as follows:
1663
1664             Previous build flow:
1665                 foreach $idl (all IDL files) {
1666                     generate-bindings.pl depends on $idl;
1667                     generate-bindings.pl reads $idl;
1668                     generate-bindings.pl generates .h and .cpp files for $idl;
1669                 }
1670
1671             New build flow (See the discussions in bug 72138 for more details):
1672                 resolve-supplemental.pl depends on all IDL files;
1673                 resolve-supplemental.pl reads all IDL files;
1674                 resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
1675                 resolve-supplemental.pl outputs supplemental_dependency.tmp;
1676                 foreach $idl (all IDL files) {
1677                     generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
1678                     generate-bindings.pl reads $idl;
1679                     generate-bindings.pl reads supplemental_dependency.tmp;
1680                     generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
1681                 }
1682
1683         - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
1684         will be removed after build scripts for all platforms support the [Supplemental] IDL.
1685         The motivation for the [Supplemented] IDL is as follows:
1686
1687         In order to support the [Supplemental] IDL, we need to
1688         (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
1689         (2) and run generate-bindings.pl with the supplemental_dependency.tmp.
1690
1691         This build flow requires a change on the following build scripts,
1692         but changing all the build scripts all at once without any regression is too difficult:
1693
1694             - DerivedSources.make
1695             - DerivedSources.pri
1696             - GNUmakefile.am
1697             - PlatformBlackBerry.cmake
1698             - UseJSC.cmake
1699             - UseV8.cmake
1700             - WebCore.vcproj/MigrateScripts
1701             - WebCore.vcproj/WebCore.vcproj
1702             - bindings/gobject/GNUmakefile.am
1703             - WebCore.gyp/WebCore.gyp
1704
1705         Thus, we are planning to change the build scripts one by one, which implies that
1706         we need to allow the temporary state in which some build scripts support [Supplemental] IDL
1707         but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
1708         The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
1709         in another IDL file somewhere, like this:
1710
1711             DOMWindowWebAudio.idl:
1712                 interface [
1713                     Supplemental=DOMWindow
1714                 ] DOMWindowWebAudio {
1715                     attribute attr1;
1716                     attribute attr2;
1717                 };
1718
1719             DOMWindow.idl:
1720                 interface [
1721                 ] DOMWindow {
1722                     attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
1723                     attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
1724                     attribute attr3;
1725                     attribute attr4;
1726                 };
1727
1728         Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
1729
1730             - If a given build script supports the [Supplemental] IDL,
1731             generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
1732             - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
1733             as normal attributes and instead ignores all attributes with the [Supplemental] IDL
1734             (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
1735
1736         Tests: webaudio/*
1737
1738         * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
1739         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
1740         (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp),
1741         which are described at the first column of each line in the input file.
1742         If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style
1743         path by the cygpath command.
1744         * WebCore.gypi: Added DOMWindowWebAudio.idl.
1745         * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not
1746         support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead
1747         uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and
1748         instead uses the [Supplemental] IDL.
1749         Added the --additionalIdlFilesList option to specify the IDL files that are not listed in
1750         supplemental-dependency.tmp but should generate .h and .cpp files.
1751         * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes.
1752         As I described above, the [Supplemented] IDL will be removed after all platforms support
1753         the [Supplemental] IDL.
1754         * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL.
1755         The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
1756
1757 2011-12-13  Yosifumi Inoue  <yosin@chromium.org>
1758
1759         RenderTheme should have a function for disabled text color adjustment
1760         https://bugs.webkit.org/show_bug.cgi?id=74143
1761
1762         Change disabledTextColor to private method.
1763
1764         Reviewed by Kent Tamura.
1765
1766         No new tests / existing tests cover this change.
1767
1768         * rendering/RenderThemeChromiumMac.h: Change disabledTextColor to private.
1769         * rendering/RenderThemeChromiumSkia.h: Change disabledTextColor to private.
1770
1771 2011-12-12  Daniel Bates  <dbates@webkit.org>
1772
1773         Unreviewed, rolling out r102656.
1774         http://trac.webkit.org/changeset/102656
1775         https://bugs.webkit.org/show_bug.cgi?id=74313
1776
1777         Broke the Mac, Windows and WinCairo builds. We need to look
1778         into this patch some more.
1779
1780         * bindings/js/ScriptEventListener.cpp:
1781         (WebCore::eventListenerHandlerLocation):
1782
1783 2011-12-12  Konrad Piascik  <kpiascik@rim.com>
1784
1785         2011-12-12  Konrad Piascik  <kpiascik@rim.com>
1786
1787         Implement the JavaScriptCore bindings for eventListenerHandlerLocation
1788         https://bugs.webkit.org/show_bug.cgi?id=74313
1789
1790         Reviewed by Geoffrey Garen.
1791
1792         Open any page in Web Inspector and look at the event listeners. They should now
1793         link to the script which created them.
1794
1795         * bindings/js/ScriptEventListener.cpp:
1796         (WebCore::eventListenerHandlerLocation):
1797
1798 2011-12-12  Yosifumi Inoue  <yosin@chromium.org>
1799
1800         RenderTheme should have a function for disabled text color adjustment
1801         https://bugs.webkit.org/show_bug.cgi?id=74143
1802
1803         Reviewed by Kent Tamura.
1804
1805         No new tests / existing tests cover this change.
1806
1807         * rendering/RenderTextControl.cpp:
1808         (WebCore::RenderTextControl::adjustInnerTextStyle): Use RenderTheme::disabledTextColor instead of PLATFORM wraped static function. 
1809         * rendering/RenderTheme.cpp:
1810         (WebCore::RenderTheme::disabledTextColor): Moved from RenderTextControl.cpp. This method implements for non-Chromium color.
1811         * rendering/RenderTheme.h: Add new virtual method disabledTextColor.
1812         * rendering/RenderThemeChromiumMac.h: Implementation of RenderTheme::disabledTextColor for Chrimium Mac.
1813         * rendering/RenderThemeChromiumSkia.h: Implementation of RenderTheme::disabledTextColor for Chrimium.
1814
1815 2011-12-12  Kenneth Russell  <kbr@google.com>
1816
1817         Unreviewed, rolling out r102648.
1818         http://trac.webkit.org/changeset/102648
1819         https://bugs.webkit.org/show_bug.cgi?id=74313
1820
1821         Broke the Snow Leopard and Windows builds
1822
1823         * bindings/js/ScriptEventListener.cpp:
1824         (WebCore::eventListenerHandlerLocation):
1825
1826 2011-12-12  Andreas Kling  <kling@webkit.org>
1827
1828         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1829         <http://webkit.org/b/71354> and <rdar://problem/10565998>
1830
1831         Reviewed by Anders Carlsson.
1832
1833         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
1834
1835 2011-12-12  Jarred Nicholls  <jarred@sencha.com>
1836
1837         [Qt] QTKIT-based video support must target OS X 10.5 or higher
1838         https://bugs.webkit.org/show_bug.cgi?id=74294
1839
1840         WebCore on OS X Lion fails to build when QTKIT video support is enabled, unless a
1841         deployment target of 10.5+ is specified explicitly.
1842
1843         Reviewed by Noam Rosenthal.
1844
1845         No new tests as this is a build issue.
1846
1847         * Target.pri:
1848
1849 2011-12-12  Luke Macpherson   <macpherson@chromium.org>
1850
1851         Implement CSS text-decoration property in CSSStyleApplyProperty.
1852         https://bugs.webkit.org/show_bug.cgi?id=74258
1853
1854         Reviewed by Andreas Kling.
1855
1856         No new tests / refactoring only.
1857
1858         * css/CSSStyleApplyProperty.cpp:
1859         (WebCore::ApplyPropertyTextDecoration::applyValue):
1860         (WebCore::ApplyPropertyTextDecoration::createHandler):
1861         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1862         * css/CSSStyleSelector.cpp:
1863         (WebCore::CSSStyleSelector::applyProperty):
1864
1865 2011-12-12  Adrienne Walker  <enne@google.com>
1866
1867         iframe fails to scroll in composited page
1868         https://bugs.webkit.org/show_bug.cgi?id=72682
1869
1870         Reviewed by Simon Fraser.
1871
1872         FrameView::scrollContentsSlowPath only was catching the case where a
1873         child iframe had a composited parent. Now detect if the child iframe
1874         has any composited ancestor.
1875
1876         Test: compositing/iframes/scroll-grandchild-iframe.html
1877
1878         * page/FrameView.cpp:
1879         (WebCore::FrameView::scrollContentsSlowPath):
1880
1881 2011-12-12  Konrad Piascik  <kpiascik@rim.com>
1882
1883         Implement the JavaScriptCore bindings for eventListenerHandlerLocation
1884         https://bugs.webkit.org/show_bug.cgi?id=74313
1885
1886         Reviewed by Geoffrey Garen. 
1887
1888         Open any page in Web Inspector and look at the event listeners. They should now
1889         link to the script which created them.
1890
1891         * bindings/js/ScriptEventListener.cpp:
1892         (WebCore::eventListenerHandlerLocation):
1893
1894 2011-12-12  Erik Arvidsson  <arv@chromium.org>
1895
1896         [V8] CodeGeneratorV8.pm does not correctly work with inherited HasIndexGetter
1897         https://bugs.webkit.org/show_bug.cgi?id=74027
1898
1899         Reviewed by Adam Barth.
1900
1901         Instead of having to write a custom indexer when the interface has an inherited indexer
1902         we get the signature from the super interface.
1903
1904         Tested by existing tests.
1905
1906         * Target.pri: Remove V8DOMSettableTokenListCustom.cpp and V8WebKitCSSFilterValueCustom.cpp.
1907         * UseV8.cmake: Ditto.
1908         * WebCore.gypi: Ditto.
1909         * bindings/scripts/CodeGenerator.pm:
1910         (FindSuperMethod): Returns the first matching function in one of the ancestor interfaces.
1911         * bindings/scripts/CodeGeneratorV8.pm:
1912         (GenerateImplementationIndexer): If the current interface has no indexer try to find an
1913                                          indexer in one of the super interfaces.
1914         (GenerateImplementationNamedPropertyGetter): Ditto for named property getter.
1915         * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Removed.
1916         * bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Removed.
1917
1918 2011-12-12  Simon Fraser  <simon.fraser@apple.com>
1919
1920         Make it possible to substitute a different CALayer implementation for the main root layer
1921         https://bugs.webkit.org/show_bug.cgi?id=74369
1922
1923         Reviewed by Anders Carlsson.
1924         
1925         Some platforms may wish to have the main root layer (which corresponds with
1926         the main frame's RenderView's layer) implemented by a custom platform layer,
1927         for example to contain a cache of tiles.
1928         
1929         Make this possible on Mac by adding a new method to GraphicsLayerClient(),
1930         and implementing it in RenderLayerBacking. This new behavior is not yet enabled.
1931         
1932         Also clean up some WebLayer/WebTiledLayer code.
1933
1934         * WebCore.xcodeproj/project.pbxproj:
1935         * platform/graphics/GraphicsLayerClient.h:
1936         (WebCore::GraphicsLayerClient::shouldUseTileCache): New client method that indicates that the GraphicsLayer
1937         should host a tile cache layer instead of a normal layer.
1938         * platform/graphics/ca/GraphicsLayerCA.cpp:
1939         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Ask the client, if any, whether to create a tile cache layer.
1940         * platform/graphics/ca/PlatformCALayer.h:
1941         * platform/graphics/ca/mac/PlatformCALayerMac.mm: NSClassFromString(@"CATransformLayer") was for Leopard;
1942         we can just use the classname now. Handle LayerTypeTileCacheLayer.
1943         (PlatformCALayer::PlatformCALayer):
1944         * platform/graphics/ca/mac/WebTileCacheLayer.h: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
1945         * platform/graphics/ca/mac/WebTileCacheLayer.mm: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
1946         * platform/graphics/mac/WebLayer.h: Remove the setLayerNeedsDisplayInRect() hackery.
1947         * platform/graphics/mac/WebLayer.mm: setLayerNeedsDisplayInRect() tried to share code between WebLayer and WebTiledLayer
1948         by using Obj-C runtime methods to find the superclass. This causes infinite recursion if Web[Tiled]Layer is subclassed,
1949         so remove it.
1950         (-[WebLayer setNeedsDisplayInRect:]): Code moved here from setLayerNeedsDisplayInRect.
1951         * platform/graphics/mac/WebTiledLayer.mm:
1952         (-[WebTiledLayer setNeedsDisplayInRect:]): Code copied here from setLayerNeedsDisplayInRect.
1953         * rendering/RenderLayerBacking.cpp:
1954         (WebCore::RenderLayerBacking::RenderLayerBacking): Find out, and cache if we're the main frame's layer.
1955         (WebCore::RenderLayerBacking::shouldUseTileCache): Return m_usingTiledCacheLayer, which is always false for now.
1956         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Use m_isMainFrameRenderViewLayer.
1957         (WebCore::RenderLayerBacking::paintingGoesToWindow): The tile cache layer needs to paint itself.
1958         * rendering/RenderLayerBacking.h:
1959         * rendering/RenderLayerCompositor.h: m_compositeForFixedPosition was unused.
1960
1961 2011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
1962
1963         REGRESSION(r102357): respondToUnappliedEditing exits early for CreateLinkCommand
1964         https://bugs.webkit.org/show_bug.cgi?id=74356
1965
1966         Reviewed by Enrica Casucci.
1967
1968         The problem was that isCreateLinkCommand was called on EditCommandComposition by respondToUnappliedEditing.
1969         Fixed the bug by propagating the value of isCreteLinkCommand from CompositeEditCommand to
1970         EditCommandComposition via wasCreateLinkCommand.
1971
1972         Also move isCreateLinkCommand from EditCommand to CompositeEditCommand to prevent this mistake in the future.
1973
1974         * editing/CompositeEditCommand.cpp:
1975         (WebCore::EditCommandComposition::create):
1976         (WebCore::EditCommandComposition::EditCommandComposition):
1977         (WebCore::CompositeEditCommand::ensureComposition):
1978         (WebCore::CompositeEditCommand::isCreateLinkCommand):
1979         * editing/CompositeEditCommand.h:
1980         (WebCore::EditCommandComposition::wasCreateLinkCommand):
1981         * editing/SpellingCorrectionController.cpp:
1982         (WebCore::SpellingCorrectionController::respondToUnappliedEditing):
1983         * editing/SpellingCorrectionController.h:
1984
1985 2011-12-12  Mihnea Ovidenie  <mihnea@adobe.com>
1986
1987         [CSSRegions]Revert RenderObject::style() to its state before region styling
1988         https://bugs.webkit.org/show_bug.cgi?id=74315
1989
1990         Reviewed by Tony Chang.
1991
1992         * rendering/RenderObject.h:
1993         (WebCore::RenderObject::style):
1994
1995 2011-12-12  Adam Klein  <adamk@chromium.org>
1996
1997         Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed
1998         https://bugs.webkit.org/show_bug.cgi?id=74321
1999
2000         Reviewed by Ryosuke Niwa.
2001
2002         In r101101, Rafael Weinstein added code to CSSMutableStyleDeclaration.cpp
2003         which depended on isInlineStyleDeclaration returning true iff the
2004         element it pointed to was non-null (it will be nulled-out if the
2005         element is garbage collected).
2006
2007         Then, in r101172, Andreas Kling changed the semantics so that
2008         isInlineStyleDeclaration only described the type of the declaration,
2009         not the state of the related element.
2010
2011         This change updates Rafael's code with an explicit check that the
2012         element is still alive.
2013
2014         Test: fast/dom/css-inline-style-declaration-crash.html
2015
2016         * css/CSSMutableStyleDeclaration.cpp:
2017
2018 2011-12-12  Chris Fleizach  <cfleizach@apple.com>
2019
2020         AX: aria-hidden inheritance broken when applying to some descendants
2021         https://bugs.webkit.org/show_bug.cgi?id=73940
2022
2023         Reviewed by Darin Adler.
2024
2025         When adding children, we were not updating the children cache for direct AX descendants.
2026         This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable.
2027
2028         Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not
2029         being managed correctly as a mock element.
2030
2031         Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html
2032
2033         * accessibility/AccessibilityRenderObject.cpp:
2034         (WebCore::AccessibilityRenderObject::addChildren):
2035         * accessibility/AccessibilityTable.cpp:
2036         (WebCore::AccessibilityTable::clearChildren):
2037         (WebCore::AccessibilityTable::headerContainer):
2038         * accessibility/AccessibilityTable.h:
2039
2040 2011-12-12  Jeremy Apthorp  <jeremya@chromium.org>
2041
2042         When the mouse is dragged out of an :active element, it should lose :hover.
2043         https://bugs.webkit.org/show_bug.cgi?id=57206
2044
2045         Reviewed by Ryosuke Niwa.
2046
2047         Test: fast/css/hover-active-drag.html
2048
2049         * page/EventHandler.cpp:
2050         (WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are.
2051         (WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so
2052         RenderLayer has a chance to update the hover/active status.
2053         * rendering/RenderLayer.cpp:
2054         (WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up.
2055
2056 2011-12-12  Kenneth Russell  <kbr@google.com>
2057
2058         Unreviewed Windows build fix after http://trac.webkit.org/changeset/102619 .
2059         Remove OVERRIDE specifier from virtual destructor.
2060
2061         * html/HTMLPlugInImageElement.h:
2062
2063 2011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
2064
2065         WebKit code shouldn't be calling applyCommand directly
2066         https://bugs.webkit.org/show_bug.cgi?id=74337
2067
2068         Reviewed by Darin Adler.
2069
2070         Make WebKit-layer code call Editor::replaceSelectionWithFragment and Editor::replaceSelectionWithText
2071         instead of manually creating and applying ReplaceSelectionCommand.
2072
2073         The only behavioral difference is that new code will end up checking for spell checks. However, this
2074         difference appears to be unintentional since the code predates http://trac.webkit.org/changeset/73886,
2075         which introduced an invocation of spellcheck code.
2076
2077         Unfortunately no tests since there doesn't seem to be anyway to test this change.
2078
2079         * WebCore.exp.in:
2080         * editing/EditCommand.cpp:
2081         (WebCore::applyCommand):
2082         * editing/EditCommand.h:
2083         * editing/Editor.h:
2084
2085 2011-11-26  Adam Barth  <abarth@webkit.org>
2086
2087         Remove platform/audio/fftw
2088         https://bugs.webkit.org/show_bug.cgi?id=73163
2089
2090         Reviewed by Eric Seidel.
2091
2092         The FFTW library is GPL, not LGPL, like WebKit.  This patch removes the
2093         integration with the library so folks who use WebAudio don't
2094         accidentially violate the GPL by linking in FFTW.
2095
2096         * GNUmakefile.am:
2097         * WebCore.gyp/WebCore.gyp:
2098         * WebCore.gypi:
2099         * platform/audio/FFTFrame.h:
2100         * platform/audio/FFTFrameStub.cpp:
2101         * platform/audio/fftw: Removed.
2102         * platform/audio/fftw/FFTFrameFFTW.cpp: Removed.
2103
2104 2011-12-12  Kenneth Russell  <kbr@google.com>
2105
2106         COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
2107         https://bugs.webkit.org/show_bug.cgi?id=74327
2108
2109         Unreviewed build fix. True fix should follow under above bug.
2110
2111         * css/CSSStyleSelector.cpp:
2112
2113 2011-12-12  David Grogan  <dgrogan@chromium.org>
2114
2115         Fix compilation error when !ENABLE(WORKERS)
2116         https://bugs.webkit.org/show_bug.cgi?id=74029
2117
2118         Reviewed by Yury Semikhatsky.
2119
2120         * storage/IDBFactory.cpp:
2121         (WebCore::IDBFactory::open): add #if ENABLE(WORKERS) guard
2122
2123 2011-12-12  Brady Eidson  <beidson@apple.com>
2124
2125         Page cache should support pages with plugins.
2126         <rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
2127
2128         Reviewed by Anders Carlsson.
2129
2130         By making plugin elements renderers go display:none when entering the page cache,
2131         we destroy the plug-in in a cross platform way as well as handle invalidating script
2132         objects created by that plugin.
2133
2134         By restoring the original style when leaving the page cache and forcing a style recalc
2135         on the plugin element, the plugin is gracefully reinstantiated when the user goes back.
2136
2137         Test: plugins/netscape-plugin-page-cache-works.html
2138
2139         * dom/Document.cpp:
2140         (WebCore::Document::documentDidBecomeActive): Copy this collection before iterating over
2141           it, as the callbacks might result in mutating the set.
2142
2143         * dom/Node.h:
2144         (WebCore::Node::setHasCustomStyleForRenderer):
2145         (WebCore::Node::clearHasCustomStyleForRenderer): Expose the ability to stop using a 
2146           custom renderer and go back to the default renderer.
2147
2148         * history/CachedFrame.cpp:
2149         (WebCore::CachedFrame::CachedFrame): Move the document inactivation call to the same place
2150           we suspend active DOM objects. It is important this call be *after* the beforeunload event
2151           is dispatched, and was coincidental non of the elements that using Document activation
2152           had run in to this problem yet.
2153
2154         * history/PageCache.cpp:
2155         (WebCore::logCanCacheFrameDecision):
2156         (WebCore::PageCache::canCachePageContainingThisFrame): If the page contains plugins but
2157           the PageCacheSupportsPlugins setting is true, allow this page.
2158
2159         Kill and recreate the plugin by listening for Document activation callbacks and setting a custom
2160         display:none render style:
2161         * html/HTMLPlugInImageElement.cpp:
2162         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2163         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Unregister for document activation
2164           callbacks.
2165         (WebCore::HTMLPlugInImageElement::createRenderer): Once a renderer (ie. plugin instance) is
2166           created, this element needs Document (in)activation callbacks.
2167         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Manage Document activation 
2168           callback registration.
2169         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): Ditto.
2170         (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): Clone the element's current style
2171           and set the clone's display value to None. Start using this custom style and force a style
2172           recall. This destroys the renderer and therefore the plugin instance.
2173         (WebCore::HTMLPlugInImageElement::documentDidBecomeActive): Stop using the custom style and
2174           force a style recall to reinstantiate the plugin.
2175         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): Return the stand-in style that has
2176           display:none set.
2177         * html/HTMLPlugInImageElement.h:
2178
2179         Add a setting that allows runtime configuration of whether or not the page cache supports plugins:
2180         * page/Settings.cpp:
2181         (WebCore::Settings::Settings):
2182         * page/Settings.h:
2183         (WebCore::Settings::setPageCacheSupportsPlugins):
2184         (WebCore::Settings::pageCacheSupportsPlugins):
2185
2186 2011-12-12  Ojan Vafai  <ojan@chromium.org>
2187
2188         r102234 caused RuleData to use 33 bits in its bitmask
2189         https://bugs.webkit.org/show_bug.cgi?id=74314
2190
2191         Reviewed by Antti Koivisto.
2192
2193         Lower m_position to something more reasonable. A million
2194         should be plenty. Current large sites (e.g. gmail) seem to use
2195         tens of thousands.
2196
2197         Added a COMPILE_ASSERT to ensure this doesn't regress.
2198
2199         No new tests.
2200
2201         * css/CSSStyleSelector.cpp:
2202
2203 2011-12-12  James Robinson  <jamesr@chromium.org>
2204
2205         Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
2206         https://bugs.webkit.org/show_bug.cgi?id=74231
2207
2208         Reviewed by Simon Fraser.
2209
2210         The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to
2211         feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout
2212         and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an
2213         alias to be compatible with current content.
2214
2215         * dom/Document.cpp:
2216         (WebCore::Document::webkitCancelAnimationFrame):
2217         * dom/Document.h:
2218         * page/DOMWindow.cpp:
2219         (WebCore::DOMWindow::webkitCancelAnimationFrame):
2220         * page/DOMWindow.h:
2221         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
2222         * page/DOMWindow.idl:
2223
2224 2011-12-12  Shawn Singh  <shawnsingh@chromium.org>
2225
2226         [chromium] Remove assumption that empty surface is always at end of list
2227         https://bugs.webkit.org/show_bug.cgi?id=74037
2228
2229         Reviewed by James Robinson.
2230
2231         Test case added to CCLayerTreeHostCommonTest.cpp, which reproduces
2232         a crash reported in http://code.google.com/p/chromium/issues/detail?id=106734
2233
2234         This patch fixes the crash in a less risky way to be merged into
2235         m17, but the root of the issue needs to be addressed in a
2236         follow-up patch.
2237
2238         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2239         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2240
2241 2011-12-12  Simon Fraser  <simon.fraser@apple.com>
2242
2243         Share code that checks for matching sets of transform operations
2244         https://bugs.webkit.org/show_bug.cgi?id=74265
2245
2246         Reviewed by Dan Bernstein.
2247         
2248         Add TransformOperations::operationsMatch() and call it from the
2249         three places that used this same code.
2250         
2251         Tested by existing tests.
2252
2253         * page/animation/ImplicitAnimation.cpp:
2254         (WebCore::ImplicitAnimation::validateTransformFunctionList):
2255         * page/animation/KeyframeAnimation.cpp:
2256         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2257         * platform/graphics/GraphicsLayer.cpp:
2258         (WebCore::GraphicsLayer::fetchTransformOperationList):
2259         * platform/graphics/transforms/TransformOperations.cpp:
2260         (WebCore::TransformOperations::operationsMatch):
2261         * platform/graphics/transforms/TransformOperations.h:
2262
2263 2011-12-12  Antti Koivisto  <antti@apple.com>
2264
2265         Cache visited link hash
2266         https://bugs.webkit.org/show_bug.cgi?id=74095
2267
2268         Reviewed by Darin Adler.
2269
2270         Visited link hash is relatively expensive to compute. We can cache it for anchor elements
2271         with minimal relative memory cost for faster style resolve.
2272         
2273         On my machine this speeds up style matching on full HTML spec by ~100ms or ~1% of the total
2274         CPU usage. It makes link elements 8 bytes larger, a relatively minor increase to their overall size.
2275         
2276         Invalidate the hashes on base URL for completeness sake (lack of style invalidation means
2277         that this scenario is not properly supported currently).
2278
2279         Covered by existing tests. No specific test for visited hash invalidation on dynamic base URL 
2280         change as the effect is not testable due to lack of style invalidation.
2281
2282         * css/SelectorChecker.cpp:
2283         (WebCore::SelectorChecker::determineLinkStateSlowCase):
2284         (WebCore::SelectorChecker::visitedStateChanged):
2285         * html/Document.cpp:
2286         * html/HTMLAnchorElement.cpp:
2287         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
2288         (WebCore::HTMLAnchorElement::parseMappedAttribute):
2289         * html/HTMLAnchorElement.h:
2290         (WebCore::HTMLAnchorElement::visitedLinkHash):
2291
2292 2011-12-12  Martin Robinson  <mrobinson@igalia.com>
2293
2294         [GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method
2295         https://bugs.webkit.org/show_bug.cgi?id=72805
2296
2297         Reviewed by Gustavo Noronha Silva.
2298
2299         No new tests. This is only a performance tweak.
2300
2301         Instead of immediately calling gtk_widget_size during painting, defer
2302         this until the size-allocate method of the WebView.
2303
2304         * plugins/gtk/PluginViewGtk.cpp:
2305         (WebCore::PluginView::updateWidgetAllocationAndClip): Instead of immediately changing
2306         the widget allocation, just record it in a GObject data attachment.
2307
2308 2011-12-12  Nate Chapin  <japhet@chromium.org>
2309
2310         A SubresourceLoader in the middle of revalidating
2311         a resource should be treated as finishing (similar to
2312         didFinishLoading and didFail) to ensure that willCancel()
2313         doesn't declare the revalidation as having failed reentrantly.
2314         https://bugs.webkit.org/show_bug.cgi?id=72762
2315
2316         Reviewed by Adam Barth.
2317
2318         Test: http/tests/cache/cancel-during-revalidation-succeeded.html
2319
2320         * loader/SubresourceLoader.cpp:
2321         (WebCore::SubresourceLoader::didReceiveResponse):
2322
2323 2011-12-12  Mary Wu  <mary.wu@torchmobile.com.cn>
2324
2325         Upstream 3 files into WebCore/platform/blackberry
2326         https://bugs.webkit.org/show_bug.cgi?id=74275
2327
2328         Reviewed by Rob Buis.
2329
2330         Initial upstream, no new tests.
2331
2332         * platform/blackberry/ContextMenuBlackBerry.cpp: Added.
2333         * platform/blackberry/ContextMenuItemBlackBerry.cpp: Added.
2334         * platform/blackberry/TemporaryLinkStubs.cpp: Added.
2335
2336 2011-12-12  Pierre Rossi  <pierre.rossi@gmail.com>
2337
2338         [Qt] Rendering issues with sliders and QStyle
2339         https://bugs.webkit.org/show_bug.cgi?id=73921
2340
2341         With QStyle's origins being deeply rooted with widgets,
2342         several styles make wrong assumptions, leading to sliders
2343         not being painted properly in WebKit. We can solve a lot
2344         of problems by systematically translating the painter to
2345         the top left corner of the render object.
2346
2347         Reviewed by Simon Hausmann.
2348
2349         No new tests. The Qt tests are ran with the Windows
2350         style, this fixes some quirks affecting other styles.
2351
2352         * platform/qt/RenderThemeQStyle.cpp:
2353         (WebCore::RenderThemeQStyle::paintSliderTrack):
2354         (WebCore::RenderThemeQStyle::paintSliderThumb):
2355
2356 2011-12-12  Mary Wu  <mary.wu@torchmobile.com.cn>
2357
2358         Upstream 5 files into WebCore/platform/blackberry
2359         https://bugs.webkit.org/show_bug.cgi?id=73798
2360
2361         Reviewed by Rob Buis.
2362
2363         Main contributors:
2364         Genevieve Mak <gmak@rim.com>
2365         Mike Lattanzio  <mlattanzio@rim.com>
2366         George Staikos <gstaikos@rim.com> 
2367
2368         Initial upstream, no new tests.
2369
2370         * platform/blackberry/PlatformTouchEventBlackBerry.cpp: Added.
2371         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
2372         * platform/blackberry/PlatformTouchPointBlackBerry.cpp: Added.
2373         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
2374         * platform/blackberry/SharedBufferBlackBerry.cpp: Added.
2375         (WebCore::SharedBuffer::createWithContentsOfFile):
2376         * platform/blackberry/SharedTimerBlackBerry.cpp: Added.
2377         (WebCore::SharedTimerBlackBerry::SharedTimerBlackBerry):
2378         (WebCore::SharedTimerBlackBerry::~SharedTimerBlackBerry):
2379         (WebCore::SharedTimerBlackBerry::instance):
2380         (WebCore::SharedTimerBlackBerry::start):
2381         (WebCore::SharedTimerBlackBerry::stop):
2382         (WebCore::setSharedTimerFiredFunction):
2383         (WebCore::setSharedTimerFireInterval):
2384         (WebCore::stopSharedTimer):
2385         * platform/blackberry/SystemTimeBlackBerry.cpp: Added.
2386         (WebCore::userIdleTime):
2387
2388 2011-12-12  Alexander Pavlov  <apavlov@chromium.org>
2389
2390         Implement a cache for CSSStyleRule::selectorText()
2391         https://bugs.webkit.org/show_bug.cgi?id=74269
2392
2393         This change is geared towards speeding up the CSS selector profiler,
2394         its implementation tracked at https://bugs.webkit.org/show_bug.cgi?id=74004.
2395         Using a proof-of-concept implementation of the profiler, this change reduces
2396         the profiler temporal overhead on PerformanceTests/Parser/html5-full-render.html
2397         roughly by 86% (from ~72 seconds down to ~10 seconds). This change also does not
2398         considerably increase average memory usage, as reading selectorText is a relatively
2399         rare case during normal web browsing.
2400
2401         Reviewed by Andreas Kling.
2402
2403         No new tests, as this functionality is covered by existing tests.
2404
2405         * css/CSSRule.h:
2406         * css/CSSStyleRule.cpp:
2407         (WebCore::CSSStyleRule::~CSSStyleRule):
2408         (WebCore::selectorTextCache):
2409         (WebCore::CSSStyleRule::cleanup):
2410         (WebCore::CSSStyleRule::generateSelectorText):
2411         (WebCore::CSSStyleRule::selectorText):
2412         (WebCore::CSSStyleRule::setSelectorText):
2413         * css/CSSStyleRule.h:
2414
2415 2011-12-12  Alexander Pavlov  <apavlov@chromium.org>
2416
2417         Web Inspector: [Styles] Modified selector text needs sanitization
2418         https://bugs.webkit.org/show_bug.cgi?id=74291
2419
2420         Reviewed by Yury Semikhatsky.
2421
2422         * inspector/front-end/StylesSidebarPane.js:
2423
2424 2011-12-12  Renata Hodovan  <reni@webkit.org>
2425
2426         Fulfill FIXME in  HTMLLinkElement.h.
2427         https://bugs.webkit.org/show_bug.cgi?id=74278
2428
2429         Rename HTMLLinkElement::isLoading() to isStyleSheetLoading().
2430
2431         Reviewed by Andreas Kling.
2432
2433         No new tests because the functionality remains the same.
2434
2435         * dom/Document.cpp:
2436         (WebCore::Document::recalcStyleSelector):
2437         * html/HTMLLinkElement.cpp:
2438         (WebCore::HTMLLinkElement::setDisabledState):
2439         (WebCore::HTMLLinkElement::isStyleSheetLoading):
2440         (WebCore::HTMLLinkElement::sheetLoaded):
2441         * html/HTMLLinkElement.h:
2442
2443 2011-11-25  Alexander Pavlov  <apavlov@chromium.org>
2444
2445         WebKit does not enumerate over CSS properties in HTMLElement.style
2446         https://bugs.webkit.org/show_bug.cgi?id=23946
2447
2448         Reviewed by Darin Adler.
2449
2450         This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
2451         using the "in" operator on the CSSStyleDeclaration object.
2452
2453         Test: fast/css/style-enumerate-properties.html
2454
2455         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2456         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
2457         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2458         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
2459         (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
2460         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
2461         * css/CSSStyleDeclaration.idl: Use a custom property enumerator.
2462         * css/makeprop.pl: Add a function to convert CSS property names into JS ones.
2463
2464 2011-12-12  Alexander Pavlov  <apavlov@chromium.org>
2465
2466         Unreviewed, build fix.
2467
2468         Revert r102570 which broke SnowLeopard builders.
2469
2470         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2471         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2472         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
2473         * css/CSSStyleDeclaration.idl:
2474         * css/makeprop.pl:
2475
2476 2011-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
2477
2478         Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties.
2479         https://bugs.webkit.org/show_bug.cgi?id=74289
2480
2481         WebCore objects have many hidden properties.
2482         The Detailed Heap shapshot view shows all these props for a selected object.
2483         The result view looks too heavy and users usually failed to find a useful information about the object.
2484         Looks like such ability is unnecessary in the most cases.
2485         I'd like to introduce a configurable property that will show/hide these props from the view.
2486
2487         Reviewed by Yury Semikhatsky.
2488
2489         * English.lproj/localizedStrings.js:
2490         * inspector/front-end/DetailedHeapshotGridNodes.js:
2491         * inspector/front-end/DetailedHeapshotView.js:
2492         * inspector/front-end/HeapSnapshotProxy.js:
2493         (WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
2494         * inspector/front-end/SettingsScreen.js:
2495         (WebInspector.SettingsScreen):
2496
2497 2011-12-12  Kentaro Hara  <haraken@chromium.org>
2498
2499         Unreviewed, rolling out r102556.
2500         http://trac.webkit.org/changeset/102556
2501         https://bugs.webkit.org/show_bug.cgi?id=73394
2502
2503         clobber build failure
2504
2505         * WebCore.gyp/WebCore.gyp:
2506         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
2507         (main):
2508         * WebCore.gypi:
2509         * bindings/scripts/generate-bindings.pl:
2510         * page/DOMWindow.idl:
2511         * webaudio/DOMWindowWebAudio.idl: Removed.
2512
2513 2011-12-12  Kentaro Hara  <haraken@chromium.org>
2514
2515         Unreviewed, rolling out r102558.
2516         http://trac.webkit.org/changeset/102558
2517         https://bugs.webkit.org/show_bug.cgi?id=74160
2518
2519         clobber build failure
2520
2521         * WebCore.gypi:
2522         * page/DOMWindow.idl:
2523         * websockets/DOMWindowWebSocket.idl: Removed.
2524
2525 2011-11-25  Alexander Pavlov  <apavlov@chromium.org>
2526
2527         WebKit does not enumerate over CSS properties in HTMLElement.style
2528         https://bugs.webkit.org/show_bug.cgi?id=23946
2529
2530         Reviewed by Darin Adler.
2531
2532         This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
2533         using the "in" operator on the CSSStyleDeclaration object.
2534
2535         Test: fast/css/style-enumerate-properties.html
2536
2537         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2538         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
2539         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2540         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
2541         (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
2542         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
2543         * css/CSSStyleDeclaration.idl: Use a custom property enumerator.
2544         * css/makeprop.pl: Add a function to convert CSS property names into JS ones, and a string comparator.
2545
2546 2011-12-09  Yury Semikhatsky  <yurys@chromium.org>
2547
2548         Web Inspector: provide per Document Node count statistics
2549         https://bugs.webkit.org/show_bug.cgi?id=74100
2550
2551         Memory agent now returns counters for nodes with given names. For each
2552         object group root user will see total number of its descendtants and per
2553         tag name counts.
2554
2555         This patch also moves generic CounterVisitor code out of V8 bindings. It
2556         may well be used with both JS engines.
2557
2558         Reviewed by Pavel Feldman.
2559
2560         * GNUmakefile.list.am:
2561         * Target.pri:
2562         * WebCore.gypi:
2563         * WebCore.vcproj/WebCore.vcproj:
2564         * WebCore.xcodeproj/project.pbxproj:
2565         * bindings/js/ScriptProfiler.h:
2566         (WebCore::ScriptProfiler::visitJSDOMWrappers):
2567         * bindings/v8/ScriptProfiler.cpp:
2568         (WebCore::ScriptProfiler::visitJSDOMWrappers):
2569         * bindings/v8/ScriptProfiler.h:
2570         * inspector/DOMWrapperVisitor.h: Added.
2571         (WebCore::DOMWrapperVisitor::~DOMWrapperVisitor):
2572         * inspector/Inspector.json:
2573         * inspector/InspectorMemoryAgent.cpp:
2574         (WebCore::InspectorMemoryAgent::getDOMNodeCount):
2575         * inspector/InspectorMemoryAgent.h:
2576
2577 2011-12-12  Noel Gordon  <noel.gordon@gmail.com>
2578
2579         WebPImageDecoder: Increase image/webp decoding performance 10-20%
2580         https://bugs.webkit.org/show_bug.cgi?id=74263
2581
2582         Reviewed by Adam Barth.
2583
2584         Avoid copying data from the RGB buffer of decoded image output to the
2585         backing pixel store. That is slow - costs 10% of the overall decoding
2586         time at libwebp 0.1.2, and 20% at libwebp 0.1.3.
2587
2588         Instead, instruct the decoder to write the decoded pixels directly to
2589         the backing pixel store.
2590
2591         No new tests. Covered by existing tests. No progressive decoding test
2592         exists in DRT, see https://bugs.webkit.org/show_bug.cgi?id=74062
2593
2594         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2595         (outputMode):  Define output pixel format. On little-endian machines,
2596         output BGRA pixels to the backing store, for example.
2597         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
2598         (WebCore::WEBPImageDecoder::decode):
2599         * platform/image-decoders/webp/WEBPImageDecoder.h:
2600
2601 2011-12-11  Zoltan Herczeg  <zherczeg@webkit.org>
2602
2603         Add new CSS nth-children parsing tests
2604         https://bugs.webkit.org/show_bug.cgi?id=74178
2605
2606         Reviewed by Darin Adler.
2607
2608         Test: fast/css/parsing-css-nth-child.html
2609
2610         * css/CSSParser.cpp:
2611         (WebCore::isValidNthToken): Add "-n" to the possible identifiers.
2612
2613 2011-12-11  Kentaro Hara  <haraken@chromium.org>
2614
2615         Use [Supplemental] IDL in WebSocket
2616         https://bugs.webkit.org/show_bug.cgi?id=74160
2617
2618         Reviewed by Adam Barth.
2619
2620         By using the [Supplemental] IDL, this patch moves declarations of WebSocket
2621         attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
2622         which helps make WebSocket a self-contained module.
2623
2624         No new tests, no change in behavior.
2625         Confirm that http/tests/websocket/* pass.
2626
2627         * WebCore.gypi: Added DOMWindowWebSocket.idl.
2628         * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
2629         * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
2630
2631 2011-12-11  Luke Macpherson   <macpherson@chromium.org>
2632
2633         Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty.
2634         https://bugs.webkit.org/show_bug.cgi?id=74262
2635
2636         Reviewed by Andreas Kling.
2637
2638         No new tests / refactoring only.
2639
2640         * css/CSSStyleApplyProperty.cpp:
2641         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2642         * css/CSSStyleSelector.cpp:
2643         (WebCore::CSSStyleSelector::applyProperty):
2644
2645 2011-12-11  Kentaro Hara  <haraken@chromium.org>
2646
2647         Use the [Supplemental] IDL for webaudio attributes in Chromium
2648         https://bugs.webkit.org/show_bug.cgi?id=73394
2649
2650         Reviewed by Adam Barth.
2651
2652         - Overview: Using the [Supplemental] IDL, this patch moves the attribute
2653         declarations of webaudio from DOMWindow.idl into a new IDL file
2654         webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
2655         feature (aka a module).
2656
2657         - This patch changes the build flow of WebCore.gyp as follows:
2658
2659             Previous build flow:
2660                 foreach $idl (all IDL files) {
2661                     generate-bindings.pl depends on $idl;
2662                     generate-bindings.pl reads $idl;
2663                     generate-bindings.pl generates .h and .cpp files for $idl;
2664                 }
2665
2666             New build flow (See the discussions in bug 72138 for more details):
2667                 resolve-supplemental.pl depends on all IDL files;
2668                 resolve-supplemental.pl reads all IDL files;
2669                 resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
2670                 resolve-supplemental.pl outputs supplemental_dependency.tmp;
2671                 foreach $idl (all IDL files) {
2672                     generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
2673                     generate-bindings.pl reads $idl;
2674                     generate-bindings.pl reads supplemental_dependency.tmp;
2675                     generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
2676                 }
2677
2678         - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
2679         will be removed after build scripts for all platforms support the [Supplemental] IDL.
2680         The motivation for the [Supplemented] IDL is as follows:
2681
2682         In order to support the [Supplemental] IDL, we need to
2683         (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
2684         (2) and run generate-bindings.pl with the supplemental_dependency.tmp.
2685
2686         This build flow requires a change on the following build scripts,
2687         but changing all the build scripts all at once without any regression is too difficult:
2688
2689             - DerivedSources.make
2690             - DerivedSources.pri
2691             - GNUmakefile.am
2692             - PlatformBlackBerry.cmake
2693             - UseJSC.cmake
2694             - UseV8.cmake
2695             - WebCore.vcproj/MigrateScripts
2696             - WebCore.vcproj/WebCore.vcproj
2697             - bindings/gobject/GNUmakefile.am
2698             - WebCore.gyp/WebCore.gyp
2699
2700         Thus, we are planning to change the build scripts one by one, which implies that
2701         we need to allow the temporary state in which some build scripts support [Supplemental] IDL
2702         but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
2703         The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
2704         in another IDL file somewhere, like this:
2705
2706             DOMWindowWebAudio.idl:
2707                 interface [
2708                     Supplemental=DOMWindow
2709                 ] DOMWindowWebAudio {
2710                     attribute attr1;
2711                     attribute attr2;
2712                 };
2713
2714             DOMWindow.idl:
2715                 interface [
2716                 ] DOMWindow {
2717                     attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
2718                     attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
2719                     attribute attr3;
2720                     attribute attr4;
2721                 };
2722
2723         Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
2724
2725             - If a given build script supports the [Supplemental] IDL,
2726             generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
2727             - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
2728             as normal attributes and instead ignores all attributes with the [Supplemental] IDL
2729             (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
2730
2731         Tests: webaudio/*
2732
2733         * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
2734         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
2735         (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command.
2736         * WebCore.gypi: Added DOMWindowWebAudio.idl.
2737         * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
2738         * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
2739         * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2740
2741 2011-12-11  Andreas Kling  <kling@webkit.org>
2742
2743         Micro-optimize CSSStyleSelector::findSiblingForStyleSharing().
2744         <http://webkit.org/b/74261>
2745
2746         Reviewed by Antti Koivisto.
2747
2748         Move the isStyledElement() check from canShareStyleWithElement() into the
2749         loop in findSiblingForStyleSharing(), and tighten up the argument/return
2750         types to StyledElement* as appropriate.
2751
2752         * css/CSSStyleSelector.cpp:
2753         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2754         (WebCore::CSSStyleSelector::findSiblingForStyleSharing):
2755         (WebCore::CSSStyleSelector::locateSharedStyle):
2756         * css/CSSStyleSelector.h:
2757
2758 2011-12-11  Shinya Kawanaka  <shinyak@google.com>
2759
2760         Asynchronous path synchronous path of SpellChecker should share the code to mark misspellings.
2761         https://bugs.webkit.org/show_bug.cgi?id=73616
2762
2763         Reviewed by Hajime Morita.
2764
2765         Asynchronous spellchecking path should call the same method for the synchronous spellchecking path
2766         to mark misspellings.
2767
2768         No new tests. Covered by existing tests.
2769
2770         * editing/Editor.cpp:
2771         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2772         (WebCore::Editor::markAndReplaceFor):
2773           Takes SpellCheckRequest object.
2774         * editing/Editor.h:
2775         * editing/SpellChecker.cpp:
2776         (WebCore::SpellChecker::didCheck):
2777           Calls the same method of synchronous spellchecking path.
2778
2779 2011-12-11  Luke Macpherson   <macpherson@chromium.org>
2780
2781         Implement CSS display property in CSSStyleApplyProperty.
2782         https://bugs.webkit.org/show_bug.cgi?id=73500
2783
2784         Reviewed by Andreas Kling.
2785
2786         Refactoring only / no functionality changed.
2787
2788         * css/CSSStyleApplyProperty.cpp:
2789         (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
2790         (WebCore::ApplyPropertyDisplay::applyInheritValue):
2791         (WebCore::ApplyPropertyDisplay::applyInitialValue):
2792         (WebCore::ApplyPropertyDisplay::applyValue):
2793         (WebCore::ApplyPropertyDisplay::createHandler):
2794         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2795         * css/CSSStyleSelector.cpp:
2796         (WebCore::CSSStyleSelector::applyProperty):
2797
2798 2011-12-11  Geoffrey Garen  <ggaren@apple.com>
2799
2800         Try to fix the Qt build.
2801
2802         Unreviewed.
2803
2804         * css/CSSStyleDeclaration.cpp: Maybe an #include will solve our problem?
2805         Someday, compiler error messages will not suck. Today is not that day.
2806
2807 2011-12-11  Luke Macpherson   <macpherson@chromium.org>
2808
2809         Implement CSS resize property in CSSStyleApplyProperty.
2810         https://bugs.webkit.org/show_bug.cgi?id=74162
2811
2812         Reviewed by Julien Chaffraix.
2813
2814         No new tests / refactoring only.
2815
2816         * css/CSSStyleApplyProperty.cpp:
2817         (WebCore::ApplyPropertyResize::applyValue):
2818         (WebCore::ApplyPropertyResize::createHandler):
2819         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2820         * css/CSSStyleSelector.cpp:
2821         (WebCore::CSSStyleSelector::applyProperty):
2822
2823 2011-12-11  Andreas Kling  <kling@webkit.org>
2824
2825         Move CSSElementStyleDeclaration to its own cpp/h files.
2826         <http://webkit.org/b/74256>
2827
2828         Reviewed by Sam Weinig.
2829
2830         CSSElementStyleDeclaration is old enough to move out of CSSMutableStyleDeclaration's
2831         attic and into her own apartment. 
2832
2833         * CMakeLists.txt:
2834         * GNUmakefile.list.am:
2835         * Target.pri:
2836         * WebCore.gypi:
2837         * WebCore.vcproj/WebCore.vcproj:
2838         * WebCore.xcodeproj/project.pbxproj:
2839         * bindings/js/JSDOMBinding.h:
2840         * css/CSSElementStyleDeclaration.cpp: Added.
2841         (WebCore::CSSElementStyleDeclaration::styleSheet):
2842         * css/CSSElementStyleDeclaration.h: Added.
2843         (WebCore::CSSElementStyleDeclaration::element):
2844         (WebCore::CSSElementStyleDeclaration::setElement):
2845         (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
2846         (WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration):
2847         * css/CSSInlineStyleDeclaration.h:
2848         * css/CSSMutableStyleDeclaration.cpp:
2849         * css/CSSMutableStyleDeclaration.h:
2850         * dom/CSSMappedAttributeDeclaration.h:
2851
2852 2011-12-11  Benjamin Poulain  <bpoulain@apple.com>
2853
2854         Add KillRingNone.cpp to Mac build system
2855         https://bugs.webkit.org/show_bug.cgi?id=74168
2856
2857         Reviewed by David Kilzer.
2858
2859         Add KillRingNone.cpp so it can be used on iOS, but
2860         blacklist the file from the build in order to avoid
2861         conflicts with KillRingMac.
2862
2863         * Configurations/WebCore.xcconfig:
2864         * WebCore.xcodeproj/project.pbxproj:
2865
2866 2011-12-11  Peter Rybin  <peter.rybin@gmail.com>
2867
2868         Web Inspector: [protocol] alter some type names generated from Inspector.json
2869         https://bugs.webkit.org/show_bug.cgi?id=74247
2870
2871         Reviewed by Pavel Feldman.
2872
2873         Manually-filled map added that contains problem type names and its replacement.
2874
2875         * inspector/CodeGeneratorInspector.py:
2876         (fix_type_name.Result):
2877         (fix_type_name.Result.output_comment):
2878         (fix_type_name):
2879         (TypeBindings.create_for_named_type_declaration.write_doc):
2880         (TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder):
2881         (TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder):
2882         (TypeBindings):
2883         (TypeBindings.create_for_named_type_declaration.ClassBinding.generate_type_builder):
2884         (Generator.process_types):
2885
2886 2011-12-11  Andreas Kling  <kling@webkit.org>
2887
2888         WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
2889         <http://webkit.org/b/74209> and <rdar://problem/10438197>
2890
2891         Reviewed by Anders Carlsson.
2892
2893         * WebCore.exp.in: Export AffineTransform::scale(double).
2894
2895 2011-12-10  Andreas Kling  <kling@webkit.org>
2896
2897         Remove OS(SYMBIAN) block from Settings constructor.
2898         <http://webkit.org/b/74248>
2899
2900         Reviewed by Benjamin Poulain.
2901
2902         Kill the last OS(SYMBIAN) block in WebKit!
2903
2904         * page/Settings.cpp:
2905         (WebCore::Settings::Settings):
2906
2907 2011-12-11  Dan Bernstein  <mitz@apple.com>
2908
2909         <rdar://problem/10561285> REGRESSION (r80438): First word on a line or after collapsed space may not be hyphenated even though it should
2910         https://bugs.webkit.org/show_bug.cgi?id=74239
2911
2912         Reviewed by Anders Carlsson.
2913
2914         Tests: fast/text/hyphenate-first-word-after-skipped-space-expected.html
2915                fast/text/hyphenate-first-word-after-skipped-space.html
2916
2917         * rendering/RenderBlockLineLayout.cpp:
2918         (WebCore::tryHyphenating): Replaced the assumption that the character at lastSpace is a space
2919         iff lastSpace is non-zero with a test of whether it is a space, in the sense that it should
2920         not be counted as part of the prefix when comparing it to the value of hyphenate-limit-before.
2921
2922 2011-12-10  Benjamin Poulain  <bpoulain@apple.com>
2923
2924         #ifdef the parts of the Mac platform which should not be used on iOS
2925         https://bugs.webkit.org/show_bug.cgi?id=74246
2926
2927         Reviewed by David Kilzer.
2928
2929         * Configurations/WebCore.xcconfig:
2930         * platform/FileSystem.cpp:
2931         * platform/mac/FileSystemMac.mm:
2932         * platform/mac/Language.mm:
2933         (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]):
2934         (WebCore::createHTTPStyleLanguageCode):
2935         (WebCore::platformDefaultLanguage):
2936         * platform/mac/LocalizedStringsMac.mm:
2937         (WebCore::localizedString):
2938         (+[WebCoreSharedBufferData initialize]):
2939         * platform/mac/WebCoreNSStringExtras.h:
2940         * platform/mac/WebCoreNSStringExtras.mm:
2941         * platform/mac/WebFontCache.mm:
2942         * platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is
2943         not defined in the iOS SDK so we add it here.
2944
2945 2011-12-10  Ryosuke Niwa  <rniwa@webkit.org>
2946
2947         The previous fix broke Lion release build. Fix that.
2948
2949         * editing/SpellingCorrectionCommand.cpp:
2950
2951 2011-12-10  Ryosuke Niwa  <rniwa@webkit.org>
2952
2953         Lion build fix attempt after r102527.
2954
2955         * editing/SpellingCorrectionCommand.cpp:
2956
2957 2011-12-10  Kevin Ollivier  <kevino@theolliviers.com>
2958
2959         [wx] Unreviewed build fixes. Add missing header for CPP
2960         DOM bindings and add stubs for new DPI methods.
2961         
2962         * bindings/scripts/CodeGeneratorCPP.pm:
2963         (AddIncludesForType):
2964         * platform/wx/ScreenWx.cpp:
2965         (WebCore::screenHorizontalDPI):
2966         (WebCore::screenVerticalDPI):
2967
2968 2011-12-10  Ryosuke Niwa  <rniwa@webkit.org>
2969
2970         Mac build fix. Remove an erroneous OVERRIDE.
2971
2972         * editing/CompositeEditCommand.h:
2973
2974 2011-12-09  Robert Hogan  <robert@webkit.org>
2975
2976         CSS 2.1 failure: numerous counter-increment-* tests fail
2977         https://bugs.webkit.org/show_bug.cgi?id=73360
2978
2979         Reviewed by Julien Chaffraix.
2980
2981         Allow counter-increment to handle integer underflow and overflow.
2982         Also allow 'counter' to inherit.
2983
2984         * css/CSSStyleApplyProperty.cpp:
2985         (WebCore::ApplyPropertyCounter::applyInheritValue):
2986         (WebCore::ApplyPropertyCounter::applyValue):
2987         (WebCore::ApplyPropertyCounter::createHandler):
2988
2989 2011-12-09  Ryosuke Niwa  <rniwa@webkit.org>
2990
2991         There should be a way to count the number of nodes held by undo stack
2992         https://bugs.webkit.org/show_bug.cgi?id=74099
2993
2994         Reviewed by Enrica Casucci.
2995
2996         Add getNodesInCommand to all SimpleEditCommands and EditCommandComposition in debug builds.
2997         We can easily aggregate the number of nodes held by the undo stack by calling
2998         this function on each item in the undo stack.
2999
3000         * editing/AppendNodeCommand.cpp:
3001         (WebCore::AppendNodeCommand::getNodesInCommand):
3002         * editing/AppendNodeCommand.h:
3003         * editing/CompositeEditCommand.cpp:
3004         (WebCore::EditCommandComposition::getNodesInCommand):
3005         * editing/CompositeEditCommand.h:
3006         * editing/DeleteFromTextNodeCommand.cpp:
3007         (WebCore::DeleteFromTextNodeCommand::getNodesInCommand):
3008         * editing/DeleteFromTextNodeCommand.h:
3009         * editing/EditCommand.cpp:
3010         (WebCore::SimpleEditCommand::addNodeAndDescedents):
3011         * editing/EditCommand.h:
3012         * editing/Editor.cpp:
3013         (WebCore::Editor::appliedEditing):
3014         * editing/InsertIntoTextNodeCommand.cpp:
3015         (WebCore::InsertIntoTextNodeCommand::getNodesInCommand):
3016         * editing/InsertIntoTextNodeCommand.h:
3017         * editing/InsertNodeBeforeCommand.cpp:
3018         (WebCore::InsertNodeBeforeCommand::getNodesInCommand):
3019         * editing/InsertNodeBeforeCommand.h:
3020         * editing/MergeIdenticalElementsCommand.cpp:
3021         (WebCore::MergeIdenticalElementsCommand::getNodesInCommand):
3022         * editing/MergeIdenticalElementsCommand.h:
3023         * editing/RemoveCSSPropertyCommand.cpp:
3024         (WebCore::RemoveCSSPropertyCommand::getNodesInCommand):
3025         * editing/RemoveCSSPropertyCommand.h:
3026         * editing/RemoveNodeCommand.cpp:
3027         (WebCore::RemoveNodeCommand::getNodesInCommand):
3028         * editing/RemoveNodeCommand.h:
3029         * editing/ReplaceNodeWithSpanCommand.cpp:
3030         (WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):
3031         * editing/ReplaceNodeWithSpanCommand.h:
3032         * editing/SetNodeAttributeCommand.cpp:
3033         (WebCore::SetNodeAttributeCommand::getNodesInCommand):
3034         * editing/SetNodeAttributeCommand.h:
3035         * editing/SetSelectionCommand.h:
3036         * editing/SplitElementCommand.cpp:
3037         (WebCore::SplitElementCommand::getNodesInCommand):
3038         * editing/SplitElementCommand.h:
3039         * editing/SplitTextNodeCommand.cpp:
3040         (WebCore::SplitTextNodeCommand::getNodesInCommand):
3041         * editing/SplitTextNodeCommand.h:
3042         * editing/WrapContentsInDummySpanCommand.cpp:
3043         (WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):
3044         * editing/WrapContentsInDummySpanCommand.h:
3045
3046 2011-11-09  Robert Hogan  <robert@webkit.org>
3047
3048         CSS 2.1 failure: outline-color-* tests fail
3049         https://bugs.webkit.org/show_bug.cgi?id=71931
3050
3051         Reviewed by Julien Chaffraix.
3052
3053         Test: css2.1/20110323/outline-color-001.html
3054
3055         WebKit didn't paint the top block in this series of tests because it ignored the outline
3056         of objects with a zero size. Fix this by taking account of both offset and width of the
3057         outline when deciding whether to paint it. 
3058
3059         * rendering/RenderObject.cpp:
3060         (WebCore::RenderObject::paintOutline): paint the outline even when the block has zero size
3061
3062 2011-12-10   Arko Saha  <arko@motorola.com>
3063
3064         Microdata: Fix compilation error in MICRODATA enabled build.
3065         https://bugs.webkit.org/show_bug.cgi?id=74235
3066
3067         Reviewed by Andreas Kling.
3068
3069         * dom/Document.cpp:
3070         (WebCore::Document::getItems):
3071
3072 2011-12-10  Jarred Nicholls  <jarred@sencha.com>
3073
3074         [V8] Remove old ArrayBuffer guards from V8XMLHttpRequestCustom.cpp
3075         https://bugs.webkit.org/show_bug.cgi?id=74234
3076
3077         Reviewed by Adam Barth.
3078
3079         No new tests are necessary.
3080
3081         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3082         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
3083
3084 2011-12-10  Noel Gordon  <noel.gordon@gmail.com>
3085
3086         WebPImageDecoder progressive decodes fail to decode valid images
3087         https://bugs.webkit.org/show_bug.cgi?id=74062
3088
3089         Reviewed by Adam Barth.
3090
3091         The WEBP header is followed by a so-called P0 header, then some data to
3092         decode.  If a partial P0 header is received during progressive decodes,
3093         WebPIDecGetRGB() returns false; that makes the decoder enter the failed
3094         state, no image appears on the page.
3095
3096         James Zern (webp) recommended the following via e-mail:
3097
3098         WebPIUpdate() validates input data, and will return an error status for
3099         malformed data (bit-stream error, invalid data).  Otherwise, it returns
3100         OK or SUSPENDED.  OK means that decoding is done/complete/no-error, and
3101         SUSPENDED means more input data is needed to complete decoding.  A NULL
3102         return from WebPIDecGetRGB() is valid at this time due to a partial P0,
3103         and should not be interpreted as a decoding failure.
3104
3105         No new tests. Not something DumpRenderTree can easily test.
3106
3107         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
3108         (WebCore::WEBPImageDecoder::decode):  A NULL WebPIDecGetRGB() return is
3109         acceptable here.  Return false instead of failing the decoder.
3110
3111 2011-12-09  Benjamin Poulain  <bpoulain@apple.com>
3112
3113         Add the FileSystem functions of iOS
3114         https://bugs.webkit.org/show_bug.cgi?id=74164
3115
3116         Reviewed by David Kilzer.
3117
3118         Two functions are needed on iOS for temporary files and directories.
3119
3120         * WebCore.exp.in:
3121         * WebCore.xcodeproj/project.pbxproj:
3122         * platform/ios/FileSystemIOS.h: Added.
3123         * platform/ios/FileSystemIOS.mm: Added.
3124         (WebCore::createTemporaryDirectory):
3125         (WebCore::createTemporaryFile):
3126
3127 2011-12-09  Jacky Jiang  <zhajiang@rim.com>
3128
3129         Remove ResourceHandle::bufferedData() from ResourceHandleBlackBerry.cpp
3130         https://bugs.webkit.org/show_bug.cgi?id=74197
3131
3132         The bufferedData() was removed in r95120.
3133
3134         Reviewed by Rob Buis.
3135
3136         Trivial fix, so no new tests.
3137
3138         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
3139
3140 2011-12-09  Eric Penner  <epenner@google.com>
3141
3142         [chromium] Prevent ASSERT in legitimate out-of-memory case.
3143         https://bugs.webkit.org/show_bug.cgi?id=74215
3144
3145         Reviewed by James Robinson.
3146
3147         * platform/graphics/chromium/TiledLayerChromium.cpp:
3148         (WebCore::TiledLayerChromium::updateCompositorResources):
3149
3150 2011-12-09   Arko Saha  <arko@motorola.com>
3151
3152         NameNodeListCache should be invalidated when name attribute changes/modified.
3153         https://bugs.webkit.org/show_bug.cgi?id=70810
3154
3155         Reviewed by Ryosuke Niwa.
3156
3157         Test: fast/dom/getelementsbyname-invalidation-cache.html
3158
3159         * html/HTMLAnchorElement.cpp:
3160         (WebCore::HTMLAnchorElement::parseMappedAttribute):
3161         * html/HTMLAppletElement.cpp:
3162         (WebCore::HTMLAppletElement::parseMappedAttribute):
3163         * html/HTMLElement.cpp:
3164         (WebCore::HTMLElement::parseMappedAttribute):
3165         * html/HTMLEmbedElement.cpp:
3166         (WebCore::HTMLEmbedElement::parseMappedAttribute):
3167         * html/HTMLFormElement.cpp:
3168         (WebCore::HTMLFormElement::parseMappedAttribute):
3169         * html/HTMLFrameElementBase.cpp:
3170         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
3171         * html/HTMLIFrameElement.cpp:
3172         (WebCore::HTMLIFrameElement::parseMappedAttribute):
3173         * html/HTMLImageElement.cpp:
3174         (WebCore::HTMLImageElement::parseMappedAttribute):
3175         * html/HTMLMapElement.cpp:
3176         (WebCore::HTMLMapElement::parseMappedAttribute):
3177         * html/HTMLMetaElement.cpp:
3178         (WebCore::HTMLMetaElement::parseMappedAttribute):
3179         * html/HTMLObjectElement.cpp:
3180         (WebCore::HTMLObjectElement::parseMappedAttribute):
3181         * html/HTMLParamElement.cpp:
3182         (WebCore::HTMLParamElement::parseMappedAttribute):
3183
3184 2011-12-09  Anders Carlsson  <andersca@apple.com>
3185
3186         Fix Lion release build.
3187
3188         * platform/mac/ScrollAnimatorMac.mm:
3189         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
3190
3191 2011-12-09  Mark Pilgrim  <pilgrim@chromium.org>
3192
3193         [FileSystem API] Entry.remove successCallback is required
3194         https://bugs.webkit.org/show_bug.cgi?id=69639
3195
3196         Reviewed by Adam Barth.
3197
3198         Test: fast/filesystem/simple-required-arguments-remove.html
3199
3200         * fileapi/Entry.idl: remove [Optional] flag from Entry.remove.successCallback parameter
3201
3202 2011-12-09  Tim Horton  <timothy_horton@apple.com>
3203
3204         background-image transitions trigger between equivalent images
3205         https://bugs.webkit.org/show_bug.cgi?id=74229
3206         <rdar://problem/10558627>
3207
3208         Reviewed by Darin Adler.
3209         Patch by Simon Fraser.
3210
3211         For animation property wrappers around StyleImage properties,
3212         test the equivalence of the image itself, instead of equality of
3213         the StyleImage pointer.
3214
3215         Test: transitions/equivalent-background-image-no-transition.html
3216
3217         * page/animation/AnimationBase.cpp:
3218         (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
3219         (WebCore::StyleImagePropertyWrapper::equals):
3220         (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
3221         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
3222         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
3223         (WebCore::AnimationBase::ensurePropertyMap):
3224
3225 2011-12-09  Mary Wu  <mary.wu@torchmobile.com.cn>
3226
3227         Small style fix on DragDataBlackBerry.cpp
3228         https://bugs.webkit.org/show_bug.cgi?id=74171
3229
3230         Reviewed by Rob Buis.
3231
3232         Style fix, no function impact, no new tests.
3233
3234         * platform/blackberry/DragDataBlackBerry.cpp:
3235         (WebCore::DragData::containsURL):
3236         (WebCore::DragData::asFilenames):
3237         (WebCore::DragData::asURL):
3238         (WebCore::DragData::asFragment):
3239
3240 2011-12-09  Tony Chang  <tony@chromium.org>
3241
3242         add css parsing for flex-flow: wrap and wrap-reverse
3243         https://bugs.webkit.org/show_bug.cgi?id=74008
3244
3245         Reviewed by Ojan Vafai.
3246
3247         Also save 2 bits in StyleFlexibleBoxData by changing the size of m_flexFlow (there are only 4 enum values).
3248
3249         * css/CSSComputedStyleDeclaration.cpp:
3250         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Print the wrap value if it exists.
3251         * css/CSSParser.cpp:
3252         (WebCore::CSSParser::parseValue): Parse a second token and put the values into a CSSValueList.
3253         * css/CSSPrimitiveValueMappings.h:
3254         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3255         (WebCore::CSSPrimitiveValue::operator EFlexWrap):
3256         * css/CSSStyleApplyProperty.cpp:
3257         (WebCore::ApplyPropertyFlexFlow::applyInheritValue): Does not inherit.
3258         (WebCore::ApplyPropertyFlexFlow::applyInitialValue):
3259         (WebCore::ApplyPropertyFlexFlow::applyValue): Special handler for setting two render style values from one
3260         CSS property.
3261         (WebCore::ApplyPropertyFlexFlow::createHandler):
3262         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3263         * css/CSSValueKeywords.in:
3264         * rendering/style/RenderStyle.h:
3265         (WebCore::InheritedFlags::flexWrap):
3266         (WebCore::InheritedFlags::setFlexWrap):
3267         (WebCore::InheritedFlags::initialFlexWrap):
3268         * rendering/style/RenderStyleConstants.h: EFlexWrap to hold flex wrap values.
3269         * rendering/style/StyleFlexibleBoxData.cpp:
3270         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
3271         (WebCore::StyleFlexibleBoxData::operator==):
3272         * rendering/style/StyleFlexibleBoxData.h: 2 bits is enough to hold the 4 flexFlow values.
3273
3274 2011-12-09  KwangHyuk Kim  <hyuki.kim@samsung.com>
3275
3276         [EFL] Add RefPtrEfl specialization for evas_object.
3277         https://bugs.webkit.org/show_bug.cgi?id=73790
3278
3279         Reviewed by Ryosuke Niwa.
3280
3281         As evas_object is also based on reference count, RefPtr is applied for evas_object.
3282
3283         * PlatformEfl.cmake:
3284         * platform/efl/RefPtrEfl.cpp: Added.
3285         (WTF::refIfNotNull):
3286         (WTF::derefIfNotNull):
3287         * platform/efl/RefPtrEfl.h: Added.
3288
3289 2011-12-09  Tony Chang  <tony@chromium.org>
3290
3291         REGRESSION(102234): 2-3% layout regression
3292         https://bugs.webkit.org/show_bug.cgi?id=74141
3293
3294         Reviewed by David Hyatt.
3295
3296         Don't allocate a RuleSet when there are no regions.
3297
3298         * css/CSSStyleSelector.cpp:
3299         (WebCore::CSSStyleSelector::initForRegionStyling):
3300
3301 2011-12-09  Anders Carlsson  <andersca@apple.com>
3302
3303         Fix assertion failure in ScrollAnimatorMac
3304         https://bugs.webkit.org/show_bug.cgi?id=74222
3305
3306         Reviewed by Andreas Kling.
3307
3308         * platform/mac/ScrollAnimatorMac.mm:
3309         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
3310         This can be called with a nil scrollerImp, just return NSZeroPoint when that happens.
3311
3312 2011-12-09  Anders Carlsson  <andersca@apple.com>
3313
3314         Move the "is currently drawing into layer" flag out into ScrollbarThemeMac
3315         https://bugs.webkit.org/show_bug.cgi?id=74217
3316
3317         Reviewed by Beth Dakin.
3318
3319         There's no need to store this flag inside ScrollAnimatorMac, just make it a global and put it in ScrollbarThemeMac instead.
3320
3321         * platform/mac/ScrollAnimatorMac.h:
3322         * platform/mac/ScrollAnimatorMac.mm:
3323         (-[WebScrollbarPainterDelegate layer]):
3324         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3325         * platform/mac/ScrollbarThemeMac.h:
3326         * platform/mac/ScrollbarThemeMac.mm:
3327         (WebCore::ScrollbarThemeMac::isCurrentlyDrawingIntoLayer):
3328         (WebCore::ScrollbarThemeMac::paint):
3329
3330 2011-12-09  Anders Carlsson  <andersca@apple.com>
3331
3332         Minor cleanup in ScrollAnimatorMac.mm
3333         https://bugs.webkit.org/show_bug.cgi?id=74211
3334
3335         Reviewed by Andreas Kling.
3336
3337         * platform/mac/ScrollAnimatorMac.mm:
3338         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
3339         No need to get the scrollbar from the scroll animator anymore.
3340
3341         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
3342         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
3343         Try to get data from the scrollbar and/or the scrollable area instead of the scrollbar painter.
3344
3345 2011-12-09  David Levin  <levin@chromium.org>
3346
3347         Regression(r53595): Sync xhr requests in workers aren't terminated on worker close.
3348         https://bugs.webkit.org/show_bug.cgi?id=71695
3349
3350         Reviewed by Zoltan Herczeg.
3351
3352         Overview: Message loops rely on the message queue being killed in order
3353         to exit. r53595 stopped this from happening because killing a message loop
3354         would also stop it from doing database clean up tasks. The database clean up
3355         tasks needed to be tasks due to ordering issues. (They wanted to run after
3356         certain order tasks were run.) This was solved by once again terminating
3357         the message queue but then still runnning clean-up tasks from the killed
3358         message queue.
3359
3360         * workers/WorkerRunLoop.cpp:
3361         (WebCore::WorkerRunLoop::run): Added the call to run clean-up tasks.
3362         (WebCore::WorkerRunLoop::runInMode):
3363         (WebCore::WorkerRunLoop::runCleanupTasks): Loop to simply clear out all clean up tasks.
3364         (WebCore::WorkerRunLoop::Task::performTask): Stop non-clean up tasks
3365         from running after the loop has been terminated.
3366         * workers/WorkerRunLoop.h:
3367         (WebCore::WorkerRunLoop::terminated): Just made it const.
3368         * workers/WorkerThread.cpp:
3369         (WebCore::WorkerThreadShutdownFinishTask::performTask): Removed
3370         the terminate clause since it was put back in stop.
3371         (WebCore::WorkerThread::stop): Terminate the run loop so
3372         that all loops will exit and clean up tasks will run. Also removed a comment
3373         about nested workers because nested workers are no longer imminent and the
3374         issue mentioned is one of many that should logically be investigated -- behavior correctness
3375         in the face of different orderings of shutdown between the document and each worker --
3376         when implementing them.
3377
3378 2011-12-09  Tony Chang  <tony@chromium.org>
3379
3380         Unreviewed, rolling out r102416.
3381         http://trac.webkit.org/changeset/102416
3382         https://bugs.webkit.org/show_bug.cgi?id=73394
3383
3384         Chromium Win clobber builds are failing.
3385
3386         * WebCore.gyp/WebCore.gyp:
3387         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
3388         (main):
3389         * WebCore.gypi:
3390         * bindings/scripts/generate-bindings.pl:
3391         * page/DOMWindow.idl:
3392         * webaudio/DOMWindowWebAudio.idl: Removed.
3393
3394 2011-12-09  Eric Carlson  <eric.carlson@apple.com>
3395
3396         JSC wrappers for TextTrack and TextTrackCue should not be collected during event dispatch or when owner is reachable
3397         https://bugs.webkit.org/show_bug.cgi?id=72179
3398
3399         Reviewed by Geoff Garen.
3400
3401         Tests: media/track/text-track-cue-is-reachable.html
3402                media/track/text-track-is-reachable.html
3403
3404         * GNUmakefile.list.am: Add JSTextTrackCueCustom.cpp and JSTextTrackCustom.cpp.
3405         * Target.pri: Ditto.
3406         * WebCore.gypi: Ditto.
3407         * WebCore.xcodeproj/project.pbxproj: Ditto
3408         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
3409
3410         * bindings/js/JSTextTrackCueCustom.cpp: Added.
3411         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): New.
3412         (WebCore::JSTextTrackCueOwner::visitChildren): New.
3413
3414         * bindings/js/JSTextTrackCustom.cpp: Added.
3415         (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots): New.
3416         (WebCore::JSTextTrack::visitChildren): New, mark all cues.
3417         * bindings/js/JSTextTrackCustom.h: Added.
3418         (WebCore::root): New.
3419
3420         * bindings/js/JSTextTrackListCustom.cpp:
3421         (WebCore::JSTextTrackList::visitChildren): New, mark all tracks.
3422
3423         * html/HTMLMediaElement.cpp:
3424         (WebCore::HTMLMediaElement::trackWillBeRemoved): TextTracks::remove now takes a TextTrack*.
3425
3426         * html/LoadableTextTrack.h:
3427         (WebCore::LoadableTextTrack::trackElement): New, return the <track>.
3428
3429         * html/TextTrack.cpp:
3430         (WebCore::TextTrack::TextTrack): Initialize m_mediaElement.
3431         * html/TextTrack.h:
3432         (WebCore::TextTrack::setMediaElement): New.
3433         (WebCore::TextTrack::mediaElement): Ditto.
3434
3435         * html/TextTrack.idl: Add CustomIsReachable and CustomMarkFunction.
3436
3437         * html/TextTrackCue.idl: Add CustomIsReachable.
3438
3439         * html/track/TextTrackList.cpp:
3440         (TextTrackList::append): Set track's media element.
3441         (TextTrackList::remove): Clear track's media element. Take a raw ptr, not a PassRefPtr.
3442         * html/track/TextTrackList.h:
3443         * html/track/TextTrackList.idl: Add CustomMarkFunction
3444
3445 2011-12-09  Chris Fleizach  <cfleizach@apple.com>
3446
3447         WebKit should ignore images with @alt matching only whitespace
3448         https://bugs.webkit.org/show_bug.cgi?id=74189
3449
3450         Reviewed by Darin Adler.
3451
3452         Test: accessibility/img-alt-tag-only-whitespace.html
3453
3454         * accessibility/AccessibilityRenderObject.cpp:
3455         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3456
3457 2011-12-09  Anders Carlsson  <andersca@apple.com>
3458
3459         Remove NSAnimationContext calls
3460         https://bugs.webkit.org/show_bug.cgi?id=74207
3461
3462         Reviewed by Sam Weinig.
3463
3464         NSAnimationContext is not used for NSAnimation s