e369d71ec58e7a33937c3d895a981aab9b89be92
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-09  Enrica Casucci  <enrica@apple.com>
2
3         Only measure text once instead of twice when performing line layout.
4         https://bugs.webkit.org/show_bug.cgi?id=98317
5         <rdar://problem/12080821>
6
7         Reviewed by Dan Bernstein.
8
9         Since we are measuring each word to find out where the line break should occur,
10         we should cache that information to avoid measuring the run again when
11         creating the line box. The bulk of the change is in nextLineBreak, where
12         the measurements are collected and placed in a vector so that they can
13         be consumed in setLogicalWidthForTextRun where we used to measure the
14         text one more time.
15         Each entry in the vector is a WordMeasurement object that contains information
16         about the start and end offset in the run, the renderer, the measured width
17         and, possibly, a list of fallback fonts.
18         When we need to compute the width of the run to create the line box, we add
19         all the measurements for the given renderer in the run to get the total width.
20
21         * platform/graphics/Font.cpp:
22         (WebCore::Font::width): Added fallback fonts parameter.
23         * platform/graphics/Font.h:
24         (Font): Added fallback fonts parameter to the width static member function.
25         This method is called when we compute the width using TextLayout.
26         * platform/graphics/mac/ComplexTextController.cpp:
27         (WebCore::TextLayout::width): Added fallback fonts parameter.
28         (WebCore::Font::width):
29         (WebCore::ComplexTextController::advance):
30         * platform/graphics/mac/ComplexTextController.h:
31         (ComplexTextController): Added fallback fonts parameter to advance method.
32         * rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
33         * rendering/RenderBlockLineLayout.cpp:
34         (WordMeasurement): Added new class to hold measurement information.
35         (WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
36         cached information.
37         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
38         (WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
39         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
40         vector and its use.
41         (WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
42         (WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
43         the measurements of the individual words and add them to the vector.
44
45 2012-10-09  Levi Weintraub  <leviw@chromium.org>
46
47         [Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
48         https://bugs.webkit.org/show_bug.cgi?id=98571
49
50         Reviewed by Emil A Eklund.
51
52         Refactoring all coordinate-switching functionality to use a single "mode" flag
53         as opposed to having a bunch of boolean values. This enables the same set of
54         options across the board, and a consistent interface. This was previously
55         done for mapLocalToContainer.
56
57         The imptetus for this for this stems from the one logical change in this patch
58         which only effects sub-pixel layout. FrameView::convertToRenderer and
59         convertFromRenderer return IntPoint coordinates, and need to also snap transform
60         offsets to determine proper rects for scrolling.
61
62         Unlabeled functions below are simply being updated to these new interfaces.
63
64         Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
65
66         * WebCore.exp.in:
67         * dom/ContainerNode.cpp:
68         (WebCore::ContainerNode::getUpperLeftCorner):
69         (WebCore::ContainerNode::getLowerRightCorner):
70         * dom/Element.cpp:
71         (WebCore::Element::boundsInRootViewSpace):
72         * dom/MouseRelatedEvent.cpp:
73         (WebCore::MouseRelatedEvent::computeRelativePosition):
74         * dom/Node.cpp:
75         (WebCore::Node::convertToPage):
76         (WebCore::Node::convertFromPage):
77         * html/HTMLSelectElement.cpp:
78         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
79         * html/shadow/SliderThumbElement.cpp:
80         (WebCore::SliderThumbElement::setPositionFromPoint):
81         * html/shadow/SpinButtonElement.cpp:
82         (WebCore::SpinButtonElement::defaultEventHandler):
83         * page/FrameView.cpp:
84         (WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
85         them to TransformState, which transforms the coordinates.
86         (WebCore::FrameView::convertFromRenderer): Ditto.
87         * rendering/LayoutState.cpp:
88         (WebCore::LayoutState::LayoutState):
89         * rendering/RenderBlock.cpp:
90         (WebCore::RenderBlock::absoluteQuads):
91         * rendering/RenderBox.cpp:
92         (WebCore::RenderBox::absoluteQuads):
93         (WebCore::RenderBox::mapLocalToContainer):
94         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
95         * rendering/RenderBox.h:
96         (RenderBox):
97         * rendering/RenderBoxModelObject.cpp:
98         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
99         * rendering/RenderBoxModelObject.h:
100         (RenderBoxModelObject):
101         * rendering/RenderEmbeddedObject.cpp:
102         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
103         * rendering/RenderFrameSet.cpp:
104         (WebCore::RenderFrameSet::userResize):
105         * rendering/RenderGeometryMap.cpp:
106         (WebCore::RenderGeometryMap::absolutePoint):
107         * rendering/RenderInline.cpp:
108         (WebCore::RenderInline::mapLocalToContainer):
109         * rendering/RenderInline.h:
110         (RenderInline):
111         * rendering/RenderLayer.cpp:
112         (WebCore::RenderLayer::absoluteToContents):
113         (WebCore::RenderLayer::calculateClipRects):
114         * rendering/RenderMediaControls.cpp:
115         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
116         * rendering/RenderMenuList.cpp:
117         (WebCore::RenderMenuList::showPopup):
118         * rendering/RenderObject.cpp:
119         (WebCore::RenderObject::localToAbsolute):
120         (WebCore::RenderObject::absoluteToLocal):
121         (WebCore::RenderObject::mapLocalToContainer):
122         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
123         (WebCore::RenderObject::localToContainerQuad):
124         (WebCore::RenderObject::localToContainerPoint):
125         * rendering/RenderObject.h:
126         (RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
127         now used for other conversion methods.
128         (WebCore::RenderObject::localToAbsoluteQuad):
129         * rendering/RenderTheme.cpp:
130         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
131         * rendering/RenderView.cpp:
132         (WebCore::RenderView::mapLocalToContainer):
133         (WebCore::RenderView::mapAbsoluteToLocalPoint):
134         * rendering/RenderView.h:
135         (RenderView):
136         * rendering/svg/RenderSVGForeignObject.cpp:
137         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
138         * rendering/svg/RenderSVGForeignObject.h:
139         (RenderSVGForeignObject):
140         * rendering/svg/RenderSVGInline.cpp:
141         (WebCore::RenderSVGInline::mapLocalToContainer):
142         * rendering/svg/RenderSVGInline.h:
143         (RenderSVGInline):
144         * rendering/svg/RenderSVGModelObject.cpp:
145         (WebCore::RenderSVGModelObject::mapLocalToContainer):
146         * rendering/svg/RenderSVGModelObject.h:
147         (RenderSVGModelObject):
148         * rendering/svg/RenderSVGRoot.cpp:
149         (WebCore::RenderSVGRoot::mapLocalToContainer):
150         * rendering/svg/RenderSVGRoot.h:
151         (RenderSVGRoot):
152         * rendering/svg/RenderSVGText.cpp:
153         (WebCore::RenderSVGText::mapLocalToContainer):
154         * rendering/svg/RenderSVGText.h:
155         (RenderSVGText):
156         * rendering/svg/SVGRenderSupport.cpp:
157         (WebCore::SVGRenderSupport::mapLocalToContainer):
158         * svg/SVGSVGElement.cpp:
159         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
160
161 2012-10-09  Jon Lee  <jonlee@apple.com>
162
163         [WK2] Have plugins render offscreen to capture snapshot
164         https://bugs.webkit.org/show_bug.cgi?id=98326
165         <rdar://problem/12426658>
166
167         Reviewed by Simon Fraser.
168
169         Change updateSnapshot() to use a PassRefPtr<Image> instead of Image*. WebKit2 ultimately
170         hands the image off to RenderSnapshottedPlugin. A CachedImage instance then manages the
171         lifetime of the Image.
172
173         * html/HTMLPlugInElement.h:
174         (WebCore::HTMLPlugInElement::updateSnapshot):
175         * html/HTMLPlugInImageElement.cpp:
176         (WebCore::HTMLPlugInImageElement::updateSnapshot):
177         * html/HTMLPlugInImageElement.h:
178         (HTMLPlugInImageElement):
179         * rendering/RenderSnapshottedPlugIn.cpp:
180         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Updated to use the PassRefPtr<Image>
181         pointer.
182         * rendering/RenderSnapshottedPlugIn.h:
183         (RenderSnapshottedPlugIn):
184
185 2012-10-09  Adam Barth  <abarth@webkit.org>
186
187         Unreviewed. Move this file to where the build systems think it should
188         be. See https://bugs.webkit.org/show_bug.cgi?id=94755
189
190         * platform/graphics/CustomFilterConstants.h: Removed.
191         * platform/graphics/filters/CustomFilterConstants.h: Copied from Source/WebCore/platform/graphics/CustomFilterConstants.h.
192
193 2012-10-09  Tony Chang  <tony@chromium.org>
194
195         Use computeLogical* methods instead of updateLogical* methods in RenderImage
196         https://bugs.webkit.org/show_bug.cgi?id=98802
197
198         Reviewed by Eric Seidel.
199
200         We were storing the old values of width/height, calling updateLogical{Width,Height}, then restoring
201         the old values.  Instead, use the computeLogical{Width,Height} methods so we don't have to overwrite
202         the current values.
203
204         No new tests, this is just a refactoring.
205
206         * rendering/RenderImage.cpp:
207         (WebCore::RenderImage::imageDimensionsChanged):
208
209 2012-10-09  Enrica Casucci  <enrica@apple.com>
210
211         [chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-
212         background-canvas.html failing on the Mac after r130443
213         https://bugs.webkit.org/show_bug.cgi?id=98545
214
215         Reviewed by Tony Chang.
216
217         Adding back the ! removed by mistake before submitting r130779. 
218
219         * platform/graphics/FontFastPath.cpp:
220         (WebCore::Font::glyphDataAndPageForCharacter):
221
222 2012-10-09  Artem Simonov  <asimonov@rim.com>
223
224         [BlackBerry] EGL Context deleted prematurely in GraphicsContext3D destructor
225         https://bugs.webkit.org/show_bug.cgi?id=98796
226
227         Reviewed by George Staikos.
228
229         Reordered destruction of GraphicsContext3D so that the compositing layer is
230         destroyed first.
231
232         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
233         (WebCore::GraphicsContext3D::~GraphicsContext3D):
234
235 2012-10-09  Ben Wagner  <bungeman@chromium.org>
236
237         Disable hinting when webkit-font-smoothing:antialiased is used on Mac.
238         https://bugs.webkit.org/show_bug.cgi?id=98061
239
240         Reviewed by Stephen White.
241
242         Normal anti-aliased text matches subpixel anti-aliased text.
243         However, text marked with webkit-font-smoothing:antialiased should be drawn without hinting to match Safari.
244         See crbug.com/152304 . 
245
246         Test is fast/css/font-smoothing.html, but DRT runs with font smoothing disabled, so no change visible. 
247
248         * platform/graphics/skia/FontSkia.cpp:
249         (WebCore::setupPaint):
250         Set kNo_Hinting when webkit-font-smoothing is antialiased.
251
252 2012-10-09  Max Vujovic  <mvujovic@adobe.com>
253
254         [CSS Shaders] Create constants for vertex attribute sizes and offsets
255         https://bugs.webkit.org/show_bug.cgi?id=94755
256
257         Reviewed by Dean Jackson.
258
259         Factor out the vertex attribute size and offset constants into a new file,
260         CustomFilterConstants.h. Replace literals in CustomFilterMeshGenerator with the constants.
261
262         I could have added the constants to CustomFilterMeshGenerator.h, but this would make
263         FECustomFilter depend on CustomFilterMeshGenerator.
264
265         I also could have added the constants to CustomFilterMesh.h, but this would make
266         CustomFilterMeshGenerator depend on CustomFilterMesh.
267
268         No new tests. No change in behavior.
269
270         * GNUmakefile.list.am:
271         * Target.pri:
272         * WebCore.gypi:
273         * WebCore.vcproj/WebCore.vcproj:
274         * WebCore.xcodeproj/project.pbxproj:
275         * platform/graphics/CustomFilterConstants.h: Added.
276         (WebCore):
277         * platform/graphics/filters/CustomFilterMeshGenerator.h:
278         (WebCore::CustomFilterMeshGenerator::floatsPerVertex):
279             Use the new constants instead of literal values.
280         * platform/graphics/filters/FECustomFilter.cpp:
281         (WebCore::FECustomFilter::bindProgramAndBuffers):
282             Pull the constant definitions out of here.
283
284 2012-10-09  Michael Saboff  <msaboff@apple.com>
285
286         MarkupAccumulator should optimally handle 8 bit Strings
287         https://bugs.webkit.org/show_bug.cgi?id=98224
288
289         Reviewed by Ryosuke Niwa.
290
291         Updated appendCharactersReplacingEntities to take a string, offset and length and process 8 or 16 bit
292         data as appropriate.  Also made it a member function of MarkupAccumulator.
293
294         No new tests, behavior covered by existing tests.
295
296         * editing/MarkupAccumulator.cpp:
297         (WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
298         (WebCore::MarkupAccumulator::appendAttributeValue):
299         (WebCore::MarkupAccumulator::appendNodeValue):
300         * editing/MarkupAccumulator.h:
301         (MarkupAccumulator):
302         * editing/markup.cpp:
303         (WebCore::StyledMarkupAccumulator::appendText):
304         (WebCore::urlToMarkup):
305
306 2012-10-09  Joshua Bell  <jsbell@chromium.org>
307
308         IndexedDB: Overflowing key generator should throw ConstraintError
309         https://bugs.webkit.org/show_bug.cgi?id=98807
310
311         Reviewed by Tony Chang.
312
313         After the WebKit implementation landed throwing DataError, public-webapps
314         consensus was that the exception thrown should be ConstraintError. Trivial
315         change, and we pass one more W3C test submission.
316
317         Test: storage/indexeddb/key-generator.html
318
319         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
320         (WebCore::IDBObjectStoreBackendImpl::putInternal):
321
322 2012-10-08  Martin Robinson  <mrobinson@igalia.com>
323
324         Fix the order of the statements in my previous build fix.
325
326         Reviewed by Gustavo Noronha Silva.
327
328         My previous build build fix for ResourceHandleSoup ordered the assignment
329         of the local ResourceHandleInternal incorrectly. Instead of being before
330         both assertions, it should be interspersed among them.
331
332         * platform/network/soup/ResourceHandleSoup.cpp:
333         (WebCore::createSoupMessageForHandleAndRequest):
334
335 2012-10-09  Beth Dakin  <bdakin@apple.com>
336
337         https://bugs.webkit.org/show_bug.cgi?id=98457
338         ScrollingStateNodes should be referenced via IDs on 
339         RenderLayerBacking
340
341         Reviewed by Simon Fraser.
342
343         This patch associates all ScrollingStateNodes with a 
344         RenderLayerBacking via a HashMap from RenderLayerBackings to 
345         ScrollingStateNodes on ScrollingCoordinator. Prior to this patch, the 
346         root ScrollingStateNode was created immediately upon creation of the 
347         ScrollingCoordinator, and it was constantly re-used for every main 
348         FrameView. This doesn't work in the new model since that doesn't 
349         allow that ScrollingStateNode to have a definite association with a 
350         RenderLayerBacking. So this patch does also introduce some lifetime 
351         differences with the ScrollingStateNodes.
352
353         If a page is going into the page cache, we should clear the state 
354         tree. When the page is in the cache, we won't have access to the 
355         RenderLayerBacking, and we don't want to be doing anything with the 
356         ScrollingStateNodes anyway.
357         * dom/Document.cpp:
358         (WebCore::Document::setInPageCache):
359
360         When a page is restored from the page cache, call 
361         frameViewRootLayerDidChange() to re-create the state tree.
362         * loader/HistoryController.cpp:
363         (WebCore::HistoryController::restoreScrollPositionAndViewState):
364
365         This new FrameView function will return the scrollLayerID for a given FrameView.
366         * page/FrameView.cpp:
367         (WebCore::FrameView::scrollLayerID):
368         (WebCore):
369         * page/FrameView.h:
370         (FrameView):
371
372         There is a lot of unfortunate fiddling with the terrible 
373         if-defs in ScrollingCoordinator. I added a FIXME to the header
374         noting how we can avoid this in the future.
375         * page/scrolling/ScrollingCoordinator.cpp:
376
377         All of this code used to refer to the rootStateNode directly. 
378         Instead, now it looks up the proper ScrollingStateNode for the given 
379         FrameView in the HashMap.
380         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
381         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
382         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
383         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
384         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPosition):
385         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
386         (WebCore::ScrollingCoordinator::setScrollLayerForNode):
387         (WebCore::ScrollingCoordinator::setNonFastScrollableRegionForNode):
388         (WebCore::ScrollingCoordinator::setScrollParametersForNode):
389         (WebCore::ScrollingCoordinator::setWheelEventHandlerCountForNode):
390
391         Returns the existing ScrollingStateNode for a given FrameView by 
392         looking it up in the HashMap.
393         (WebCore::ScrollingCoordinator::stateNodeForFrameView):
394
395         This is called when a RenderLayerBacking is destroyed. At that time, 
396         its associated ScrollingStateNode is destroyed.
397         (WebCore::ScrollingCoordinator::detachFromStateTree):
398
399         clearStateTree() clears the HashMap and destroys all of the nodes in 
400         the current state tree.
401         (WebCore::ScrollingCoordinator::clearStateTree):
402
403         Creates a new root state node for the given FrameView.
404         (WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
405
406         Some new functions for the new node stuff.
407         * page/scrolling/ScrollingCoordinator.h:
408         * page/scrolling/ScrollingCoordinatorNone.cpp:
409         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
410         (WebCore::ScrollingCoordinator::supportsFixedPositionLayers):
411         (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
412         (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
413         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
414         (WebCore::ScrollingCoordinator::detachFromStateTree):
415         (WebCore::ScrollingCoordinator::clearStateTree):
416         (WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
417         (WebCore::setScrollParameters):
418         (WebCore::setWheelEventHandlerCount):
419
420         New remove functions are used when the sate tree is cleared and when 
421         a RenderLayerBacking is destroyed.
422         * page/scrolling/ScrollingStateNode.cpp:
423         (WebCore::ScrollingStateNode::removeChild):
424         (WebCore):
425         * page/scrolling/ScrollingStateNode.h:
426         (WebCore::ScrollingStateNode::isScrollingStateScrollingNode):
427         (ScrollingStateNode):
428         (WebCore::ScrollingStateNode::parent):
429
430         New convenience function for casting to ScrollingStateScrollingNodes.
431         * page/scrolling/ScrollingStateScrollingNode.h:
432         (WebCore::toScrollingStateScrollingNode):
433         (WebCore):
434
435         No longer automatically create a root node upon creation of the 
436         ScrollingStateTree. We now want to wait to create the root node until 
437         we have a RenderLayerBacking to associate it with.
438         * page/scrolling/ScrollingStateTree.cpp:
439         (WebCore::ScrollingStateTree::ScrollingStateTree):
440         (WebCore::ScrollingStateTree::removeNode):
441         (WebCore):
442         * page/scrolling/ScrollingStateTree.h:
443         (WebCore::ScrollingStateTree::setRootStateNode):
444         (ScrollingStateTree):
445
446         RenderLayerBacking has a new data member called m_scrollLayerID. If 
447         this RenderLayerBacking is represented in the scrolling tree, then 
448         the ID with be unique and non-zero. 
449         * rendering/RenderLayerBacking.cpp:
450         (WebCore::RenderLayerBacking::RenderLayerBacking):
451         (WebCore::RenderLayerBacking::~RenderLayerBacking):
452         (WebCore::generateScrollLayerID):
453         (WebCore):
454         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
455         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
456         * rendering/RenderLayerBacking.h:
457         (RenderLayerBacking):
458         (WebCore::RenderLayerBacking::scrollLayerID):
459
460         Move the call to ScrollingCooridinator::frameViewRootLayerDidChange() 
461         from RenderLayerCompositor::attachRootLayer() to 
462         RenderLayerCompositor:: updateBacking(). The problem with the old call 
463         site is that there is no backing at that time, so we are trying to set 
464         state on the root scrolling state node before we have enough 
465         information to create that node and add it to the HashMap.
466         * rendering/RenderLayerCompositor.cpp:
467         (WebCore::RenderLayerCompositor::updateBacking):
468         (WebCore::RenderLayerCompositor::attachRootLayer):
469
470 2012-10-09  Florin Malita  <fmalita@chromium.org>
471
472         SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
473         https://bugs.webkit.org/show_bug.cgi?id=98683
474
475         Reviewed by Darin Adler.
476
477         Eric's notes:
478
479         SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
480         They do basically the same thing, and the former is much more common (and less code). It's
481         also safe, on the off-chance that we're using AtomicStrings which might otherwise go away.
482
483         No new tests, refactoring. 
484
485         * rendering/svg/SVGResources.cpp:
486         (WebCore::clipperFilterMaskerTags):
487         (WebCore::markerTags):
488         (WebCore::fillAndStrokeTags):
489         (WebCore::chainableResourceTags):
490         (WebCore::SVGResources::buildCachedResources):
491
492 2012-10-09  Enrica Casucci  <enrica@apple.com>
493
494         [chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-background-canvas.html
495         failing on the Mac after r130443
496         https://bugs.webkit.org/show_bug.cgi?id=98545
497
498         Reviewed by Tony Chang.
499
500         Fixes a regression introduced with r130443.
501         No new tests added since we already have tests covering this.
502         Updated TestExpectations for chromium and mac.
503
504         * platform/graphics/FontFastPath.cpp:
505         (WebCore::Font::glyphDataAndPageForCharacter): Text orientation should not be
506         taken into account if the character is an ideograph or a symbol.
507
508 2012-10-09  Philip Rogers  <pdr@google.com>
509
510         Prevent animation when CSS attributeType is invalid.
511         https://bugs.webkit.org/show_bug.cgi?id=94569
512
513         Reviewed by Dirk Schulze.
514
515         This patch changes hasValidAttributeType() to return false when
516         we have attributeType=CSS with a non-CSS attribute name.
517
518         Previously we would animate non-CSS attributes when attributeType was
519         CSS which resulted in crashes. To track this case, this patch catches
520         changes to targetElement, attributeName, and attributeType and checks
521         if an invalid combination is present. If invalid, hasInvalidCSSAttributeType()
522         will return true causing hasValidAttributeType() to return false and prevent
523         the animation from running.
524
525         Tests: svg/animations/animate-css-xml-attributeType.html
526                svg/animations/invalid-css-attribute-crash-expected.svg
527                svg/animations/invalid-css-attribute-crash.svg
528
529         * svg/SVGAnimateElement.cpp:
530         (WebCore::SVGAnimateElement::hasValidAttributeType):
531         (WebCore::SVGAnimateElement::targetElementWillChange):
532         * svg/SVGAnimationElement.cpp:
533         (WebCore::SVGAnimationElement::SVGAnimationElement):
534         (WebCore::SVGAnimationElement::isSupportedAttribute):
535
536             This now supports the attributeType attribute which is stored in m_attributeType.
537
538         (WebCore::SVGAnimationElement::parseAttribute):
539         (WebCore::SVGAnimationElement::setAttributeType):
540
541             Changes to attributeType, attributeName, and targetElement need to be tracked
542             to determine when an invalid combination happens.
543
544         (WebCore::SVGAnimationElement::targetElementWillChange):
545         (WebCore):
546         (WebCore::SVGAnimationElement::setAttributeName):
547         (WebCore::SVGAnimationElement::checkInvalidCSSAttributeType):
548         * svg/SVGAnimationElement.h:
549         (WebCore::SVGAnimationElement::attributeType):
550         (SVGAnimationElement):
551         (WebCore::SVGAnimationElement::hasInvalidCSSAttributeType):
552         * svg/animation/SVGSMILElement.cpp:
553         (WebCore::SVGSMILElement::targetElement):
554         * svg/animation/SVGSMILElement.h:
555         (SVGSMILElement):
556
557 2012-10-09  Pravin D  <pravind.2k4@gmail.com>
558
559         max-width property is does not overriding the width properties for css tables(display:table)
560         https://bugs.webkit.org/show_bug.cgi?id=98455
561
562         Reviewed by Tony Chang.
563
564         The max-width property determines the maximum computed width an element can have. In case of css tables(display:table),
565         the computed was not being limited by the max-width property. The current patch fixes this issue.
566
567         Test: fast/table/css-table-max-width.html
568
569         * rendering/RenderTable.cpp:
570         (WebCore::RenderTable::updateLogicalWidth):
571          Logic to compute the logical width of an element such that it does not exceed the max-width value.
572          Also when both min-width and max-width are present, the following contraint is used to compute the logical width:
573            1) min-width < Computed LogicalWidth < max-width, when min-width < max-width.
574            2) Computed LogicalWidth = min-width, when min-width > max-width.
575
576 2012-10-09  Harald Alvestrand  <hta@google.com>
577
578         Change PeerConnection getStats function to single value local / remote
579         elements in RTCStatsReport.
580
581         https://bugs.webkit.org/show_bug.cgi?id=98753
582
583         Reviewed by Adam Barth.
584
585         IDL of RTCStatsReport has been changed to make local/remote
586         single valued RTCStatsElement attributes.
587         The RTCStatsReport argument to index the list of RTCStatsElement
588         in the local and remote functions has been removed.
589
590         Tested by modifications to RTCPeerConnection-stats.html
591
592         * Modules/mediastream/RTCStatsReport.cpp:
593         (WebCore::RTCStatsReport::addElement):
594         (WebCore::RTCStatsReport::addStatistic):
595         * Modules/mediastream/RTCStatsReport.h:
596         (WebCore::RTCStatsReport::local):
597         (WebCore::RTCStatsReport::remote):
598         (RTCStatsReport):
599         * Modules/mediastream/RTCStatsReport.idl:
600         * Modules/mediastream/RTCStatsResponse.cpp:
601         (WebCore::RTCStatsResponse::addElement):
602         (WebCore::RTCStatsResponse::addStatistic):
603         * Modules/mediastream/RTCStatsResponse.h:
604         (RTCStatsResponse):
605         * platform/chromium/support/WebRTCStatsResponse.cpp:
606         (WebKit::WebRTCStatsResponse::addElement):
607         (WebKit::WebRTCStatsResponse::addStatistic):
608         * platform/mediastream/RTCStatsResponseBase.h:
609         (RTCStatsResponseBase):
610
611 2012-10-09  Antonio Gomes  <agomes@rim.com>
612
613         Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
614         https://bugs.webkit.org/show_bug.cgi?id=98756
615
616         Reviewed by Rob Buis.
617
618         No behavior change so no new tests.
619
620         * css/StyleResolver.cpp:
621         (WebCore::StyleResolver::collectMatchingRulesForList):
622
623 2012-10-09  Simon Hausmann  <simon.hausmann@digia.com>
624
625         [Qt] Fix build with QtMultimedia
626
627         Reviewed by Tor Arne Vestbø.
628
629         This is an initial rudimentary port to of the QtMultimedia back-end,
630         adapted to slight API changes and (more importantly) to the
631         implementation of QAbstractVideoSurface instead of using
632         QGraphicsVideoItem (which is in QtMultimediaWidgets).
633
634         * WebCore.pri:
635         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
636         (WebCore::MediaPlayerPrivateQt::supportsType):
637         (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
638         (WebCore::MediaPlayerPrivateQt::~MediaPlayerPrivateQt):
639         (WebCore::MediaPlayerPrivateQt::didLoadingProgress):
640         (WebCore::MediaPlayerPrivateQt::totalBytes):
641         (WebCore::MediaPlayerPrivateQt::setVisible):
642         (WebCore::MediaPlayerPrivateQt::surfaceFormatChanged):
643         (WebCore::MediaPlayerPrivateQt::setSize):
644         (WebCore::MediaPlayerPrivateQt::removeVideoItem):
645         (WebCore::MediaPlayerPrivateQt::restoreVideoItem):
646         (WebCore):
647         (WebCore::MediaPlayerPrivateQt::start):
648         (WebCore::MediaPlayerPrivateQt::supportedPixelFormats):
649         (WebCore::MediaPlayerPrivateQt::present):
650         (WebCore::MediaPlayerPrivateQt::paint):
651         (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
652         (WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
653         * platform/graphics/qt/MediaPlayerPrivateQt.h:
654         (MediaPlayerPrivateQt):
655
656 2012-10-09  Garrett Casto  <gcasto@chromium.org>
657
658         Allow users to specify a different hover image for TextFieldDecorationElement
659         https://bugs.webkit.org/show_bug.cgi?id=93662
660
661         Reviewed by Kent Tamura.
662
663         * html/shadow/TextFieldDecorationElement.cpp:
664         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
665         (WebCore::TextFieldDecorationElement::updateImage):
666         (WebCore::TextFieldDecorationElement::defaultEventHandler): Handles mouseover and mouseout events.
667         (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Now returns true if the element is not disabled.
668         (WebCore):
669         * html/shadow/TextFieldDecorationElement.h:
670         (TextFieldDecorator):
671         (TextFieldDecorationElement):
672
673 2012-10-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
674
675         [Qt] Uploading images to Google+ using QtWebKit does not work.
676         https://bugs.webkit.org/show_bug.cgi?id=72329
677
678         Reviewed by Jocelyn Turcotte.
679
680         Implement handling of Blob FormData, including its extensions to the File FormData.
681
682         * platform/network/qt/QNetworkReplyHandler.cpp:
683         (WebCore::FormDataIODevice::FormDataIODevice):
684         (WebCore::appendBlobResolved):
685         (WebCore::FormDataIODevice::prepareFormElements):
686         (WebCore::FormDataIODevice::computeSize):
687         (WebCore::FormDataIODevice::moveToNextElement):
688         (WebCore::FormDataIODevice::prepareCurrentElement):
689         (WebCore::FormDataIODevice::openFileForCurrentElement):
690         (WebCore::FormDataIODevice::readData):
691         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
692         * platform/network/qt/QNetworkReplyHandler.h:
693         (FormDataIODevice):
694
695 2012-10-09  Arpita Bahuguna  <arpitabahuguna@gmail.com>
696
697         Text decorations specified on the containing block are not properly applied when ::first-line is present.
698         https://bugs.webkit.org/show_bug.cgi?id=93829
699
700         Reviewed by Abhishek Arya.
701
702         If a container's style and its pseudo :first-line style have unique
703         text-decorations specified for them, only the :first-line text-decoarations
704         were being applied.
705
706         The uploaded patch intends to first compute the text decoration colors
707         for the containing box, followed by that of the first-line (if specified).
708
709         This thus avoids the condition wherein our containing box's text-decorations
710         were not getting applied at all since initially we were only computing
711         for the first-line style.
712
713         Test: fast/css/text-decorations-on-first-line-and-containing-block.html
714
715         * rendering/InlineTextBox.cpp:
716         (WebCore::InlineTextBox::paintDecoration):
717         getTextDecorationColors() is first called for computing the containing box's
718         text-decoration values and then for first-line style's text-decorations,
719         if specified.
720
721 2012-10-09  Sheriff Bot  <webkit.review.bot@gmail.com>
722
723         Unreviewed, rolling out r130746.
724         http://trac.webkit.org/changeset/130746
725         https://bugs.webkit.org/show_bug.cgi?id=98749
726
727         It made 45 tests crash on Qt (Requested by Ossy on #webkit).
728
729         * platform/network/qt/QNetworkReplyHandler.cpp:
730         (WebCore::FormDataIODevice::FormDataIODevice):
731         (WebCore::FormDataIODevice::computeSize):
732         (WebCore::FormDataIODevice::moveToNextElement):
733         (WebCore::FormDataIODevice::openFileForCurrentElement):
734         (WebCore::FormDataIODevice::readData):
735         (WebCore::QNetworkReplyHandler::getIODevice):
736         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
737         * platform/network/qt/QNetworkReplyHandler.h:
738         (QNetworkReplyHandler):
739         (FormDataIODevice):
740
741 2012-10-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
742
743         [Qt] Uploading images to Google+ using QtWebKit does not work.
744         https://bugs.webkit.org/show_bug.cgi?id=72329
745
746         Reviewed by Jocelyn Turcotte.
747
748         Implement handling of Blob FormData, including its extensions to the File FormData.
749
750         * platform/network/qt/QNetworkReplyHandler.cpp:
751         (WebCore::FormDataIODevice::FormDataIODevice):
752         (WebCore::FormDataIODevice::computeSize):
753         (WebCore::FormDataIODevice::moveToNextElement):
754         (WebCore::FormDataIODevice::prepareCurrentElement):
755         (WebCore::FormDataIODevice::openFileForCurrentElement):
756         (WebCore::FormDataIODevice::readData):
757         (WebCore::QNetworkReplyHandler::getIODevice):
758         (WebCore::QNetworkReplyHandler::handleBlobDataIfAny):
759         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
760         * platform/network/qt/QNetworkReplyHandler.h:
761         (QNetworkReplyHandler):
762         (FormDataIODevice):
763
764 2012-10-09  Keishi Hattori  <keishi@webkit.org>
765
766         Page popup should be smarter about its layout
767         https://bugs.webkit.org/show_bug.cgi?id=98499
768
769         Reviewed by Kent Tamura.
770
771         This change fixes these two issues:
772         1. Page popup should reposition itself so it won't get clipped by screen(Win/Linux) or rootview(Mac) bounds.
773         2. Page popup should resize itself when it doesn't fit.
774
775         Test: platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html
776
777         * Resources/pagepopups/calendarPicker.js:
778         (initialize): We need to set global.params at the beginning because we need it for resizeWindow().
779         * Resources/pagepopups/colorSuggestionPicker.js: Added global.params.
780         (handleMessage):
781         (initialize):
782         (handleArgumentsTimeout):
783         * Resources/pagepopups/pickerCommon.js:
784         (Rect): Represents an axis aligned rectangle.
785         (Rect.prototype.get maxX): Gets position of right edge.
786         (Rect.prototype.get maxY): Gets position of bottom edge.
787         (Rect.prototype.toString):
788         (Rect.intersection): Returns the intersection of two rectangles.
789         (resizeWindow): Resize window to a certain size. Don't allow shrinking.
790         (adjustWindowRect): Calculates the best position and size for the popup.
791         (_adjustWindowRectVertically):
792         (_adjustWindowRectHorizontally):
793         (setWindowRect): Sets the position and size of the popup to the given rect.
794         * Resources/pagepopups/suggestionPicker.css:
795         (.suggestion-list): Don't show horizontal scroll bar.
796         * Resources/pagepopups/suggestionPicker.js:
797         (SuggestionPicker.prototype._fixWindowSize): 
798         * page/PagePopupClient.cpp:
799         (WebCore::PagePopupClient::addProperty): For adding an int to JSON.
800         (WebCore::PagePopupClient::addProperty): For adding an IntRect to JSON.
801         (WebCore):
802         * page/PagePopupClient.h:
803         (PagePopupClient):
804
805 2012-10-09  Hajime Morrita  <morrita@google.com>
806
807         [Refactoring] Scoped Style related code should have its own class.
808         https://bugs.webkit.org/show_bug.cgi?id=98244
809
810         Reviewed by Dimitri Glazkov.
811
812         This change extracts StyleScopeResolver from StyleResolver to clarify
813         the responsibility of the style scope handling. Now we can easily see
814         where the style scoping needs to be involed.
815
816         Coming Shadow DOM related change like @host rules will fit within this class.
817
818         No new tests, refactoring.
819
820         * CMakeLists.txt:
821         * GNUmakefile.list.am:
822         * Target.pri:
823         * WebCore.gypi:
824         * WebCore.xcodeproj/project.pbxproj:
825         * css/CSSAllInOne.cpp:
826         * css/StyleResolver.cpp:
827         (WebCore::StyleResolver::StyleResolver):
828         (WebCore::StyleResolver::collectFeatures):
829         (WebCore::StyleResolver::appendAuthorStylesheets):
830         (WebCore::StyleResolver::pushParentElement):
831         (WebCore::StyleResolver::popParentElement):
832         (WebCore::StyleResolver::pushParentShadowRoot):
833         (WebCore::StyleResolver::popParentShadowRoot):
834         (WebCore::StyleResolver::matchScopedAuthorRules):
835         (WebCore::StyleResolver::collectMatchingRulesForList):
836         (WebCore::StyleResolver::reportMemoryUsage):
837         * css/StyleResolver.h:
838         (StyleResolver):
839         * css/StyleScopeResolver.cpp: Added.
840         (WebCore):
841         (WebCore::StyleScopeResolver::StyleScopeResolver):
842         (WebCore::StyleScopeResolver::~StyleScopeResolver):
843         (WebCore::StyleScopeResolver::scopeFor):
844         (WebCore::StyleScopeResolver::ruleSetFor):
845         (WebCore::StyleScopeResolver::ensureRuleSetFor):
846         (WebCore::StyleScopeResolver::setupStack):
847         (WebCore::StyleScopeResolver::push):
848         (WebCore::StyleScopeResolver::pop):
849         (WebCore::StyleScopeResolver::collectFeaturesTo):
850         (WebCore::StyleScopeResolver::reportMemoryUsage):
851         * css/StyleScopeResolver.h: Added.
852         (WebCore):
853         (StyleScopeResolver):
854         (WebCore::StyleScopeResolver::StackFrame::StackFrame):
855         (StackFrame):
856         (WebCore::StyleScopeResolver::hasScopedStyles):
857         (WebCore::StyleScopeResolver::stackSize):
858         (WebCore::StyleScopeResolver::stackFrameAt):
859         (WebCore::StyleScopeResolver::matchesStyleBounds):
860         (WebCore::StyleScopeResolver::stackIsConsistent):
861         (WebCore::StyleScopeResolver::ensureStackConsistency):
862         (WebCore::StyleScopeResolver::scopeFor):
863         (WebCore::StyleScopeResolver::ensureRuleSetFor):
864
865 2012-10-08  Simon Hausmann  <simon.hausmann@digia.com>
866
867         [Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
868         https://bugs.webkit.org/show_bug.cgi?id=98268
869
870         Reviewed by Tor Arne Vestbø.
871
872         Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
873
874         QStyleFacade is a pure interface that lives in WebCore/platform/qt
875         (next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
876         minimal interface of what we need to draw with QStyle as well as basic
877         hit testing and metric retrieval. It also provides a
878         QStyleFacadeOption class that aggregates common meta-data for
879         rendering primitives, such as direction, rectangle, state (sunken,
880         enabled, etc.) or palette. It also provides some more slider/scrollbar
881         specific fields in a slider sub-structure.
882
883         RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
884         them with state information from render objects, before calling straight to QStyle. Most of the common code
885         was encapsulated in StylePainterQStyle.
886
887         The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
888         StylePainterQStyle to populate state into QStyleFacadeOption before
889         calling into QStyleFacade.
890
891         The style facade is then implemented by QStyleFacadeImp, which extracts
892         meta-data from QStyleFacadeOption arguments, populates style
893         primitive specific QStyleOption objects and then calls on QStyle.
894
895         RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
896         from QStyleFacade. QStyleFacadeImp on the other hand will live in the
897         separate QtWebKitWidgets library in the future and therefore cannot use
898         any WebCore types.
899
900         * Target.pri:
901         * platform/qt/QStyleFacade.cpp: Added.
902         (WebCore):
903         (WebCore::QStyleFacade::styleForPage):
904         * platform/qt/QStyleFacade.h: Added.
905         (WebCore):
906         (QStyleFacade):
907         (WebCore::QStyleFacade::~QStyleFacade):
908         (WebCore::QStyleFacadeOption::QStyleFacadeOption):
909         (QStyleFacadeOption):
910         * platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
911         (WebCore):
912         (WebCore::RenderThemeQStyle::getStylePainter):
913         (WebCore::StylePainterQStyle::StylePainterQStyle):
914         (WebCore::StylePainterQStyle::init):
915         (WebCore::RenderThemeQStyle::create):
916         (WebCore::RenderThemeQStyle::setStyleFactoryFunction):
917         (WebCore::RenderThemeQStyle::styleFactory):
918         (WebCore::RenderThemeQStyle::RenderThemeQStyle):
919         (WebCore::RenderThemeQStyle::~RenderThemeQStyle):
920         (WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
921         (WebCore::RenderThemeQStyle::inflateButtonRect):
922         (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
923         (WebCore::RenderThemeQStyle::adjustButtonStyle):
924         (WebCore::RenderThemeQStyle::setButtonPadding):
925         (WebCore::RenderThemeQStyle::paintButton):
926         (WebCore::RenderThemeQStyle::paintTextField):
927         (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
928         (WebCore::RenderThemeQStyle::paintTextArea):
929         (WebCore::RenderThemeQStyle::setPopupPadding):
930         (WebCore::RenderThemeQStyle::colorPalette):
931         (WebCore::RenderThemeQStyle::paintMenuList):
932         (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
933         (WebCore::RenderThemeQStyle::paintMenuListButton):
934         (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
935         (WebCore::RenderThemeQStyle::paintProgressBar):
936         (WebCore::RenderThemeQStyle::paintSliderTrack):
937         (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
938         (WebCore::RenderThemeQStyle::paintSliderThumb):
939         (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
940         (WebCore::RenderThemeQStyle::paintSearchField):
941         (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
942         (WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
943         (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
944         (WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
945         (WebCore::RenderThemeQStyle::paintInnerSpinButton):
946         (WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
947         (WebCore::RenderThemeQStyle::adjustSliderThumbSize):
948         * platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
949         (WebCore):
950         (RenderThemeQStyle):
951         (WebCore::RenderThemeQStyle::qStyle):
952         (StylePainterQStyle):
953         (WebCore::StylePainterQStyle::isValid):
954         (WebCore::StylePainterQStyle::paintButton):
955         (WebCore::StylePainterQStyle::paintTextField):
956         (WebCore::StylePainterQStyle::paintComboBox):
957         (WebCore::StylePainterQStyle::paintComboBoxArrow):
958         (WebCore::StylePainterQStyle::paintSliderTrack):
959         (WebCore::StylePainterQStyle::paintSliderThumb):
960         (WebCore::StylePainterQStyle::paintInnerSpinButton):
961         (WebCore::StylePainterQStyle::paintProgressBar):
962         (WebCore::StylePainterQStyle::paintScrollCorner):
963         (WebCore::StylePainterQStyle::paintScrollBar):
964         * platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
965         (WebCore):
966         (WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
967         (WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
968         (WebCore::scPart):
969         (WebCore::scrollbarPart):
970         (WebCore::initSliderStyleOption):
971         (WebCore::ScrollbarThemeQStyle::paint):
972         (WebCore::ScrollbarThemeQStyle::hitTest):
973         (WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
974         (WebCore::ScrollbarThemeQStyle::invalidatePart):
975         (WebCore::ScrollbarThemeQStyle::scrollbarThickness):
976         (WebCore::ScrollbarThemeQStyle::thumbPosition):
977         (WebCore::ScrollbarThemeQStyle::thumbLength):
978         (WebCore::ScrollbarThemeQStyle::trackPosition):
979         (WebCore::ScrollbarThemeQStyle::trackLength):
980         (WebCore::ScrollbarThemeQStyle::paintScrollCorner):
981         * platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
982         (WebCore):
983         (ScrollbarThemeQStyle):
984         (WebCore::ScrollbarThemeQStyle::qStyle):
985
986 2012-10-08  Kiran Muppala  <cmuppala@apple.com>
987
988         Throttle DOM timers on hidden pages.
989         https://bugs.webkit.org/show_bug.cgi?id=98474
990
991         Reviewed by Maciej Stachowiak.
992
993         When the visibility of a page changes to "hidden", all it's DOM timers are
994         updated to align their fire times on one second intervals.  This limits the
995         number of CPU wakes due to a hidden pages to one per second.
996
997         Test: fast/dom/timer-throttling-hidden-page.html
998
999         * Configurations/FeatureDefines.xcconfig:
1000         * WebCore.exp.in:
1001         * dom/Document.cpp:
1002         (WebCore):
1003         (WebCore::Document::timerAlignmentInterval):
1004         Read Page::timerAlignmentInterval and pass it along to DOMTimer.
1005
1006         * dom/Document.h:
1007         (Document):
1008         * dom/ScriptExecutionContext.cpp:
1009         (WebCore):
1010         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
1011         Scan through self DOM Timers and tell them to recompute their fire
1012         time based on the updated alignment interval.
1013         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1014
1015         * dom/ScriptExecutionContext.h:
1016         (ScriptExecutionContext):
1017         * page/DOMTimer.cpp:
1018         (WebCore):
1019         (WebCore::DOMTimer::alignedFireTime):
1020         If the document's alignment interval is non zero, round up the fire
1021         time to the next multiple of alignment interval.
1022
1023         * page/DOMTimer.h:
1024         (DOMTimer):
1025         (WebCore::DOMTimer::defaultTimerAlignmentInterval):
1026         (WebCore::DOMTimer::setDefaultTimerAlignmentInterval):
1027         * page/Page.cpp:
1028         (WebCore::Page::Page):
1029         (WebCore):
1030         (WebCore::Page::setTimerAlignmentInterval):
1031         (WebCore::Page::timerAlignmentInterval):
1032         (WebCore::Page::setVisibilityState):
1033         Getter and Setter for alignment interval.  Expose setVisibilityState
1034         if either PAGE_VISIBILITY_API is enabled or if HIDDEN_PAGE_DOM_TIMER_REDUCTION
1035         is enabled.
1036
1037         * page/Page.h:
1038         (Page):
1039         * page/Settings.cpp:
1040         (WebCore):
1041         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval):
1042         (WebCore::Settings::defaultDOMTimerAlignmentInterval):
1043         (WebCore::Settings::setDOMTimerAlignmentInterval):
1044         (WebCore::Settings::domTimerAlignmentInterval):
1045         * page/Settings.h:
1046         (Settings):
1047         * page/SuspendableTimer.cpp:
1048         (WebCore::SuspendableTimer::suspend):
1049         Save the time remaining to the original unaligned fire time, so that
1050         on resuming, the fire time will be correctly aligned using the latest
1051         alignment interval.
1052
1053         * platform/ThreadTimers.cpp:
1054         (WebCore::ThreadTimers::sharedTimerFiredInternal):
1055         Clear m_unalignedNextFireTime along with m_nextFireTime to keep
1056         them always in sync.
1057
1058         * platform/Timer.cpp:
1059         (WebCore::TimerBase::TimerBase):
1060         (WebCore::TimerBase::setNextFireTime):
1061         Save the requested fire time in m_unalignedNextFireTime and
1062         set m_nextFireTime to the aligned value.  The unalinged value
1063         is used to recompute fire time if alignment interval changes.
1064         (WebCore):
1065         (WebCore::TimerBase::didChangeAlignmentInterval):
1066         Recompute next fire time from m_unalignedNextFireTime.
1067         (WebCore::TimerBase::nextUnalignedFireInterval):
1068         Interval from current time to the original unaligned fire time.
1069
1070         * platform/Timer.h:
1071         (TimerBase):
1072         (WebCore::TimerBase::alignedFireTime):
1073
1074 2012-10-08  Andreas Kling  <kling@webkit.org>
1075
1076         1.18MB below RenderTableSection::setCachedCollapsedBorderValue() on Membuster3.
1077         <http://webkit.org/b/98670>
1078         <rdar://problem/12454276>
1079
1080         Reviewed by Anders Carlsson.
1081
1082         Refactor CollapsedBorderValue to only store the bits and pieces from the BorderValue
1083         that it actually needs. Packed the whole thing into 64 bits.
1084
1085         Reduces memory consumption by 547kB on Membuster3.
1086
1087         * rendering/RenderTableCell.cpp:
1088
1089             Add compile-time size assertion for CollapsedBorderValue.
1090
1091         * rendering/style/CollapsedBorderValue.h:
1092         (WebCore::CollapsedBorderValue::CollapsedBorderValue):
1093         (WebCore::CollapsedBorderValue::width):
1094         (WebCore::CollapsedBorderValue::style):
1095         (WebCore::CollapsedBorderValue::color):
1096         (WebCore::CollapsedBorderValue::isTransparent):
1097         (WebCore::CollapsedBorderValue::precedence):
1098         (WebCore::CollapsedBorderValue::isSameIgnoringColor):
1099         (CollapsedBorderValue):
1100
1101             Apply shrinkwrap to CollapsedBorderValue. Removed specialized copy constructor since
1102             the class only has primitive members now.
1103
1104 2012-10-08  Yoshifumi Inoue  <yosin@chromium.org>
1105
1106         HTMLSelectElement::typeAheadFind depends on implementation dependent behavior
1107         https://bugs.webkit.org/show_bug.cgi?id=98710
1108
1109         Reviewed by Kent Tamura.
1110
1111         This patch gets rid of C/C++ implementation dependent behavior from
1112         HTMLSelectElement::typeAheadFind() which does modulo operation with
1113         a negative operand.
1114
1115         HTMLSelectElement::typeAheadFind() contains expression with modulo
1116         operator and dividend can be -1 when the "select" element without
1117         "option" element but "optgroup" element.
1118
1119         Test: fast/forms/select/select-typeahead-crash.html
1120
1121         * html/HTMLSelectElement.cpp:
1122         (WebCore::HTMLSelectElement::typeAheadFind): Changed to do modulo
1123         operation with both operands are non-negative.
1124
1125 2012-10-08  Kent Tamura  <tkent@chromium.org>
1126
1127         Take account of overflowing values for width calculation of a year sub-field
1128         https://bugs.webkit.org/show_bug.cgi?id=98506
1129
1130         Reviewed by Eric Seidel.
1131
1132         When we decide the width of a year field of an input[type=date]
1133         with the multiple fields UI, we need to take account of the
1134         current value width because we allow to set overflowing values to
1135         the input[type=date].
1136
1137         This change affects only platforms with INPUT_TYPE_DATE &&
1138         INPUT_MULTIPLE_FIELDS_UI.
1139
1140         Test: fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value.html
1141
1142         * html/shadow/DateTimeNumericFieldElement.cpp:
1143         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
1144         Take account of the current value width.
1145
1146 2012-10-08  Tony Chang  <tony@chromium.org>
1147
1148         image not displayed in flexbox
1149         https://bugs.webkit.org/show_bug.cgi?id=98611
1150
1151         Reviewed by Ojan Vafai.
1152
1153         Flexbox will override the width of a child and when stretching, will override the height of the child.
1154         When this happens, when an image loads, it checks to see if it's width/height has
1155         changed, and if so, does a relayout.  The overridden width/height was preventing this
1156         relayout from happening.
1157
1158         To fix, we clear all the override sizes when we're done laying out the flex children.
1159
1160         Test: css3/flexbox/relayout-image-load.html
1161
1162         * rendering/RenderFlexibleBox.cpp:
1163         (WebCore::RenderFlexibleBox::layoutBlock): Clear child override sizes.
1164         (WebCore::RenderFlexibleBox::clearChildOverrideSizes):
1165         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): No longer need to clear the override size
1166         here since it should have already been cleared.
1167         * rendering/RenderFlexibleBox.h:
1168
1169 2012-10-08  Andreas Kling  <kling@webkit.org>
1170
1171         REGRESSION(r130643): editing/pasteboard/data-transfer-item is failing on chromium.
1172         <http://webkit.org/b/98686>
1173
1174         Reviewed by Tony Chang.
1175
1176         Change ChromiumDataObject::createFromPasteboard() to use a ListHashSet instead of a HashSet so that
1177         item order is preserved.
1178
1179         * platform/chromium/ChromiumDataObject.cpp:
1180         (WebCore::ChromiumDataObject::createFromPasteboard):
1181
1182 2012-10-08  Eric Seidel  <eric@webkit.org>
1183
1184         Inline logicalHeightForRowSizing to shave another 2-3% off robohornet's resizecol.html
1185         https://bugs.webkit.org/show_bug.cgi?id=98703
1186
1187         Reviewed by Emil A Eklund.
1188
1189         This is very small potatoes.  There are much bigger wins for table layout yet, but
1190         this was an easy win.
1191
1192         This function should probably be converted to use int's only, as table cells are pixel-sized
1193         according to our subpixel-experts.
1194
1195         Also, I suspect there should be ways to early return with less-math in the common cases, but
1196         I've saved such for a later patch.
1197
1198         Note that I changed from using paddingBefore/paddingAfter (which include the instrinsic padding)
1199         to calling computedCSSPaddingBefore/computedCSSPaddingAfter directly as well.
1200
1201         This single function is about 11% of total time for robohornet's resizecol.
1202
1203         * rendering/RenderTableCell.cpp:
1204         * rendering/RenderTableCell.h:
1205         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1206
1207 2012-10-08  Alec Flett  <alecflett@chromium.org>
1208
1209         IndexedDB: remove autogenerated objectStore/index id code
1210         https://bugs.webkit.org/show_bug.cgi?id=98085
1211
1212         Reviewed by Tony Chang.
1213
1214         Remove support for backend-generated objectstore and index
1215         ids. The frontend objects now manage that state during
1216         versionchange transactions. The IDBDatabaseBackendInterface and
1217         IDBObjectStoreBackendInterface methods will go away when
1218         https://bugs.webkit.org/show_bug.cgi?id=98682 lands.
1219
1220         No new tests as this is part of a refactoring, existing indexeddb
1221         tests cover correctness.
1222
1223         * Modules/indexeddb/IDBBackingStore.h:
1224         (IDBBackingStore):
1225         * Modules/indexeddb/IDBDatabase.cpp:
1226         (WebCore::IDBDatabase::createObjectStore):
1227         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1228         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1229         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
1230         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
1231         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1232         (IDBDatabaseBackendInterface):
1233         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1234         (WebCore::IDBLevelDBBackingStore::createObjectStore):
1235         (WebCore::setMaxIndexId):
1236         (WebCore::IDBLevelDBBackingStore::createIndex):
1237         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1238         (IDBLevelDBBackingStore):
1239         * Modules/indexeddb/IDBObjectStore.cpp:
1240         (WebCore::IDBObjectStore::createIndex):
1241         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1242         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1243         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1244         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
1245         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
1246
1247 2012-10-08  Jaehun Lim  <ljaehun.lim@samsung.com>
1248
1249         [CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
1250         https://bugs.webkit.org/show_bug.cgi?id=98630
1251
1252         Reviewed by Martin Robinson.
1253
1254         IMAGE_DECODER_DOWN_SAMPLING scales down the size of the big image.
1255         CAIRO needs to adjust the source size to the scaled value.
1256
1257         No new tests.
1258
1259         * platform/graphics/cairo/BitmapImageCairo.cpp:
1260         (WebCore::BitmapImage::draw):
1261
1262 2012-10-08  Adam Barth  <abarth@webkit.org>
1263
1264         Remove unused features of BlobBuilder
1265         https://bugs.webkit.org/show_bug.cgi?id=98331
1266
1267         Reviewed by Eric Seidel.
1268
1269         Now that we don't expose BlobBuilder as a web platform API, we can
1270         strip down the class to handle only those cases that are needed by the
1271         Blob constructor.
1272
1273         I've also renamed the class from WebKitBlobBuilder to BlobBuilder and
1274         made it stack allocated rather than RefCounted. A future patch will
1275         actually move the files around. (I didn't want to mix moving code
1276         around with modifying the code.)
1277
1278         * bindings/js/JSBlobCustom.cpp:
1279         (WebCore::JSBlobConstructor::constructJSBlob):
1280         * bindings/v8/custom/V8BlobCustom.cpp:
1281         (WebCore::V8Blob::constructorCallback):
1282         * fileapi/WebKitBlobBuilder.cpp:
1283         (WebCore):
1284         (WebCore::BlobBuilder::BlobBuilder):
1285         (WebCore::BlobBuilder::getBuffer):
1286         (WebCore::BlobBuilder::append):
1287         (WebCore::BlobBuilder::appendBytesData):
1288         (WebCore::BlobBuilder::getBlob):
1289         * fileapi/WebKitBlobBuilder.h:
1290         (WebCore):
1291         (BlobBuilder):
1292         * page/FeatureObserver.h:
1293
1294 2012-10-08  Martin Robinson  <mrobinson@igalia.com>
1295
1296         Try to fix the debug build after r130699
1297
1298         Move the assignment of the ResourceHandleInternal local to before
1299         the include statement where it is used.
1300
1301         * platform/network/soup/ResourceHandleSoup.cpp:
1302         (WebCore::createSoupMessageForHandleAndRequest):
1303
1304 2012-10-08  Nate Chapin  <japhet@chromium.org>
1305
1306         Post-r130226 Cleanup: Comment a complicated if statement and make it a helper.
1307         https://bugs.webkit.org/show_bug.cgi?id=98463
1308
1309         Reviewed by Eric Seidel.
1310
1311         No new tests, refactor only.
1312
1313         * rendering/RenderLayer.cpp:
1314         (WebCore::frameElementAndViewPermitScroll):
1315         (WebCore::RenderLayer::scrollRectToVisible):
1316
1317 2012-10-06  Martin Robinson  <mrobinson@igalia.com>
1318
1319         [Soup] Simplify the way that requests are started
1320         https://bugs.webkit.org/show_bug.cgi?id=98532
1321
1322         Reviewed by Gustavo Noronha Silva.
1323
1324         Simplify the creation of the libsoup request and message when kicking off
1325         requests, by elminating a bit of duplicate code.
1326
1327         No new tests. This should not change any behavior.
1328
1329         * platform/network/ResourceHandle.h:
1330         (ResourceHandle):
1331         * platform/network/soup/ResourceHandleSoup.cpp:
1332         (WebCore):
1333         (WebCore::ResourceHandleInternal::soupSession): Ensure the session
1334         is initialized when passing it to the caller.
1335         (WebCore::createSoupMessageForHandleAndRequest): Added this helper which
1336         takes care of creating the SoupMessage for HTTP/HTTPS requests.
1337         (WebCore::createSoupRequestAndMessageForHandle): Collapsed the HTTP and
1338         non-HTTP request creation into this helper.
1339         (WebCore::ResourceHandle::start): Call the new helper now and then sendPendingRequest.
1340         (WebCore::ResourceHandle::sendPendingRequest): Instead of having special
1341         helpers to create and send the request, duplicating the logic for sending it
1342         across the file, add this method which can be used in both cases.
1343         (WebCore::waitingToSendRequest): Reworked the hasBeenSent method to answer
1344         the question of whether or not the request is ready to be sent, but is unsent.
1345         (WebCore::ResourceHandle::platformSetDefersLoading): Use the new helper.
1346         * platform/network/soup/ResourceRequest.h:
1347         (ResourceRequest): Added a new method for getting the URL string for soup.
1348         * platform/network/soup/ResourceRequestSoup.cpp:
1349         (WebCore::ResourceRequest::urlStringForSoup): Added.
1350
1351 2012-10-08  Eric Seidel  <eric@webkit.org>
1352
1353         Make no-column table-layout cases a little faster with inlining
1354         https://bugs.webkit.org/show_bug.cgi?id=98566
1355
1356         Reviewed by Julien Chaffraix.
1357
1358         This change is almost not worth it at only a couple percent boost on
1359         http://www.robohornet.org/tests/resizecol.html
1360         However, I think the logicalWidthFromTableColumn split it kinda nice
1361         so I've decided to post it anyway.
1362
1363         * rendering/RenderTable.cpp:
1364         (WebCore::RenderTable::slowColElement):
1365         * rendering/RenderTable.h:
1366         (WebCore::RenderTable::colElement):
1367         (RenderTable):
1368         * rendering/RenderTableCell.cpp:
1369         (WebCore::RenderTableCell::logicalWidthFromTableColumn):
1370         * rendering/RenderTableCell.h:
1371         (WebCore::RenderTableCell::styleOrColLogicalWidth):
1372         (RenderTableCell):
1373
1374 2012-10-08  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1375
1376         Rename RenderObject::firstLineStyleSlowCase() to a more appropriate cachedFirstLineStyle()
1377         https://bugs.webkit.org/show_bug.cgi?id=98631
1378
1379         Reviewed by Eric Seidel.
1380
1381         Renaming firstLineStyleSlowCase() to cachedFirstLineStyle().
1382
1383         The current name is confusing since the function actually gets the
1384         the cached first-line styles.
1385         It also makes the name more descriptive of its functionality
1386         and in accordance with RenderObject::uncachedFirstLineStyle().
1387
1388         No new tests required for this change since no change in behavior is expected.
1389
1390         * rendering/RenderObject.cpp:
1391         (WebCore::RenderObject::cachedFirstLineStyle):
1392         * rendering/RenderObject.h:
1393         (WebCore::RenderObject::firstLineStyle):
1394         (RenderObject):
1395         Renamed RenderObject::firstLineStyleSlowCase() to cachedFirstLineStyle()
1396         and made the associated changes.
1397
1398 2012-10-08  Sami Kyostila  <skyostil@chromium.org>
1399
1400         Some non-scrollable elements are added to non-fast-scrollable region
1401         https://bugs.webkit.org/show_bug.cgi?id=97927
1402
1403         Reviewed by James Robinson.
1404
1405         Only RenderLayers that can actually be scrolled should be added to the
1406         ScrollingCoordinator's non-fast scrollable region. Otherwise we may
1407         needlessly fall back to main thread scrolling.
1408
1409         Test: ScrollingCoordinatorChromiumTest.clippedBodyTest
1410
1411         * rendering/RenderLayer.cpp:
1412         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1413         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
1414
1415 2012-10-08  Simon Fraser  <simon.fraser@apple.com>
1416
1417         Move layerTreeAsText to window.internals
1418         https://bugs.webkit.org/show_bug.cgi?id=98690
1419
1420         Reviewed by James Robinson.
1421
1422         Add window.internals.layerTreeAsText(document), and change the tests to use it.
1423         I'll remove testRunner.layerTreeAsText() in a later patch.
1424
1425         * testing/Internals.cpp:
1426         (WebCore::Internals::layerTreeAsText):
1427         * testing/Internals.h:
1428         (Internals):
1429         * testing/Internals.idl:
1430
1431 2012-10-08  Jon Lee  <jonlee@apple.com>
1432
1433         Add render object that paints plugin snapshots
1434         https://bugs.webkit.org/show_bug.cgi?id=98322
1435         <rdar://problem/12426546>
1436
1437         Reviewed by Simon Fraser.
1438
1439         First, teach plugins to maintain a set of states when plugin snapshotting is enabled.
1440
1441         Second, a new RenderSnapshottedPlugIn class is a RenderEmbeddedObject that knows how to paint
1442         snapshots when the plugin is not visibly playing. It maintains a RenderImageResource to
1443         the generated poster image.
1444
1445         * html/HTMLPlugInElement.cpp:
1446         (WebCore::HTMLPlugInElement::HTMLPlugInElement): By default all plugins play on load.
1447         * html/HTMLPlugInElement.h: Move the inheritance of ImageLoaderClientBase down to
1448         HTMLPlugInImageElement, since that is the class that actually deals with image-based plugins.
1449         (WebCore::HTMLPlugInElement::displayState): Add bit for display state.
1450         (WebCore::HTMLPlugInElement::setDisplayState):
1451         (WebCore::HTMLPlugInElement::updateSnapshot):
1452
1453         * html/HTMLPlugInImageElement.cpp:
1454         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): If plugin snapshotting is
1455         enabled, plugin state is set to wait for a poster image.
1456         (WebCore::HTMLPlugInImageElement::createRenderer): Create RenderSnapshottedPlugIn if
1457         plugin snapshotting is enabled.
1458         (WebCore::HTMLPlugInImageElement::updateSnapshot): Once a snapshot is available, update the
1459         renderer and set its state to wait for user input to start the plugin.
1460         * html/HTMLPlugInImageElement.h:
1461         (HTMLPlugInImageElement):
1462
1463         * rendering/RenderObject.h:
1464         (WebCore::RenderObject::isSnapshottedPlugIn): Add new function to identify
1465         RenderSnapshottedPlugIn instances. Since RenderSnapshottedPlugIn inherits from
1466         RenderEmbeddedObject, isEmbeddedObject() still returns true.
1467         * rendering/RenderEmbeddedObject.h:
1468         (RenderEmbeddedObject): Elevate a few virtual methods to protected for
1469         RenderSnapshottedPlugIn to override.
1470
1471         * rendering/RenderSnapshottedPlugIn.cpp: Added.
1472         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Initialize snapshot
1473         resource.
1474         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn): Shut down snapshot
1475         image resource to remove the renderer as a client, and remove image from memory cache.
1476         (WebCore::RenderSnapshottedPlugIn::plugInImageElement): Convenience function to get the
1477         HTML element.
1478         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Cache the snapshot, and repaint.
1479         (WebCore::RenderSnapshottedPlugIn::paint): If the plugin is not playing, paint like a
1480         RenderImage does.
1481         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the snapshot and overlay if the
1482         plugin is not playing.
1483         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot): Inspired by
1484         RenderImage::paintReplaced() and RenderImage::paintIntoRect().
1485         * rendering/RenderSnapshottedPlugIn.h: Added.
1486         (WebCore::RenderSnapshottedPlugIn::isSnapshottedPlugin): Returns true.
1487
1488         * rendering/RenderTheme.h: Add a function that paints the overlay on top of the snapshot.
1489         * rendering/RenderThemeMac.h:
1490         * rendering/RenderThemeMac.mm:
1491         (WebCore::RenderThemeMac::paintPlugInSnapshotOverlay):
1492
1493         * WebCore.xcodeproj/project.pbxproj: Add new RenderSnapshottedPlugIn class.
1494         * CMakeLists.txt: Ditto.
1495         * GNUmakefile.list.am: Ditto.
1496         * Target.pri: Ditto.
1497         * WebCore.gypi: Ditto.
1498         * WebCore.vcproj/WebCore.vcproj: Ditto.
1499         * rendering/RenderingAllInOne.cpp: Ditto.
1500
1501 2012-10-08  Hans Muller  <hmuller@adobe.com>
1502
1503         [CSS Exclusions] Add support for polygonal shapes
1504         https://bugs.webkit.org/show_bug.cgi?id=96811
1505
1506         Reviewed by Dirk Schulze.
1507
1508         Initial version of the layout support for polygonal exclusion shapes: the ExclusionPolygon class.
1509         Supports the public ExclusionShape operations using the algorithm described here:
1510         http://hansmuller-webkit.blogspot.com/2012/06/horizontal-box-polygon-intersection-for.html.
1511         Although both the "included" and "excluded" operations are supported, only the former is
1512         used, since only shape-inside is supported at the moment.
1513
1514         The ExclusionPolygon class stores the polygon's edges in an interval tree.
1515
1516         Polygon edges are represented by the ExclusionPolygonEdge struct, which records the indices of
1517         the pair of vertices joined by the edge.  Edge vertex index1 is usually less than index2, except
1518         the last edge where index2 is 0.  We plan to improve the algorithm that creates the edges
1519         by spanning vertices contained in sequences of more than two colinear vertices. For example,
1520         a triangular polygon might be specified with 5 vertices like this: 3,0 5,0, 5,5, 4,4 2,2, 0,0.
1521         By spanning the extra colinear points: 0,0 5,0, 5,5, which implies index1-index2 edges: 5-1 1-2 2-5.
1522
1523         Although the implementation supports complex polygons, the layout code is limited to
1524         essentially rectangular shapes until a patch for https://bugs.webkit.org/show_bug.cgi?id=96813
1525         lands.
1526
1527         Tests: fast/exclusions/shape-inside/shape-inside-polygon-rectangle.html
1528                fast/exclusions/shape-inside/shape-inside-simple-polygon-001.html
1529                fast/exclusions/shape-inside/shape-inside-simple-polygon-002.html
1530                fast/exclusions/shape-inside/shape-inside-simple-polygon-003.html
1531                fast/exclusions/shape-inside/shape-inside-simple-polygon-004.html
1532
1533         * CMakeLists.txt:
1534         * GNUmakefile.list.am:
1535         * Target.pri:
1536         * WebCore.gypi:
1537         * WebCore.vcproj/WebCore.vcproj:
1538         * WebCore.xcodeproj/project.pbxproj:
1539         * rendering/ExclusionPolygon.cpp: Added.
1540         (WebCore):
1541         (EdgeIntersection): Internal description of the intersection of a polygon edge and a horizontal line.
1542         (WebCore::ExclusionPolygon::ExclusionPolygon): See the introductory text above for a description of this type.
1543         (WebCore::computeXIntersection): Find and classify the X intercept of a polygon edge with horizontal line, if any.
1544         (WebCore::ExclusionPolygon::rightVertexY): This method is used to decide if a horizontal line "crosses" a vertex.
1545         (WebCore::appendIntervalX): Append an x coordinate to a vector of ExclusionIntervals.
1546         (WebCore::ExclusionPolygon::computeXIntersections): Return a vector of the intersections of a horizontal line with the polygon's edges.
1547         (WebCore::ExclusionPolygon::computeEdgeIntersections): Return a vector of the X projections of the edges that overlap a horizonal rectangle.
1548         (WebCore::ExclusionPolygon::getExcludedIntervals): Return a SegmentList of the X intervals within a horizontal rectangle that overlap the polygon.
1549         (WebCore::ExclusionPolygon::getIncludedIntervals): Return the X intervals within a horizontal rectangle that fit inside the polygon.
1550         * rendering/ExclusionPolygon.h: Added.
1551         (WebCore):
1552         (ExclusionPolygon):
1553         (WebCore::ExclusionPolygon::getXAt): X coordinate of a polygon vertex
1554         (WebCore::ExclusionPolygon::getYAt): Y coordinate of a polygon vertex
1555         (WebCore::ExclusionPolygon::numberOfVertices):
1556         (WebCore::ExclusionPolygon::fillRule): A WindRule value that defines "inside" for self-intersecting polygons.
1557         (ExclusionPolygonEdge):
1558         (WebCore::ExclusionPolygonEdge::ExclusionPolygonEdge):
1559         (WebCore::ExclusionPolygonEdge::vertex1):
1560         (WebCore::ExclusionPolygonEdge::vertex2):
1561         (WebCore::ExclusionPolygonEdge::minX):
1562         (WebCore::ExclusionPolygonEdge::minY):
1563         (WebCore::ExclusionPolygonEdge::maxX):
1564         (WebCore::ExclusionPolygonEdge::maxY):
1565         * rendering/ExclusionShape.cpp:
1566         (WebCore::createExclusionPolygon): Return a new ExclusionPolygon.
1567         (WebCore):
1568         (WebCore::ExclusionShape::createExclusionShape): Added support for BasicShape::BASIC_SHAPE_POLYGON.
1569         * rendering/ExclusionShapeInsideInfo.cpp:
1570         (WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock): Enable BASIC_SHAPE_POLYGON shapes for RenderBlocks.
1571
1572 2012-10-08  Tony Chang  <tony@chromium.org>
1573
1574         Replace 2 uses of updateLogicalHeight with computeLogicalHeight
1575         https://bugs.webkit.org/show_bug.cgi?id=98677
1576
1577         Reviewed by Ojan Vafai.
1578
1579         This is part of bug 96804.  Convert RenderTextControl and RenderSVGForeignObject to
1580         override the const computeLogicalHeight method rather than the updateLogicalHeight
1581         setter method.
1582
1583         No new tests, there should be no behavior change as this is just a refactor.
1584
1585         * rendering/RenderTextControl.cpp:
1586         (WebCore::RenderTextControl::computeLogicalHeight): Pass logicalHeight through rather than setting height.
1587         This is a slight correctness fix, although we don't support vertical inputs yet.
1588         * rendering/RenderTextControl.h:
1589         (RenderTextControl):
1590         * rendering/svg/RenderSVGForeignObject.cpp:
1591         (WebCore::RenderSVGForeignObject::computeLogicalHeight):
1592         * rendering/svg/RenderSVGForeignObject.h:
1593         (RenderSVGForeignObject):
1594
1595 2012-10-08  Min Qin  <qinmin@chromium.org>
1596
1597         Upstream some tweaks for overlay play button on Android
1598         https://bugs.webkit.org/show_bug.cgi?id=98671
1599
1600         Reviewed by Adam Barth.
1601
1602         This change stops displaying the overlay play button if video height is too small
1603         No test for this. Will rebase layout test expectations for android later.
1604
1605         * css/mediaControlsChromiumAndroid.css:
1606         (video::-webkit-media-controls-overlay-enclosure):
1607
1608 2012-10-08  Simon Fraser  <simon.fraser@apple.com>
1609
1610         Some GraphicsLayer cleanup to separate the concepts of using a tile cache, and being the main tile cache layer
1611         https://bugs.webkit.org/show_bug.cgi?id=98574
1612
1613         Reviewed by Dean Jackson.
1614
1615         GraphicsLayerCA assumed that using a TileCache equated to being the main page tile
1616         cache layer, which has some special considerations. Make these two concepts separate
1617         to get closer to being able to use TileCaches in place of CATiledLayer.
1618
1619         * platform/graphics/GraphicsLayer.h:
1620         (GraphicsLayer): Remove m_usingTileCache member, which was not appropriate
1621         for this class to have.
1622         * platform/graphics/GraphicsLayer.cpp:
1623         (WebCore::GraphicsLayer::GraphicsLayer): Remove init of m_usingTileCache.
1624         (WebCore::GraphicsLayer::debugBorderInfo): Can no longer use m_usingTileCache to
1625         get the blue color, so moved code into a virtual debugBorderInfo() method.
1626         (WebCore::GraphicsLayer::updateDebugIndicators): Call the virtual debugBorderInfo().
1627         * platform/graphics/GraphicsLayerClient.h: Remove the usingTileCache() callback;
1628         we now just cache this information in the GraphicsLayerCA on creation.
1629         * platform/graphics/ca/GraphicsLayerCA.cpp:
1630         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Init m_isPageTileCacheLayer to false,
1631         then set to m_isPageTileCacheLayer if the client says we should create a tile cache.
1632         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter): Overidden to avoid duplicate repaint
1633         counters in the top-left tile.
1634         (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): If this layer is the page tile cache layer,
1635         we allow setting of its background color.
1636         (WebCore::GraphicsLayerCA::debugBorderInfo): Overidden to use a blue color for tiles.
1637         (WebCore::GraphicsLayerCA::requiresTiledLayer): Don't make CATiledLayers for the page tile cache.
1638         * platform/graphics/ca/GraphicsLayerCA.h:
1639         (GraphicsLayerCA):
1640         * platform/graphics/ca/PlatformCALayerClient.h:
1641         (PlatformCALayerClient): Need to pass the platform layer into platformCALayerShowRepaintCounter()
1642         so we can distinguish between calls for tiles, and calls for the tile cache layer itself.
1643         * platform/graphics/ca/mac/TileCache.mm:
1644         (WebCore::TileCache::shouldShowRepaintCounters): Pass 0 to platformCALayerShowRepaintCounter() to
1645         indicate that we're asking about a tile.
1646         * platform/graphics/mac/WebLayer.mm:
1647         (drawLayerContents): Now we can just rely on platformCALayerShowRepaintCounter() to tell us whether
1648         to draw the repaint counter.
1649         (-[WebLayer setNeedsDisplayInRect:]):
1650         * platform/graphics/mac/WebTiledLayer.mm:
1651         (-[WebTiledLayer setNeedsDisplayInRect:]):
1652         * rendering/RenderLayerBacking.h:
1653         (WebCore::RenderLayerBacking::usingTileCache):
1654         (RenderLayerBacking):
1655         * rendering/RenderLayerCompositor.cpp:
1656         (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): We can ask the RenderLayerBacking
1657         whether it's for the tile cache, rather than going to the GraphicsLayer.
1658         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1659         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerShowRepaintCounter):
1660
1661 2012-10-08  Huang Dongsung  <luxtella@company100.net>
1662
1663         [Qt] Make ImageBufferQt use premultiplied converting functions in Color.h instead of its own mechanism.
1664         https://bugs.webkit.org/show_bug.cgi?id=98582
1665
1666         Reviewed by Eric Seidel.
1667
1668         Only Qt port failed canvas/philip/tests/2d.imageData.put.unchanged.html because
1669         ImageBufferQt converts from or to a premultiplied color using its own code. When
1670         we convert twice from an unmultiplied color to a premultiplied color and then to
1671         an unmultiplied color using this code, the calculated result are pretty
1672         different against the input color. It is why Gtk passes this test although Qt
1673         fails. Gtk port uses them in Color.h.
1674
1675         In addition, Qt should use the functions in Color.h to reduce duplicated codes.
1676
1677         Tests: canvas/philip/tests/2d.imageData.put.unchanged.html: Fixed a test case
1678
1679         * platform/graphics/qt/ImageBufferQt.cpp:
1680         (WebCore::getImageData):
1681         (WebCore::convertBGRAToRGBA):
1682         (WebCore::ImageBuffer::putByteArray):
1683
1684 2012-10-08  Tab Atkins  <jackalmage@gmail.com>
1685
1686         Remove "orphaned units" quirk
1687         https://bugs.webkit.org/show_bug.cgi?id=98553
1688
1689         Reviewed by Eric Seidel.
1690
1691         This patch removes our "orphaned units" quirk.
1692         We have an "orphaned units" quirk to match IE, which allows things like "width: 20 px;".
1693         But FF and Opera don't have it and aren't aware of bugs for it,
1694         and it's not in Simon Pieters' Quirks Mode spec <http://dvcs.w3.org/hg/quirks-mode/raw-file/tip/Overview.html>
1695
1696         No new tests, because I'm killing a quirk.
1697
1698         * css/CSSParser.cpp:
1699         (WebCore::CSSParser::parseValue):
1700         * css/CSSParser.h:
1701         (CSSParser):
1702
1703 2012-10-08  Robert Hogan  <robert@webkit.org>
1704
1705         Border, margin and padding of an inline's inline ancestors counted twice
1706         https://bugs.webkit.org/show_bug.cgi?id=63074
1707
1708         Reviewed by David Hyatt.
1709
1710         In a line such as '<span><span><img>Text' the border, padding and margin belonging
1711         to the two spans was counted twice by RenderBlockLineLayout::nextLineBreak(): once
1712         when adding the width of the <img> object to the line, and a second time when adding
1713         the 'Text'. The result was that nextLineBreak() now had a length for the line that 
1714         exceeded the line's maximum length and inserted a bogus line break.
1715
1716         This all happened because the helper function that is used to add in the border etc.
1717         from inline ancestors was crawling up the tree each time. It doesn't need to do that, it
1718         should stop crawling up the tree when the current object is not the first or last sibling below a parent.
1719
1720         Test: fast/inline/bpm-inline-ancestors.html
1721
1722         * rendering/RenderBlockLineLayout.cpp:
1723         (WebCore::shouldAddBorderPaddingMargin): Broke this check out into a helper function so that it 
1724         can help inlineLogicalWidth() return early and also treat empty RenderTexts the same as no previous/next
1725         sibling on the line. This ensures that collapsed leading space does not interfere with the decision to
1726         crawl up the ancestors accumulating border, padding, and margin.
1727         (WebCore):
1728         (WebCore::inlineLogicalWidth): Return early once the current child is no longer on the edge of its line - 
1729         this ensures the border, padding and margin of ancestors is not counted twice. 
1730
1731 2012-10-08  Mike West  <mkwst@chromium.org>
1732
1733         Null-check for DOMWindow before feeding it to FeatureObserver.
1734         https://bugs.webkit.org/show_bug.cgi?id=98624
1735
1736         Reviewed by Adam Barth.
1737
1738         We shouldn't call out to FeatureObserver in
1739         ContentSecurityPolicy::didReceiveHeader if the policy's document doesn't
1740         have a DOMWindow.
1741
1742         Test: http/tests/security/contentSecurityPolicy/xmlhttprequest-protected-resource-does-not-crash.html
1743
1744         * page/ContentSecurityPolicy.cpp:
1745         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1746             Null check 'document->domWindow' before passing it on.
1747         * page/FeatureObserver.cpp:
1748         (WebCore::FeatureObserver::observe):
1749             ASSERT 'domWindow'.
1750
1751 2012-10-08  Nate Chapin  <japhet@chromium.org>
1752
1753         Loader cleanup : Simplify FrameLoader/DocumentLoader setupForReplace()
1754         https://bugs.webkit.org/show_bug.cgi?id=49072
1755
1756         Reviewed by Eric Seidel.
1757
1758         This patch contains one small known behavior change: multipart/x-mixed-replace main resources with text/html parts
1759         will no longer load the text/html progressively. In practice, loading the html progressively causes the document
1760         to get cleared as soon as the next part's data starts arriving, which leads to a blank page most of the time. This case
1761         seems to be pathological, as IE, FF, Opera and WebKit all do something different currently. This patch will cause
1762         us to behave like Firefox, which is the most sane of the current behaviors.
1763
1764         Test: http/tests/multipart/multipart-html.php
1765
1766         * loader/DocumentLoader.cpp:
1767         (WebCore::DocumentLoader::commitData): Use isMultipartReplacingLoad() helper.
1768         (WebCore::DocumentLoader::receivedData):
1769         (WebCore::DocumentLoader::setupForReplace): Renamed from setupForReplaceByMIMEType(). Call maybeFinishLoadingMultipartContent()
1770             instead of doing identical work inline. After we call frameLoader()->setReplacing(), we will never load progressively, so remove
1771             the if (doesProgressiveLoad(newMIMEType)) {} block.
1772         (WebCore::DocumentLoader::isMultipartReplacingLoad):
1773         (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Inline the old DocumentLoader::setupForeReplace(), check
1774             frameLoader()->isReplacing() instead of the delete doesProgressiveLoad().
1775         * loader/DocumentLoader.h:
1776         * loader/FrameLoader.cpp:
1777         (WebCore::FrameLoader::setupForReplace): Move all calls to revertToProvisionalState here.
1778         * loader/MainResourceLoader.cpp:
1779         (WebCore::MainResourceLoader::didReceiveResponse): Call setupForReplace(), renamed from setupForReplaceByMIMEType().
1780
1781 2012-10-08  Zoltan Horvath  <zoltan@webkit.org>
1782
1783         [Qt] r122720 causes performance regression with DirectFB on ARMv7
1784         https://bugs.webkit.org/show_bug.cgi?id=97548
1785
1786         Reviewed by Jocelyn Turcotte.
1787
1788         Revert the rest of r122720. This change modifies the NativeImagePtr from QImage* to QPixmap*.
1789
1790         Covered by existing tests.
1791
1792         * bridge/qt/qt_pixmapruntime.cpp:
1793         (JSC::Bindings::assignToHTMLImageElement):
1794         (JSC::Bindings::QtPixmapRuntime::toQt):
1795         * platform/DragImage.h:
1796         (WebCore):
1797         * platform/graphics/GraphicsContext.h:
1798         (GraphicsContext):
1799         * platform/graphics/Image.h:
1800         (Image):
1801         * platform/graphics/NativeImagePtr.h:
1802         (WebCore):
1803         * platform/graphics/gstreamer/ImageGStreamer.h:
1804         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
1805         (ImageGStreamer::ImageGStreamer):
1806         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1807         (WebCore::GraphicsContext3D::getImageData):
1808         * platform/graphics/qt/GraphicsContextQt.cpp:
1809         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
1810         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1811         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1812         * platform/graphics/qt/ImageBufferDataQt.h:
1813         (ImageBufferData):
1814         * platform/graphics/qt/ImageBufferQt.cpp:
1815         (WebCore::ImageBufferData::ImageBufferData):
1816         (WebCore):
1817         (WebCore::ImageBufferData::toQImage):
1818         (WebCore::ImageBuffer::copyImage):
1819         (WebCore::ImageBuffer::clip):
1820         (WebCore::ImageBuffer::platformTransformColorSpace):
1821         (WebCore::getImageData):
1822         (WebCore::ImageBuffer::putByteArray):
1823         (WebCore::encodeImage):
1824         (WebCore::ImageBuffer::toDataURL):
1825         * platform/graphics/qt/ImageDecoderQt.cpp:
1826         (WebCore::ImageFrame::asNewNativeImage):
1827         * platform/graphics/qt/ImageQt.cpp:
1828         (graphics):
1829         (loadResourcePixmap):
1830         (WebCore::Image::loadPlatformResource):
1831         (WebCore::Image::setPlatformResource):
1832         (WebCore::Image::drawPattern):
1833         (WebCore::BitmapImage::BitmapImage):
1834         (WebCore::BitmapImage::draw):
1835         (WebCore::BitmapImage::checkForSolidColor):
1836         (WebCore::BitmapImage::create):
1837         * platform/graphics/qt/PatternQt.cpp:
1838         (WebCore::Pattern::createPlatformPattern):
1839         * platform/graphics/qt/StillImageQt.cpp:
1840         (WebCore::StillImage::StillImage):
1841         (WebCore::StillImage::~StillImage):
1842         (WebCore::StillImage::currentFrameHasAlpha):
1843         (WebCore::StillImage::size):
1844         (WebCore::StillImage::nativeImageForCurrentFrame):
1845         (WebCore::StillImage::draw):
1846         * platform/graphics/qt/StillImageQt.h:
1847         (WebCore::StillImage::create):
1848         (WebCore::StillImage::createForRendering):
1849         (StillImage):
1850         * platform/graphics/qt/TransparencyLayer.h:
1851         (WebCore::TransparencyLayer::TransparencyLayer):
1852         (TransparencyLayer):
1853         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
1854         (WebCore::GraphicsSurface::createReadOnlyImage):
1855         * platform/graphics/texmap/TextureMapperGL.cpp:
1856         (WebCore::BitmapTextureGL::updateContents):
1857         * platform/qt/ClipboardQt.cpp:
1858         (WebCore::ClipboardQt::createDragImage):
1859         (WebCore::ClipboardQt::declareAndWriteDragImage):
1860         * platform/qt/CursorQt.cpp:
1861         (WebCore::createCustomCursor):
1862         * platform/qt/DragImageQt.cpp:
1863         (WebCore::createDragImageFromImage):
1864         * platform/qt/PasteboardQt.cpp:
1865         (WebCore::Pasteboard::writeImage):
1866
1867 2012-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1868
1869         Unreviewed. Fix make distcheck.
1870
1871         * GNUmakefile.list.am: Add missing header file to compilation.
1872
1873 2012-10-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1874
1875         Unreviewed, rolling out r130619.
1876         http://trac.webkit.org/changeset/130619
1877         https://bugs.webkit.org/show_bug.cgi?id=98634
1878
1879         Causes many crashes on the EFL bots. (Requested by rakuco on
1880         #webkit).
1881
1882         * platform/RunLoop.h:
1883         (RunLoop):
1884         * platform/efl/RunLoopEfl.cpp:
1885         (WebCore::RunLoop::RunLoop):
1886         (WebCore::RunLoop::wakeUpEvent):
1887         (WebCore::RunLoop::wakeUp):
1888
1889 2012-10-08  Byungwoo Lee  <bw80.lee@samsung.com>
1890
1891         [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
1892         https://bugs.webkit.org/show_bug.cgi?id=98505
1893
1894         Reviewed by Kenneth Rohde Christiansen.
1895
1896         Instead of ecore_pipe_write(),
1897         use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
1898
1899         According to the EFL API document, this function is designed to dispatch
1900         a function on ecore main loop by avoiding dead lock or race condition. 
1901         With this function, webkit doesn't need to maintain ecore pipe also.
1902
1903         No new tests. The function to wakeup main loop is changed.
1904
1905         * platform/RunLoop.h:
1906         (RunLoop):
1907         * platform/efl/RunLoopEfl.cpp:
1908         (WebCore::RunLoop::RunLoop):
1909         (WebCore::RunLoop::wakeUpEvent):
1910         (WebCore::RunLoop::wakeUp):
1911
1912 2012-10-07  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1913
1914         :first-line pseudo selector ignoring words created from :before
1915         https://bugs.webkit.org/show_bug.cgi?id=80794
1916
1917         Reviewed by Daniel Bates.
1918
1919         The :first-line pseudo-element style is not applied for content
1920         which is generated from the :before/:after pseudo-elements.
1921
1922         Test: fast/css/first-line-style-for-before-after-content.html
1923
1924         * rendering/RenderObject.cpp:
1925         (WebCore::firstLineStyleForCachedUncachedType):
1926         Added a new static helper function incorporating the common
1927         functionality of both uncachedFirstLineStyle() and firstLineStyleSlowCase()
1928         functions. It also modifies the functionality to handle the
1929         scenario when :first-line style needs to be applied on content
1930         generated from :before/:after.
1931
1932         While getting the :first-line style we should also consider the case
1933         when the content is generated from a :before/:after pseudo-element in
1934         which case the RenderInline's parent should be considered for
1935         obtaining the first-line style.
1936
1937         (WebCore):
1938         (WebCore::RenderObject::uncachedFirstLineStyle):
1939         (WebCore::RenderObject::firstLineStyleSlowCase):
1940         Moved the duplicate code between the two functions to the common
1941         helper function firstLineStyleForCachedUncachedType().
1942
1943 2012-10-07  Peter Wang  <peter.wang@torchmobile.com.cn>
1944
1945         Web Inspector: The front-end should provide the position in original source file when set a breakpoint
1946         https://bugs.webkit.org/show_bug.cgi?id=93473
1947
1948         Reviewed by Yury Semikhatsky.
1949
1950         Since frontend truncates the indent, the first statement in a line must match the breakpoint (line, 0).
1951         With this patch JSC debugger can support both normal and "Pretty Print" mode.
1952
1953         No new test case. This patch can be verified with cases in "LayoutTests/inspector/debugger/".
1954
1955         * bindings/js/ScriptDebugServer.cpp:
1956         (WebCore::ScriptDebugServer::ScriptDebugServer):
1957         (WebCore::ScriptDebugServer::hasBreakpoint):
1958         (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
1959         (WebCore::ScriptDebugServer::pauseIfNeeded):
1960         * bindings/js/ScriptDebugServer.h:
1961         (ScriptDebugServer):
1962
1963 2012-10-07  Martin Robinson  <mrobinson@igalia.com>
1964
1965         [Soup] Clean up ResourceError creation
1966         https://bugs.webkit.org/show_bug.cgi?id=98521
1967
1968         Reviewed by Carlos Garcia Campos.
1969
1970         Simplify the creation of ResourcErrors in ResourceHandleSoup. This is
1971         part of a process to make the libsoup networking backend more hackable.
1972
1973         No new tests. This shouldn't change functionality.
1974
1975         * GNUmakefile.list.am: Added new file.
1976         * PlatformEfl.cmake: Added new file.
1977         * platform/network/soup/ResourceError.h:
1978         (ResourceError): Added new factories.
1979         * platform/network/soup/ResourceErrorSoup.cpp: Added.
1980         (WebCore::failingURI): Added this helper.
1981         (WebCore::ResourceError::httpError): New factory.
1982         (WebCore::ResourceError::genericIOError): Ditto.
1983         (WebCore::ResourceError::tlsError): Ditto.
1984         (WebCore::ResourceError::timeoutError): Ditto.
1985         * platform/network/soup/ResourceHandleSoup.cpp:
1986         (WebCore::handleUnignoredTLSErrors): Created this helper which merges
1987         some of the logic from sendRequestCallback.
1988         (WebCore::sendRequestCallback): Use the new helper.
1989         (WebCore::requestTimeoutCallback): Use the new factory.
1990
1991 2012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1992
1993         Rename first/second to key/value in HashMap iterators
1994         https://bugs.webkit.org/show_bug.cgi?id=82784
1995
1996         Reviewed by Eric Seidel.
1997
1998         * Modules/geolocation/Geolocation.cpp:
1999         (WebCore::Geolocation::Watchers::find):
2000         (WebCore::Geolocation::Watchers::remove):
2001         * Modules/indexeddb/IDBDatabase.cpp:
2002         (WebCore::IDBDatabase::objectStoreNames):
2003         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2004         (WebCore::IDBDatabaseBackendImpl::metadata):
2005         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2006         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
2007         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2008         (WebCore::IDBFactoryBackendImpl::open):
2009         * Modules/indexeddb/IDBObjectStore.cpp:
2010         (WebCore::IDBObjectStore::indexNames):
2011         (WebCore::IDBObjectStore::put):
2012         (WebCore::IDBObjectStore::index):
2013         (WebCore::IDBObjectStore::deleteIndex):
2014         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2015         (WebCore::IDBObjectStoreBackendImpl::metadata):
2016         (WebCore::makeIndexWriters):
2017         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
2018         * Modules/indexeddb/IDBTransaction.cpp:
2019         (WebCore::IDBTransaction::objectStore):
2020         (WebCore::IDBTransaction::objectStoreDeleted):
2021         (WebCore::IDBTransaction::onAbort):
2022         (WebCore::IDBTransaction::dispatchEvent):
2023         * Modules/mediastream/MediaConstraintsImpl.cpp:
2024         (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
2025         (WebCore::MediaConstraintsImpl::getMandatoryConstraintValue):
2026         * Modules/webdatabase/AbstractDatabase.cpp:
2027         (WebCore::AbstractDatabase::performOpenAndVerify):
2028         * Modules/webdatabase/DatabaseTracker.cpp:
2029         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2030         * Modules/webdatabase/OriginUsageRecord.cpp:
2031         (WebCore::OriginUsageRecord::diskUsage):
2032         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2033         (WebCore::SQLTransactionCoordinator::acquireLock):
2034         (WebCore::SQLTransactionCoordinator::releaseLock):
2035         (WebCore::SQLTransactionCoordinator::shutdown):
2036         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
2037         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2038         * Modules/webdatabase/chromium/QuotaTracker.cpp:
2039         (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin):
2040         (WebCore::QuotaTracker::updateDatabaseSize):
2041         * Modules/websockets/WebSocketDeflateFramer.cpp:
2042         (WebCore::WebSocketExtensionDeflateFrame::processResponse):
2043         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
2044         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
2045         * accessibility/AXObjectCache.cpp:
2046         (WebCore::AXObjectCache::~AXObjectCache):
2047         * bindings/gobject/DOMObjectCache.cpp:
2048         (WebKit::DOMObjectCache::clearByFrame):
2049         * bindings/js/DOMObjectHashTableMap.h:
2050         (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
2051         (WebCore::DOMObjectHashTableMap::get):
2052         * bindings/js/JSDOMBinding.cpp:
2053         (WebCore::cacheDOMStructure):
2054         * bindings/js/JSDOMGlobalObject.cpp:
2055         (WebCore::JSDOMGlobalObject::visitChildren):
2056         * bindings/js/JSDOMGlobalObject.h:
2057         (WebCore::getDOMConstructor):
2058         * bindings/js/PageScriptDebugServer.cpp:
2059         (WebCore::PageScriptDebugServer::addListener):
2060         (WebCore::PageScriptDebugServer::removeListener):
2061         * bindings/js/ScriptCachedFrameData.cpp:
2062         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2063         (WebCore::ScriptCachedFrameData::restore):
2064         * bindings/js/ScriptController.cpp:
2065         (WebCore::ScriptController::~ScriptController):
2066         (WebCore::ScriptController::clearWindowShell):
2067         (WebCore::ScriptController::attachDebugger):
2068         (WebCore::ScriptController::updateDocument):
2069         (WebCore::ScriptController::createRootObject):
2070         (WebCore::ScriptController::collectIsolatedContexts):
2071         (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
2072         (WebCore::ScriptController::clearScriptObjects):
2073         * bindings/js/ScriptController.h:
2074         (WebCore::ScriptController::windowShell):
2075         (WebCore::ScriptController::existingWindowShell):
2076         * bindings/js/ScriptDebugServer.cpp:
2077         (WebCore::ScriptDebugServer::setBreakpoint):
2078         (WebCore::ScriptDebugServer::removeBreakpoint):
2079         (WebCore::ScriptDebugServer::hasBreakpoint):
2080         * bindings/js/SerializedScriptValue.cpp:
2081         (WebCore::CloneSerializer::checkForDuplicate):
2082         (WebCore::CloneSerializer::dumpIfTerminal):
2083         (WebCore::CloneSerializer::write):
2084         * bindings/scripts/CodeGeneratorV8.pm:
2085         (GenerateImplementation):
2086         * bindings/scripts/test/V8/V8Float64Array.cpp:
2087         (WebCore::V8Float64Array::GetRawTemplate):
2088         (WebCore::V8Float64Array::GetTemplate):
2089         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2090         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
2091         (WebCore::V8TestActiveDOMObject::GetTemplate):
2092         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2093         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
2094         (WebCore::V8TestCustomNamedGetter::GetTemplate):
2095         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2096         (WebCore::V8TestEventConstructor::GetRawTemplate):
2097         (WebCore::V8TestEventConstructor::GetTemplate):
2098         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2099         (WebCore::V8TestEventTarget::GetRawTemplate):
2100         (WebCore::V8TestEventTarget::GetTemplate):
2101         * bindings/scripts/test/V8/V8TestException.cpp:
2102         (WebCore::V8TestException::GetRawTemplate):
2103         (WebCore::V8TestException::GetTemplate):
2104         * bindings/scripts/test/V8/V8TestInterface.cpp:
2105         (WebCore::V8TestInterface::GetRawTemplate):
2106         (WebCore::V8TestInterface::GetTemplate):
2107         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2108         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
2109         (WebCore::V8TestMediaQueryListListener::GetTemplate):
2110         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2111         (WebCore::V8TestNamedConstructor::GetRawTemplate):
2112         (WebCore::V8TestNamedConstructor::GetTemplate):
2113         * bindings/scripts/test/V8/V8TestNode.cpp:
2114         (WebCore::V8TestNode::GetRawTemplate):
2115         (WebCore::V8TestNode::GetTemplate):
2116         * bindings/scripts/test/V8/V8TestObj.cpp:
2117         (WebCore::V8TestObj::GetRawTemplate):
2118         (WebCore::V8TestObj::GetTemplate):
2119         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2120         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
2121         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
2122         * bindings/v8/DOMWrapperWorld.cpp:
2123         (WebCore::DOMWrapperWorld::deallocate):
2124         (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
2125         * bindings/v8/NPV8Object.cpp:
2126         (WebCore::freeV8NPObject):
2127         (WebCore::npCreateV8ScriptObject):
2128         * bindings/v8/ScriptController.cpp:
2129         (WebCore::ScriptController::clearScriptObjects):
2130         (WebCore::ScriptController::resetIsolatedWorlds):
2131         (WebCore::ScriptController::ensureIsolatedWorldContext):
2132         (WebCore::ScriptController::existingWindowShellInternal):
2133         (WebCore::ScriptController::evaluateInIsolatedWorld):
2134         (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
2135         (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
2136         (WebCore::ScriptController::collectIsolatedContexts):
2137         * bindings/v8/SerializedScriptValue.cpp:
2138         * bindings/v8/V8DOMMap.h:
2139         (WebCore::WeakReferenceMap::removeIfPresent):
2140         (WebCore::WeakReferenceMap::visit):
2141         * bindings/v8/V8PerContextData.cpp:
2142         (WebCore::V8PerContextData::dispose):
2143         * bindings/v8/npruntime.cpp:
2144         * bridge/IdentifierRep.cpp:
2145         (WebCore::IdentifierRep::get):
2146         * bridge/NP_jsobject.cpp:
2147         (ObjectMap::add):
2148         (ObjectMap::remove):
2149         * bridge/runtime_root.cpp:
2150         (JSC::Bindings::RootObject::invalidate):
2151         * css/CSSCanvasValue.cpp:
2152         (WebCore::CSSCanvasValue::canvasChanged):
2153         (WebCore::CSSCanvasValue::canvasResized):
2154         * css/CSSComputedStyleDeclaration.cpp:
2155         (WebCore::counterToCSSValue):
2156         * css/CSSCrossfadeValue.cpp:
2157         (WebCore::CSSCrossfadeValue::crossfadeChanged):
2158         * css/CSSFontFaceSource.cpp:
2159         (WebCore::CSSFontFaceSource::getFontData):
2160         * css/CSSFontSelector.cpp:
2161         (WebCore::CSSFontSelector::addFontFaceRule):
2162         (WebCore::CSSFontSelector::getFontData):
2163         * css/CSSImageGeneratorValue.cpp:
2164         (WebCore::CSSImageGeneratorValue::addClient):
2165         (WebCore::CSSImageGeneratorValue::removeClient):
2166         (WebCore::CSSImageGeneratorValue::getImage):
2167         * css/CSSSegmentedFontFace.cpp:
2168         (WebCore::CSSSegmentedFontFace::getFontData):
2169         * css/CSSSelector.cpp:
2170         (WebCore::CSSSelector::parsePseudoType):
2171         * css/CSSValuePool.cpp:
2172         (WebCore::CSSValuePool::createColorValue):
2173         (WebCore::CSSValuePool::createFontFamilyValue):
2174         (WebCore::CSSValuePool::createFontFaceValue):
2175         * css/PropertySetCSSStyleDeclaration.cpp:
2176         (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
2177         * css/RuleSet.cpp:
2178         (WebCore::reportAtomRuleMap):
2179         (WebCore::RuleSet::addToRuleSet):
2180         (WebCore::shrinkMapVectorsToFit):
2181         * css/StyleBuilder.cpp:
2182         (WebCore::ApplyPropertyCounter::applyInheritValue):
2183         (WebCore::ApplyPropertyCounter::applyValue):
2184         * css/StyleResolver.cpp:
2185         (WebCore::StyleResolver::collectFeatures):
2186         (WebCore::StyleResolver::ruleSetForScope):
2187         (WebCore::StyleResolver::appendAuthorStylesheets):
2188         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
2189         (WebCore::StyleResolver::collectMatchingRulesForList):
2190         * css/StyleSheetContents.cpp:
2191         (WebCore::StyleSheetContents::parserAddNamespace):
2192         (WebCore::StyleSheetContents::determineNamespace):
2193         * dom/CheckedRadioButtons.cpp:
2194         (WebCore::CheckedRadioButtons::addButton):
2195         (WebCore::CheckedRadioButtons::removeButton):
2196         * dom/ChildListMutationScope.cpp:
2197         (WebCore::ChildListMutationAccumulator::getOrCreate):
2198         * dom/Document.cpp:
2199         (WebCore::Document::windowNamedItems):
2200         (WebCore::Document::documentNamedItems):
2201         (WebCore::Document::getCSSCanvasElement):
2202         (WebCore::Document::cachedImmutableAttributeData):
2203         (WebCore::Document::getCachedLocalizer):
2204         * dom/DocumentMarkerController.cpp:
2205         (WebCore::DocumentMarkerController::markerContainingPoint):
2206         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2207         (WebCore::DocumentMarkerController::removeMarkers):
2208         (WebCore::DocumentMarkerController::repaintMarkers):
2209         (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
2210         (WebCore::DocumentMarkerController::showMarkers):
2211         * dom/DocumentOrderedMap.cpp:
2212         (WebCore::DocumentOrderedMap::remove):
2213         * dom/DocumentStyleSheetCollection.cpp:
2214         (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
2215         * dom/ElementAttributeData.cpp:
2216         (WebCore::ensureAttrListForElement):
2217         * dom/EventDispatcher.cpp:
2218         (WebCore::EventRelatedTargetAdjuster::findRelatedTarget):
2219         * dom/IdTargetObserverRegistry.cpp:
2220         (WebCore::IdTargetObserverRegistry::addObserver):
2221         (WebCore::IdTargetObserverRegistry::removeObserver):
2222         * dom/MutationObserverInterestGroup.cpp:
2223         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
2224         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2225         * dom/Node.cpp:
2226         (WebCore::Node::dumpStatistics):
2227         (WebCore::Node::clearRareData):
2228         (WebCore::NodeListsNodeData::invalidateCaches):
2229         (WebCore::collectMatchingObserversForMutation):
2230         * dom/NodeRareData.h:
2231         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
2232         (WebCore::NodeListsNodeData::addCacheWithName):
2233         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
2234         (WebCore::NodeListsNodeData::adoptTreeScope):
2235         * dom/ProcessingInstruction.cpp:
2236         (WebCore::ProcessingInstruction::checkStyleSheet):
2237         * dom/ScriptExecutionContext.cpp:
2238         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2239         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2240         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2241         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2242         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
2243         * dom/SelectorQuery.cpp:
2244         (WebCore::SelectorQueryCache::add):
2245         * dom/SpaceSplitString.cpp:
2246         (WebCore::SpaceSplitStringData::create):
2247         * dom/StyledElement.cpp:
2248         (WebCore::StyledElement::updateAttributeStyle):
2249         * editing/mac/AlternativeTextUIController.mm:
2250         (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
2251         * html/FormController.cpp:
2252         (WebCore::SavedFormState::serializeTo):
2253         (WebCore::SavedFormState::appendControlState):
2254         (WebCore::SavedFormState::takeControlState):
2255         (WebCore::SavedFormState::getReferencedFilePaths):
2256         (WebCore::FormKeyGenerator::formKey):
2257         (WebCore::FormController::createSavedFormStateMap):
2258         (WebCore::FormController::formElementsState):
2259         (WebCore::FormController::takeStateForFormElement):
2260         (WebCore::FormController::getReferencedFilePaths):
2261         * html/HTMLCollection.cpp:
2262         (WebCore::HTMLCollectionCacheBase::append):
2263         * html/canvas/WebGLFramebuffer.cpp:
2264         (WebCore::WebGLFramebuffer::getAttachment):
2265         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
2266         (WebCore::WebGLFramebuffer::checkStatus):
2267         (WebCore::WebGLFramebuffer::deleteObjectImpl):
2268         (WebCore::WebGLFramebuffer::initializeAttachments):
2269         * inspector/CodeGeneratorInspector.py:
2270         * inspector/DOMPatchSupport.cpp:
2271         (WebCore::DOMPatchSupport::diff):
2272         (WebCore::DOMPatchSupport::innerPatchChildren):
2273         (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
2274         * inspector/InjectedScriptManager.cpp:
2275         (WebCore::InjectedScriptManager::injectedScriptForId):
2276         (WebCore::InjectedScriptManager::injectedScriptIdFor):
2277         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
2278         (WebCore::InjectedScriptManager::releaseObjectGroup):
2279         (WebCore::InjectedScriptManager::injectedScriptFor):
2280         * inspector/InspectorCSSAgent.cpp:
2281         (WebCore::SelectorProfile::commitSelector):
2282         (WebCore::SelectorProfile::commitSelectorTime):
2283         (WebCore::SelectorProfile::toInspectorObject):
2284         (WebCore::UpdateRegionLayoutTask::onTimer):
2285         (WebCore::InspectorCSSAgent::forcePseudoState):
2286         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
2287         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
2288         (WebCore::InspectorCSSAgent::didRemoveDOMNode):
2289         (WebCore::InspectorCSSAgent::didModifyDOMAttr):
2290         (WebCore::InspectorCSSAgent::resetPseudoStates):
2291         * inspector/InspectorConsoleAgent.cpp:
2292         (WebCore::InspectorConsoleAgent::stopTiming):
2293         (WebCore::InspectorConsoleAgent::count):
2294         * inspector/InspectorDOMAgent.cpp:
2295         (WebCore::InspectorDOMAgent::nodeForId):
2296         (WebCore::InspectorDOMAgent::performSearch):
2297         (WebCore::InspectorDOMAgent::getSearchResults):
2298         * inspector/InspectorDOMDebuggerAgent.cpp:
2299         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2300         * inspector/InspectorDOMStorageAgent.cpp:
2301         (WebCore::InspectorDOMStorageAgent::clearFrontend):
2302         (WebCore::InspectorDOMStorageAgent::enable):
2303         (WebCore::InspectorDOMStorageAgent::storageId):
2304         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
2305         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
2306         (WebCore::InspectorDOMStorageAgent::memoryBytesUsedByStorageCache):
2307         * inspector/InspectorDatabaseAgent.cpp:
2308         (WebCore::InspectorDatabaseAgent::enable):
2309         (WebCore::InspectorDatabaseAgent::databaseId):
2310         (WebCore::InspectorDatabaseAgent::findByFileName):
2311         (WebCore::InspectorDatabaseAgent::databaseForId):
2312         * inspector/InspectorDebuggerAgent.cpp:
2313         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2314         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
2315         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2316         (WebCore::InspectorDebuggerAgent::searchInContent):
2317         (WebCore::InspectorDebuggerAgent::getScriptSource):
2318         (WebCore::InspectorDebuggerAgent::didParseSource):
2319         * inspector/InspectorIndexedDBAgent.cpp:
2320         (WebCore):
2321         * inspector/InspectorMemoryAgent.cpp:
2322         (WebCore):
2323         * inspector/InspectorPageAgent.cpp:
2324         (WebCore::cachedResourcesForFrame):
2325         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
2326         (WebCore::InspectorPageAgent::frameDetached):
2327         * inspector/InspectorProfilerAgent.cpp:
2328         (WebCore::InspectorProfilerAgent::getProfileHeaders):
2329         (WebCore):
2330         (WebCore::InspectorProfilerAgent::getProfile):
2331         * inspector/InspectorResourceAgent.cpp:
2332         (WebCore::buildObjectForHeaders):
2333         (WebCore::InspectorResourceAgent::willSendRequest):
2334         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient):
2335         (WebCore::InspectorResourceAgent::willLoadXHR):
2336         (WebCore::InspectorResourceAgent::replayXHR):
2337         * inspector/InspectorState.cpp:
2338         (WebCore::InspectorState::getBoolean):
2339         (WebCore::InspectorState::getString):
2340         (WebCore::InspectorState::getLong):
2341         (WebCore::InspectorState::getDouble):
2342         (WebCore::InspectorState::getObject):
2343         * inspector/InspectorStyleSheet.cpp:
2344         (WebCore::InspectorStyle::styleWithProperties):
2345         (WebCore::InspectorStyleSheet::inspectorStyleForId):
2346         * inspector/InspectorValues.cpp:
2347         (WebCore::InspectorObjectBase::get):
2348         (WebCore::InspectorObjectBase::writeJSON):
2349         * inspector/InspectorWorkerAgent.cpp:
2350         (WebCore::InspectorWorkerAgent::workerContextTerminated):
2351         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
2352         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
2353         * inspector/MemoryInstrumentationImpl.cpp:
2354         (WebCore::MemoryInstrumentationClientImpl::countObjectSize):
2355         * inspector/MemoryInstrumentationImpl.h:
2356         (WebCore::MemoryInstrumentationClientImpl::totalSize):
2357         (WebCore::MemoryInstrumentationClientImpl::reportedSizeForAllTypes):
2358         * inspector/NetworkResourcesData.cpp:
2359         (WebCore::NetworkResourcesData::setXHRReplayData):
2360         (WebCore::NetworkResourcesData::removeCachedResource):
2361         (WebCore::NetworkResourcesData::clear):
2362         * loader/CrossOriginAccessControl.cpp:
2363         (WebCore::isSimpleCrossOriginAccessRequest):
2364         (WebCore::createAccessControlPreflightRequest):
2365         * loader/CrossOriginPreflightResultCache.cpp:
2366         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2367         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
2368         * loader/DocumentLoader.cpp:
2369         (WebCore::DocumentLoader::getSubresources):
2370         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2371         * loader/MainResourceLoader.cpp:
2372         (WebCore::MainResourceLoader::didReceiveResponse):
2373         * loader/ResourceLoadScheduler.cpp:
2374         (WebCore::ResourceLoadScheduler::servePendingRequests):
2375         * loader/appcache/ApplicationCache.cpp:
2376         (WebCore::ApplicationCache::removeResource):
2377         (WebCore::ApplicationCache::clearStorageID):
2378         (WebCore::ApplicationCache::dump):
2379         * loader/appcache/ApplicationCacheGroup.cpp:
2380         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2381         (WebCore::ApplicationCacheGroup::startLoadingEntry):
2382         (WebCore::ApplicationCacheGroup::addEntry):
2383         * loader/appcache/ApplicationCacheHost.cpp:
2384         (WebCore::ApplicationCacheHost::fillResourceList):
2385         * loader/appcache/ApplicationCacheResource.cpp:
2386         (WebCore::ApplicationCacheResource::estimatedSizeInStorage):
2387         * loader/appcache/ApplicationCacheStorage.cpp:
2388         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
2389         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2390         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
2391         (WebCore::ApplicationCacheStorage::store):
2392         (WebCore::ApplicationCacheStorage::empty):
2393         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
2394         * loader/archive/ArchiveFactory.cpp:
2395         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
2396         * loader/cache/CachedRawResource.cpp:
2397         (WebCore::CachedRawResource::canReuse):
2398         * loader/cache/CachedResource.cpp:
2399         (WebCore::CachedResource::switchClientsToRevalidatedResource):
2400         (WebCore::CachedResource::updateResponseAfterRevalidation):
2401         * loader/cache/CachedResourceClientWalker.h:
2402         (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
2403         * loader/cache/CachedResourceLoader.cpp:
2404         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2405         (WebCore::CachedResourceLoader::requestResource):
2406         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
2407         (WebCore::CachedResourceLoader::removeCachedResource):
2408         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
2409         * loader/cache/MemoryCache.cpp:
2410         (WebCore::MemoryCache::removeResourcesWithOrigin):
2411         (WebCore::MemoryCache::getOriginsWithCache):
2412         (WebCore::MemoryCache::getStatistics):
2413         (WebCore::MemoryCache::setDisabled):
2414         * loader/icon/IconDatabase.cpp:
2415         (WebCore::IconDatabase::removeAllIcons):
2416         (WebCore::IconDatabase::iconRecordCountWithData):
2417         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2418         * page/DOMWindow.cpp:
2419         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2420         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2421         * page/EventHandler.cpp:
2422         (WebCore::EventHandler::handleTouchEvent):
2423         * page/Frame.cpp:
2424         (WebCore::Frame::injectUserScripts):
2425         * page/PageGroup.cpp:
2426         (WebCore::PageGroup::pageGroup):
2427         (WebCore::PageGroup::closeLocalStorage):
2428         (WebCore::PageGroup::clearLocalStorageForAllOrigins):
2429         (WebCore::PageGroup::clearLocalStorageForOrigin):
2430         (WebCore::PageGroup::syncLocalStorage):
2431         (WebCore::PageGroup::addUserScriptToWorld):
2432         (WebCore::PageGroup::addUserStyleSheetToWorld):
2433         (WebCore::PageGroup::removeUserScriptFromWorld):
2434         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
2435         * page/PageSerializer.cpp:
2436         (WebCore::PageSerializer::urlForBlankFrame):
2437         * page/SecurityPolicy.cpp:
2438         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
2439         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
2440         * page/Settings.cpp:
2441         (WebCore::setGenericFontFamilyMap):
2442         (WebCore::getGenericFontFamilyForScript):
2443         * page/SpeechInput.cpp:
2444         (WebCore::SpeechInput::registerListener):
2445         * page/TouchDisambiguation.cpp:
2446         (WebCore::findGoodTouchTargets):
2447         * page/WindowFeatures.cpp:
2448         (WebCore::WindowFeatures::boolFeature):
2449         (WebCore::WindowFeatures::floatFeature):
2450         * page/animation/AnimationController.cpp:
2451         (WebCore::AnimationControllerPrivate::updateAnimations):
2452         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2453         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2454         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2455         * page/animation/CompositeAnimation.cpp:
2456         (WebCore::CompositeAnimation::clearRenderer):
2457         (WebCore::CompositeAnimation::updateTransitions):
2458         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2459         (WebCore::CompositeAnimation::animate):
2460         (WebCore::CompositeAnimation::getAnimatedStyle):
2461         (WebCore::CompositeAnimation::setAnimating):
2462         (WebCore::CompositeAnimation::timeToNextService):
2463         (WebCore::CompositeAnimation::getAnimationForProperty):
2464         (WebCore::CompositeAnimation::suspendAnimations):
2465         (WebCore::CompositeAnimation::resumeAnimations):
2466         (WebCore::CompositeAnimation::overrideImplicitAnimations):
2467         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
2468         (WebCore::CompositeAnimation::isAnimatingProperty):
2469         (WebCore::CompositeAnimation::numberOfActiveAnimations):
2470         * platform/Language.cpp:
2471         (WebCore::languageDidChange):
2472         * platform/MIMETypeRegistry.cpp:
2473         (WebCore::MIMETypeRegistry::getNormalizedMIMEType):
2474         * platform/audio/HRTFElevation.cpp:
2475         (WebCore::getConcatenatedImpulseResponsesForSubject):
2476         * platform/blackberry/CookieManager.cpp:
2477         (WebCore::CookieManager::generateHtmlFragmentForCookies):
2478         (WebCore::CookieManager::removeAllCookies):
2479         * platform/blackberry/CookieMap.cpp:
2480         (WebCore::CookieMap::removeOldestCookie):
2481         (WebCore::CookieMap::getAllChildCookies):
2482         * platform/cf/BinaryPropertyList.cpp:
2483         (WebCore::BinaryPropertyListPlan::writeIntegerArray):
2484         * platform/chromium/support/WebHTTPLoadInfo.cpp:
2485         (WebKit::addHeader):
2486         * platform/chromium/support/WebURLRequest.cpp:
2487         (WebKit::WebURLRequest::visitHTTPHeaderFields):
2488         * platform/chromium/support/WebURLResponse.cpp:
2489         (WebKit::WebURLResponse::addHTTPHeaderField):
2490         (WebKit::WebURLResponse::visitHTTPHeaderFields):
2491         * platform/graphics/DisplayRefreshMonitor.cpp:
2492         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
2493         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
2494         * platform/graphics/FontCache.cpp:
2495         (WebCore::FontCache::getCachedFontPlatformData):
2496         (WebCore::FontCache::getVerticalData):
2497         (WebCore::FontCache::getCachedFontData):
2498         (WebCore::FontCache::releaseFontData):
2499         (WebCore::FontCache::purgeInactiveFontData):
2500         * platform/graphics/GlyphPageTreeNode.cpp:
2501         (WebCore::GlyphPageTreeNode::treeGlyphPageCount):
2502         (WebCore::GlyphPageTreeNode::pageCount):
2503         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2504         (WebCore::GlyphPageTreeNode::pruneTreeFontData):
2505         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
2506         (WebCore::GlyphPageTreeNode::pruneFontData):
2507         (WebCore::GlyphPageTreeNode::showSubtree):
2508         (showGlyphPageTrees):
2509         * platform/graphics/TiledBackingStore.cpp:
2510         (WebCore::TiledBackingStore::updateTileBuffers):
2511         (WebCore::TiledBackingStore::resizeEdgeTiles):
2512         (WebCore::TiledBackingStore::setKeepRect):
2513         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2514         (WebCore::AVFWrapper::avfWrapperForCallbackContext):
2515         * platform/graphics/blackberry/LayerTiler.cpp:
2516         (WebCore::LayerTiler::layerVisibilityChanged):
2517         (WebCore::LayerTiler::uploadTexturesIfNeeded):
2518         (WebCore::LayerTiler::addTileJob):
2519         (WebCore::LayerTiler::deleteTextures):
2520         (WebCore::LayerTiler::pruneTextures):
2521         (WebCore::LayerTiler::bindContentsTexture):
2522         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
2523         (WebCore::TextureCacheCompositingThread::textureForTiledContents):
2524         (WebCore::TextureCacheCompositingThread::textureForColor):
2525         * platform/graphics/ca/GraphicsLayerCA.cpp:
2526         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2527         (WebCore::GraphicsLayerCA::pauseAnimation):
2528         (WebCore::GraphicsLayerCA::layerDidDisplay):
2529         (WebCore::GraphicsLayerCA::updateGeometry):
2530         (WebCore::GraphicsLayerCA::updateTransform):
2531         (WebCore::GraphicsLayerCA::updateChildrenTransform):
2532         (WebCore::GraphicsLayerCA::updateMasksToBounds):
2533         (WebCore::GraphicsLayerCA::updateContentsVisibility):
2534         (WebCore::GraphicsLayerCA::updateContentsOpaque):
2535         (WebCore::GraphicsLayerCA::updateBackfaceVisibility):
2536         (WebCore::GraphicsLayerCA::updateFilters):
2537         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2538         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
2539         (WebCore::GraphicsLayerCA::updateContentsImage):
2540         (WebCore::GraphicsLayerCA::updateContentsRect):
2541         (WebCore::GraphicsLayerCA::updateMaskLayer):
2542         (WebCore::GraphicsLayerCA::updateLayerAnimations):
2543         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2544         (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer):
2545         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
2546         (WebCore::GraphicsLayerCA::suspendAnimations):
2547         (WebCore::GraphicsLayerCA::resumeAnimations):
2548         (WebCore::GraphicsLayerCA::findOrMakeClone):
2549         (WebCore::GraphicsLayerCA::setOpacityInternal):
2550         (WebCore::GraphicsLayerCA::updateOpacityOnLayer):
2551         * platform/graphics/ca/mac/TileCache.mm:
2552         (WebCore::TileCache::~TileCache):
2553         (WebCore::TileCache::setNeedsDisplay):
2554         (WebCore::TileCache::setScale):
2555         (WebCore::TileCache::setAcceleratesDrawing):
2556         (WebCore::TileCache::setTileDebugBorderWidth):
2557         (WebCore::TileCache::setTileDebugBorderColor):
2558         (WebCore::TileCache::revalidateTiles):
2559         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2560         (PlatformCALayer::animationStarted):
2561         (resubmitAllAnimations):
2562         (PlatformCALayer::animationForKey):
2563         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2564         (WebCore::LookupAltName):
2565         (WebCore::fontContainsCharacter):
2566         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
2567         (WebCore::getDerivedFontData):
2568         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2569         (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
2570         (WebCore::CustomFilterGlobalContext::getValidatedProgram):
2571         (WebCore::CustomFilterGlobalContext::removeValidatedProgram):
2572         * platform/graphics/filters/CustomFilterProgram.cpp:
2573         (WebCore::CustomFilterProgram::notifyClients):
2574         * platform/graphics/harfbuzz/HarfBuzzSkia.cpp:
2575         (WebCore::getCachedHarfbuzzFace):
2576         (WebCore::releaseCachedHarfbuzzFace):
2577         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
2578         (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
2579         (WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
2580         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2581         (WebCore::SimpleFontData::getCFStringAttributes):
2582         * platform/graphics/mac/SimpleFontDataMac.mm:
2583         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2584         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2585         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2586         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2587         (WebCore::GraphicsContext3D::compileShader):
2588         (WebCore::GraphicsContext3D::mappedSymbolName):
2589         (WebCore::GraphicsContext3D::getShaderiv):
2590         (WebCore::GraphicsContext3D::getShaderInfoLog):
2591         (WebCore::GraphicsContext3D::getShaderSource):
2592         * platform/graphics/openvg/EGLDisplayOpenVG.cpp:
2593         (WebCore::EGLDisplayOpenVG::~EGLDisplayOpenVG):
2594         (WebCore::EGLDisplayOpenVG::destroySurface):
2595         (WebCore::EGLDisplayOpenVG::contextForSurface):
2596         * platform/graphics/texmap/TextureMapperGL.cpp:
2597         (WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
2598         (WebCore::TextureMapperGLData::SharedGLData::~SharedGLData):
2599         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2600         (WebCore::TextureMapperShaderManager::getShaderProgram):
2601         (WebCore::TextureMapperShaderManager::getShaderForFilter):
2602         * platform/graphics/wince/FontPlatformData.cpp:
2603         (WebCore::FixedSizeFontData::create):
2604         * platform/gtk/DataObjectGtk.cpp:
2605         (WebCore::DataObjectGtk::forClipboard):
2606         * platform/gtk/GtkDragAndDropHelper.cpp:
2607         (WebCore::GtkDragAndDropHelper::handleGetDragData):
2608         (WebCore::GtkDragAndDropHelper::handleDragLeave):
2609         (WebCore::GtkDragAndDropHelper::handleDragMotion):
2610         (WebCore::GtkDragAndDropHelper::handleDragDataReceived):
2611         (WebCore::GtkDragAndDropHelper::handleDragDrop):
2612         * platform/gtk/RedirectedXCompositeWindow.cpp:
2613         (WebCore::filterXDamageEvent):
2614         * platform/gtk/RenderThemeGtk3.cpp:
2615         (WebCore::gtkStyleChangedCallback):
2616         (WebCore::getStyleContext):
2617         * platform/mac/ScrollbarThemeMac.mm:
2618         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2619         * platform/network/CredentialStorage.cpp:
2620         (WebCore::CredentialStorage::set):
2621         (WebCore::CredentialStorage::get):
2622         * platform/network/HTTPHeaderMap.cpp:
2623         (WebCore::HTTPHeaderMap::copyData):
2624         (WebCore::HTTPHeaderMap::get):
2625         * platform/network/MIMEHeader.cpp:
2626         (WebCore::MIMEHeader::parseHeader):
2627         * platform/network/ResourceHandle.cpp:
2628         (WebCore::ResourceHandle::create):
2629         * platform/network/ResourceRequestBase.cpp:
2630         (WebCore::ResourceRequestBase::addHTTPHeaderField):
2631         (WebCore::ResourceRequestBase::addHTTPHeaderFields):
2632         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2633         (WebCore::ResourceRequest::targetTypeFromMimeType):
2634         (WebCore::ResourceRequest::initializePlatformRequest):
2635         * platform/network/cf/ResourceHandleCFNet.cpp:
2636         (WebCore::makeFinalRequest):
2637         * platform/network/cf/ResourceRequestCFNet.cpp:
2638         (WebCore::setHeaderFields):
2639         * platform/network/curl/ResourceHandleManager.cpp:
2640         (WebCore::ResourceHandleManager::initializeHandle):
2641         * platform/network/mac/ResourceRequestMac.mm:
2642         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2643         * platform/network/qt/ResourceRequestQt.cpp:
2644         (WebCore::ResourceRequest::toNetworkRequest):
2645         * platform/network/soup/ResourceHandleSoup.cpp:
2646         (WebCore::sendRequestCallback):
2647         (WebCore::ResourceHandle::setClientCertificate):
2648         * platform/network/soup/ResourceRequestSoup.cpp:
2649         (WebCore::ResourceRequest::updateSoupMessage):
2650         (WebCore::ResourceRequest::toSoupMessage):
2651         * platform/network/soup/ResourceResponseSoup.cpp:
2652         (WebCore::ResourceResponse::toSoupMessage):
2653         * platform/network/win/ResourceHandleWin.cpp:
2654         (WebCore::ResourceHandle::start):
2655         * platform/qt/RunLoopQt.cpp:
2656         (WebCore::RunLoop::TimerBase::timerFired):
2657         * platform/text/LocaleToScriptMappingDefault.cpp:
2658         (WebCore::scriptNameToCode):
2659         (WebCore::localeToScriptCodeForFontSelection):
2660         * platform/text/TextEncodingRegistry.cpp:
2661         (WebCore::pruneBlacklistedCodecs):
2662         (WebCore::dumpTextEncodingNameMap):
2663         * platform/text/transcoder/FontTranscoder.cpp:
2664         (WebCore::FontTranscoder::converterType):
2665         * platform/text/win/TextCodecWin.cpp:
2666         (WebCore::LanguageManager::LanguageManager):
2667         (WebCore::getCodePage):
2668         (WebCore::TextCodecWin::registerExtendedEncodingNames):
2669         (WebCore::TextCodecWin::registerExtendedCodecs):
2670         (WebCore::TextCodecWin::enumerateSupportedEncodings):
2671         * platform/win/ClipboardUtilitiesWin.cpp:
2672         (WebCore::getDataMapItem):
2673         (WebCore::getClipboardData):
2674         (WebCore::setClipboardData):
2675         * platform/win/ClipboardWin.cpp:
2676         (WebCore::ClipboardWin::types):
2677         * platform/win/FileSystemWin.cpp:
2678         (WebCore::cachedStorageDirectory):
2679         * platform/win/RunLoopWin.cpp:
2680         (WebCore::RunLoop::TimerBase::timerFired):
2681         * platform/win/WCDataObject.cpp:
2682         (WebCore::WCDataObject::createInstance):
2683         * platform/wince/MIMETypeRegistryWinCE.cpp:
2684         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2685         * platform/wx/ContextMenuWx.cpp:
2686         (WebCore::ContextMenu::appendItem):
2687         * plugins/PluginDatabase.cpp:
2688         (WebCore::PluginDatabase::refresh):
2689         (WebCore::PluginDatabase::MIMETypeForExtension):
2690         (WebCore::PluginDatabase::remove):
2691         * plugins/PluginMainThreadScheduler.cpp:
2692         (WebCore::PluginMainThreadScheduler::scheduleCall):
2693         (WebCore::PluginMainThreadScheduler::dispatchCalls):
2694         * plugins/PluginStream.cpp:
2695         (WebCore::PluginStream::startStream):
2696         * plugins/blackberry/PluginDataBlackBerry.cpp:
2697         (WebCore::PluginData::initPlugins):
2698         * plugins/wx/PluginDataWx.cpp:
2699         (WebCore::PluginData::initPlugins):
2700         * rendering/ExclusionShapeInsideInfo.cpp:
2701         (WebCore::ExclusionShapeInsideInfo::ensureExclusionShapeInsideInfoForRenderBlock):
2702         * rendering/FlowThreadController.cpp:
2703         (WebCore::FlowThreadController::unregisterNamedFlowContentNode):
2704         * rendering/InlineFlowBox.cpp:
2705         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
2706         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2707         * rendering/RenderBlock.cpp:
2708         (WebCore::RenderBlock::clearFloats):
2709         * rendering/RenderBlockLineLayout.cpp:
2710         (WebCore::setLogicalWidthForTextRun):
2711         * rendering/RenderBoxModelObject.cpp:
2712         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2713         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2714         * rendering/RenderCounter.cpp:
2715         (WebCore::RenderCounter::destroyCounterNodes):
2716         (WebCore::RenderCounter::destroyCounterNode):
2717         (WebCore::updateCounters):
2718         (WebCore::RenderCounter::rendererStyleChanged):
2719         * rendering/RenderFlowThread.cpp:
2720         (WebCore::RenderFlowThread::setRegionRangeForBox):
2721         (WebCore::RenderFlowThread::getRegionRangeForBox):
2722         * rendering/RenderLayer.cpp:
2723         (WebCore::RenderLayer::paint):
2724         (WebCore::performOverlapTests):
2725         * rendering/RenderLayerFilterInfo.cpp:
2726         (WebCore::RenderLayerFilterInfo::filterInfoForRenderLayer):
2727         (WebCore::RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded):
2728         * rendering/RenderNamedFlowThread.cpp:
2729         (WebCore::RenderNamedFlowThread::dependsOn):
2730         (WebCore::RenderNamedFlowThread::pushDependencies):
2731         * rendering/RenderRegion.cpp:
2732         (WebCore::RenderRegion::setRenderBoxRegionInfo):
2733         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2734         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2735         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2736         * rendering/RenderTableSection.cpp:
2737         (WebCore::RenderTableSection::cachedCollapsedBorder):
2738         * rendering/RenderThemeMac.mm:
2739         (WebCore::RenderThemeMac::systemColor):
2740         * rendering/RenderView.cpp:
2741         (WebCore::RenderView::selectionBounds):
2742         (WebCore::RenderView::setSelection):
2743         * rendering/RenderWidget.cpp:
2744         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2745         * rendering/RootInlineBox.cpp:
2746         (WebCore::RootInlineBox::ascentAndDescentForBox):
2747         * rendering/VerticalPositionCache.h:
2748         (WebCore::VerticalPositionCache::get):
2749         * rendering/svg/RenderSVGInlineText.cpp:
2750         (WebCore::RenderSVGInlineText::characterStartsNewTextChunk):
2751         * rendering/svg/RenderSVGResourceFilter.cpp:
2752         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
2753         * rendering/svg/RenderSVGResourceGradient.cpp:
2754         (WebCore::RenderSVGResourceGradient::applyResource):
2755         * rendering/svg/RenderSVGResourcePattern.cpp:
2756         (WebCore::RenderSVGResourcePattern::applyResource):
2757         * rendering/svg/SVGResourcesCache.cpp:
2758         (WebCore::SVGResourcesCache::resourceDestroyed):
2759         * rendering/svg/SVGRootInlineBox.cpp:
2760         (WebCore::swapItemsInLayoutAttributes):
2761         * rendering/svg/SVGTextLayoutAttributes.cpp:
2762         (WebCore::SVGTextLayoutAttributes::dump):
2763         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
2764         (WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
2765         (WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
2766         * rendering/svg/SVGTextLayoutEngine.cpp:
2767         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2768         * rendering/svg/SVGTextMetricsBuilder.cpp:
2769         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
2770         * storage/StorageAreaSync.cpp:
2771         (WebCore::StorageAreaSync::syncTimerFired):
2772         (WebCore::StorageAreaSync::performImport):
2773         (WebCore::StorageAreaSync::sync):
2774         * storage/StorageMap.cpp:
2775         (WebCore::StorageMap::key):
2776         (WebCore::StorageMap::setItem):
2777         * storage/StorageNamespaceImpl.cpp:
2778         (WebCore::StorageNamespaceImpl::localStorageNamespace):
2779         (WebCore::StorageNamespaceImpl::copy):
2780         (WebCore::StorageNamespaceImpl::close):
2781         (WebCore::StorageNamespaceImpl::clearAllOriginsForDeletion):
2782         (WebCore::StorageNamespaceImpl::sync):
2783         * svg/SVGDocumentExtensions.cpp:
2784         (WebCore::SVGDocumentExtensions::removeAnimationElementFromTarget):
2785         (WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget):
2786         (WebCore::SVGDocumentExtensions::addPendingResource):
2787         (WebCore::SVGDocumentExtensions::isElementPendingResources):
2788         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2789         (WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget):
2790         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
2791         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
2792         * svg/SVGElement.cpp:
2793         (WebCore::SVGElement::~SVGElement):
2794         * svg/animation/SMILTimeContainer.cpp:
2795         (WebCore::SMILTimeContainer::setElapsed):
2796         (WebCore::SMILTimeContainer::updateAnimations):
2797         * svg/graphics/SVGImageCache.cpp:
2798         (WebCore::SVGImageCache::~SVGImageCache):
2799         (WebCore::SVGImageCache::removeClientFromCache):
2800         (WebCore::SVGImageCache::requestedSizeAndScales):
2801         (WebCore::SVGImageCache::imageContentChanged):
2802         (WebCore::SVGImageCache::redraw):
2803         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
2804         * svg/graphics/filters/SVGFilterBuilder.h:
2805         (WebCore::SVGFilterBuilder::effectReferences):
2806         (WebCore::SVGFilterBuilder::addBuiltinEffects):
2807         * svg/properties/SVGAnimatedProperty.h:
2808         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
2809         * svg/properties/SVGAttributeToPropertyMap.cpp:
2810         (WebCore::SVGAttributeToPropertyMap::addProperties):
2811         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties):
2812         * workers/WorkerContext.cpp:
2813         (WebCore::WorkerContext::hasPendingActivity):
2814         * workers/WorkerEventQueue.cpp:
2815         (WebCore::WorkerEventQueue::close):
2816         * xml/XMLHttpRequest.cpp:
2817         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2818         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2819         * xml/XPathFunctions.cpp:
2820         (WebCore::XPath::createFunction):
2821         * xml/XPathParser.cpp:
2822         (isAxisName):
2823         * xml/XSLTProcessorLibxslt.cpp:
2824         (WebCore::xsltParamArrayFromParameterMap):
2825         * xml/XSLTProcessorQt.cpp:
2826         (WebCore::XSLTProcessor::transformToString):
2827
2828 2012-10-07  Geoffrey Garen  <ggaren@apple.com>
2829
2830         REGRESSION (r130584): Crashes in JSC::MarkedAllocator::allocateSlowCase, failing fast/dom/gc-dom-tree-lifetime.html
2831         https://bugs.webkit.org/show_bug.cgi?id=98612
2832
2833         Reviewed by Darin Adler.
2834
2835         Since DOM modification can happen outside of JS, calls into JS due to
2836         DOM modification need to take the JS lock.
2837
2838         * bindings/js/JSNodeCustom.cpp:
2839         (WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase): Take the JS
2840         lock before doing a JS allocation, since this may be a JS entrypoint.
2841
2842         * bindings/js/JSNodeCustom.h:
2843         (WebCore::willCreatePossiblyOrphanedTreeByRemoval): Split out a slow case
2844         to help the inliner.
2845
2846 2012-10-07  Nick Carter  <nick@chromium.org>
2847
2848         [chromium] Crash in WebCore::GraphicsLayerChromium::setContentsToImage
2849         https://bugs.webkit.org/show_bug.cgi?id=98456
2850
2851         Reviewed by James Robinson.
2852
2853         Handle null return of nativeImageForCurrentFrame.
2854
2855         Test: compositing/images/truncated-direct-png-image.html
2856
2857         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2858         (WebCore::GraphicsLayerChromium::setContentsToImage):
2859
2860 2012-10-07  Benjamin Poulain  <benjamin@webkit.org>
2861
2862         WTFURL: implement URL port removal for HTMLAnchorElement
2863         https://bugs.webkit.org/show_bug.cgi?id=98604
2864
2865         Reviewed by Adam Barth.
2866
2867         * platform/KURLWTFURL.cpp:
2868         (WebCore::KURL::hasPort):
2869         (WebCore::KURL::removePort):
2870         (WebCore::KURL::isHierarchical):
2871         Implement those methods to pass the port removal test of HTMLAnchorElement.
2872
2873 2012-10-05  Dirk Schulze  <krit@webkit.org>
2874
2875         SVG radialGradient should support 'fr' for focal radius (just like Canvas)
2876         https://bugs.webkit.org/show_bug.cgi?id=97986
2877
2878         Reviewed by Daniel Bates.
2879
2880         Update SVGRadialGradient to the changed behavior in SVG2: http://www.w3.org/TR/SVG2/pservers.html#RadialGradients
2881         SVG2 adds the focal radius for radial gradients. Color stops will start from the edge of
2882         the focal radius.
2883         The new specification does not limit the focal point to be inside the radial gradients radius.
2884         This makes SVGRadialGradient consistent with the radial gradient on Canvas.
2885
2886         Test: svg/custom/radialGradient-focal-radius.svg
2887
2888         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
2889             Remove checks for position of focal point. The focal point
2890             can be placed every where outside the radius of the gradient now.
2891         (WebCore::RenderSVGResourceRadialGradient::focalRadius):
2892             Add new method to get the focal radius from SVGRadialGradientElement.
2893         (WebCore::RenderSVGResourceRadialGradient::buildGradient):
2894         * rendering/svg/RenderSVGResourceRadialGradient.h:
2895         (RenderSVGResourceRadialGradient):
2896         * rendering/svg/SVGRenderTreeAsText.cpp:
2897         (WebCore::writeSVGResourceContainer):
2898             Modify DRT output to include the focal radius.
2899         * svg/RadialGradientAttributes.h:
2900         (WebCore::RadialGradientAttributes::RadialGradientAttributes):
2901         (WebCore::RadialGradientAttributes::fr):
2902         (WebCore::RadialGradientAttributes::setFr):
2903         (WebCore::RadialGradientAttributes::hasFr):
2904         (RadialGradientAttributes):
2905             New setters and getters for focal radius.
2906         * svg/SVGRadialGradientElement.cpp:
2907         (WebCore):
2908         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
2909         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
2910         (WebCore::SVGRadialGradientElement::parseAttribute):
2911         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2912         (WebCore::SVGRadialGradientElement::selfHasRelativeLengths):
2913             Ditto.
2914         * svg/SVGRadialGradientElement.h:
2915         (SVGRadialGradientElement):
2916         * svg/SVGRadialGradientElement.idl:
2917         * svg/svgattrs.in:
2918             Add 'fr' as new attribute to the SVG attribute list.
2919
2920 2012-10-07  Glenn Adams  <glenn@skynav.com>
2921
2922         Use start instead of -webkit-auto in default and quirks mode stylesheets.
2923         https://bugs.webkit.org/show_bug.cgi?id=98609
2924
2925         Reviewed by Antti Koivisto.
2926
2927         Change text-align use of legacy '-webkit-auto' to 'start' in the few places where it is used
2928         in default/quirks stylesheets.
2929         
2930         No new tests. No change of rendering/styling behavior. No performance impact.
2931
2932         * css/html.css:
2933         (input, textarea, keygen, select, button, isindex):
2934         (ruby > rt):
2935         * css/quirks.css:
2936         (table):
2937
2938 2012-10-06  Raul Hudea  <rhudea@adobe.com>
2939
2940         -webkit-clip-path should parse IRIs
2941         https://bugs.webkit.org/show_bug.cgi?id=96381
2942
2943         Reviewed by Andreas Kling.
2944
2945         Implemented the clipping via referencing a SVG clipPath. Currently it works only if the clipPath is defined
2946         before using it on an HTML element. The forward reference issue is tracked via https://bugs.webkit.org/show_bug.cgi?id=90405.
2947
2948         Tests: css3/masking/clip-path-reference-userSpaceOnUse.html
2949                css3/masking/clip-path-reference.html
2950                fast/masking/parsing-clip-path-iri.html
2951
2952         * css/CSSComputedStyleDeclaration.cpp:
2953         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add handling for SVG clipPath references.
2954         * css/CSSParser.cpp:
2955         (WebCore::CSSParser::parseValue): Add handling for SVG clipPath references.
2956         * css/StyleBuilder.cpp:
2957         (WebCore::ApplyPropertyClipPath::applyValue): Add handling for SVG references.
2958         * rendering/ClipPathOperation.h:
2959         (ReferenceClipPathOperation): Added a new class corresponding to SVG referenced clipPath.
2960         (WebCore::ReferenceClipPathOperation::create):
2961         (WebCore::ReferenceClipPathOperation::url):
2962         (WebCore::ReferenceClipPathOperation::fragment):
2963         (WebCore::ReferenceClipPathOperation::operator==):
2964         (WebCore::ReferenceClipPathOperation::ReferenceClipPathOperation):
2965         (WebCore):
2966         * rendering/RenderLayer.cpp:
2967         (WebCore::RenderLayer::paintLayerContents): Add handling for ReferenceClipPathOperation.
2968         * rendering/svg/RenderSVGResourceClipper.h:
2969         (RenderSVGResourceClipper): Made applyClippingToContext public as it needs to be called directly for HTML elements.
2970
2971 2012-10-06  Pratik Solanki  <psolanki@apple.com>
2972
2973         Reduce calls to CGImageSourceCopyPropertiesAtIndex from frameSizeAtIndex
2974         https://bugs.webkit.org/show_bug.cgi?id=98607
2975
2976         Reviewed by Dan Bernstein.
2977
2978         Refactor code so that we avoid a second call to CGImageSourceCopyPropertiesAtIndex under
2979         ImageSource::frameSizeAtIndex().
2980
2981         No new tests because no functional change.
2982
2983         * platform/graphics/cg/ImageSourceCG.cpp:
2984         (WebCore::orientationFromProperties):
2985         (WebCore):
2986         (WebCore::ImageSource::frameSizeAtIndex):
2987         (WebCore::ImageSource::orientationAtIndex):
2988
2989 2012-10-06  Mark Rowe  <mrowe@apple.com>
2990
2991         Build fix.
2992
2993         Stop calling -[NSSliderCell setTitle:]. It's never done anything on OS X.
2994
2995         * rendering/RenderThemeMac.mm:
2996         (WebCore::RenderThemeMac::sliderThumbHorizontal):
2997         (WebCore::RenderThemeMac::sliderThumbVertical):
2998
2999 2012-10-06  Andreas Kling  <kling@webkit.org>
3000
3001         Clipboard::types() should return an ordered collection.
3002         <http://webkit.org/b/98547>
3003
3004         Reviewed by Darin Adler.
3005
3006         Let Clipboard::types() return a ListHashSet<String> instead of a HashSet<String> to make sure
3007         it retains the order in which type strings are added.
3008
3009         No test, this fixes an issue that was uncovered when lowering the default table size of WTF
3010         hash tables, causing the HashSet<String> to rehash and reorder itself.
3011
3012         * bindings/js/JSClipboardCustom.cpp:
3013         (WebCore::JSClipboard::types):
3014         * bindings/v8/custom/V8ClipboardCustom.cpp:
3015         (WebCore::V8Clipboard::typesAccessorGetter):
3016         * dom/Clipboard.h:
3017         (Clipboard):
3018         * platform/blackberry/ClipboardBlackBerry.cpp:
3019         (WebCore::ClipboardBlackBerry::types):
3020         * platform/blackberry/ClipboardBlackBerry.h:
3021         (ClipboardBlackBerry):
3022         * platform/chromium/ChromiumDataObject.cpp:
3023         (WebCore::ChromiumDataObject::types):
3024         * platform/chromium/ChromiumDataObject.h:
3025         (ChromiumDataObject):
3026         * platform/chromium/ClipboardChromium.cpp:
3027         (WebCore::ClipboardChromium::types):
3028         * platform/chromium/ClipboardChromium.h:
3029         (ClipboardChromium):
3030         * platform/efl/ClipboardEfl.cpp:
3031         (WebCore::ClipboardEfl::types):
3032         * platform/efl/ClipboardEfl.h:
3033         (ClipboardEfl):
3034         * platform/gtk/ClipboardGtk.cpp:
3035         (WebCore::ClipboardGtk::types):
3036         * platform/gtk/ClipboardGtk.h:
3037         (ClipboardGtk):
3038         * platform/mac/ClipboardMac.h:
3039         (ClipboardMac):
3040         * platform/mac/ClipboardMac.mm:
3041         (WebCore::addHTMLClipboardTypesForCocoaType):
3042         (WebCore::ClipboardMac::types):
3043         * platform/qt/ClipboardQt.cpp:
3044         (WebCore::ClipboardQt::types):
3045         * platform/qt/ClipboardQt.h:
3046         (ClipboardQt):
3047         * platform/win/ClipboardWin.cpp:
3048         (WebCore::addMimeTypesForFormat):
3049         (WebCore::ClipboardWin::types):
3050         * platform/win/ClipboardWin.h:
3051         (ClipboardWin):
3052         * platform/wx/ClipboardWx.cpp:
3053         (WebCore::ClipboardWx::types):
3054         * platform/wx/ClipboardWx.h:
3055         (ClipboardWx):
3056
3057 2012-10-06  Geoffrey Garen  <ggaren@apple.com>
3058
3059         If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
3060         https://bugs.webkit.org/show_bug.cgi?id=88834
3061
3062         Reviewed by Gavin Barraclough.
3063
3064         Follow-up patch to address some comments by Darin Adler.
3065
3066         * bindings/js/JSNodeCustom.h:
3067         (WebCore::willCreatePossiblyOrphanedTreeByRemoval): Save some space by
3068         collapsing comment lines. Use Node::hasChildNodes() for brevity.
3069
3070 2012-10-06  Benjamin Poulain  <benjamin@webkit.org>
3071
3072         Fix weird use of KURL's protocolIs
3073         https://bugs.webkit.org/show_bug.cgi?id=98584
3074
3075         Reviewed by Adam Barth.
3076
3077         Converting a KURL to string is a bad idea.
3078
3079         Invalid URLs can return a string that pass the tests, while an
3080         invalid URL will fail protocolIs().
3081
3082         * loader/cache/CachedResource.cpp:
3083         (WebCore::CachedResource::removeClient):
3084         * platform/graphics/MediaPlayer.cpp:
3085         (WebCore::MediaPlayer::load):
3086         * platform/network/DataURL.cpp:
3087         (WebCore::handleDataURL):
3088
3089 2012-10-06  Dan Bernstein  <mitz@apple.com>
3090
3091         WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
3092         https://bugs.webkit.org/show_bug.cgi?id=98601
3093
3094         Reviewed by Darin Adler.
3095
3096         * WebCore.exp.in: Exported Font::setDefaultTypesettingFeatures().
3097         * platform/graphics/Font.cpp:
3098         (WebCore::Font::s_defaultTypesettingFeatures): Defined this static.
3099         (WebCore::Font::setDefaultTypesettingFeatures): Added this setter.
3100         (WebCore::Font::defaultTypesettingFeatures): Added this getter.
3101         * platform/graphics/Font.h:
3102         (WebCore::Font::typesettingFeatures): Changed to use the value of the new static member
3103         s_defaultTypesettingFeatures, rather than 0, if text-redering is set to auto.
3104
3105 2012-10-04  Geoffrey Garen  <ggaren@apple.com>
3106
3107         If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
3108         https://bugs.webkit.org/show_bug.cgi?id=88834
3109
3110         Reviewed by Gavin Barraclough.
3111
3112         * bindings/js/JSNodeCustom.cpp:
3113         (WebCore::isObservable): Clarified this comment, since it seems to have
3114         misled some folks. 
3115
3116         * bindings/js/JSNodeCustom.h:
3117         (WebCore::willCreatePossiblyOrphanedTreeByRemoval): New helper function
3118         to ensure that a disconnected tree is visible to JavaScript.
3119
3120         * bindings/js/ScriptState.cpp:
3121         (WebCore::mainWorldScriptState): Need to check for null because a document's
3122         frame can be null.
3123
3124         * dom/ContainerNode.cpp:
3125         (WebCore::dispatchChildRemovalEvents): When we remove a subtree from the
3126         document, we sever the reference that JavaScript previously held by
3127         referencing its root. So, we give JavaScript an opportunity to establish
3128         a reference to the new root.
3129
3130 2012-10-06  Byungwoo Lee  <bw80.lee@samsung.com>
3131
3132         Fix build warning : -Wunused-parameter.
3133         https://bugs.webkit.org/show_bug.cgi?id=98583
3134
3135         Reviewed by Kentaro Hara.
3136
3137         Use ASSERT_UNUSED() macro to remove build warning.
3138
3139         * plugins/PluginStream.cpp:
3140         (WebCore::PluginStream::delayDeliveryTimerFired):
3141         (WebCore::PluginStream::didReceiveResponse):
3142         (WebCore::PluginStream::didReceiveData):
3143         (WebCore::PluginStream::didFail):
3144         (WebCore::PluginStream::didFinishLoading):
3145         * plugins/PluginView.cpp:
3146         (WebCore::PluginView::requestTimerFired):
3147         (WebCore::PluginView::invalidateTimerFired):
3148
3149 2012-10-05  Adam Barth  <abarth@webkit.org>
3150
3151         [V8] toV8(Node*, ...) does more work than needed (6% faster on dom-traverse)
3152         https://bugs.webkit.org/show_bug.cgi?id=98567
3153
3154         Reviewed by Kentaro Hara.
3155
3156         This patch introduces toV8Fast for Node*. This function works a
3157         differently from the existing toV8 function in two ways:
3158
3159         1) It uses the inline wrapper cache in Node to determine if we're
3160            executing in the main world. This is faster both in the case when
3161            isolated worlds exist because we don't need to retrieve any state
3162            for the current context.
3163
3164         2) It doesn't attempt to inline the hash table lookup used to find the
3165            wrapper in the isolated world. There isn't a big need to inline this
3166            code since performance in the isolated world case is dominated by
3167            the hash table lookup.
3168
3169         Because of these two changes, toV8Fast is small enough to inline into
3170         each attribute getter profitably. Over time, I would like to convert
3171         all the performance critical uses of toV8(Node*) to toV8Fast. At that
3172         point, we can delete toV8 and rename toV8Slow to toV8.
3173
3174         * bindings/scripts/CodeGeneratorV8.pm:
3175         (GenerateHeader):
3176         (GenerateNormalAttrGetter):
3177
3178 2012-10-05  Huang Dongsung  <luxtella@company100.net>
3179
3180         [mac] REGRESSION (r122215): Animated GIF outside the viewport doesn't play when scrolled into view.
3181         https://bugs.webkit.org/show_bug.cgi?id=94874
3182
3183         Reviewed by Simon Fraser.
3184
3185         Rollback previous patch because this patch caused two problems.
3186         1. GIF animation is occasionally paused when tiled scrolling is enabled.
3187         2. This change regressed Apple's Membuster benchmark by ~20% (80MB.)
3188
3189         * loader/cache/CachedImage.cpp:
3190         (WebCore::CachedImage::shouldPauseAnimation):
3191         * loader/cache/CachedImage.h:
3192         (CachedImage):
3193         * loader/cache/CachedResource.h:
3194         * loader/cache/MemoryCache.cpp:
3195         (WebCore::MemoryCache::pruneLiveResourcesToSize):
3196         * rendering/RenderObject.cpp:
3197         (WebCore::RenderObject::willRenderImage):
3198
3199 2012-10-05  Xianzhu Wang  <wangxianzhu@chromium.org>
3200
3201         OpenTypeVerticalData issue with DroidSansFallback.ttf on chromium-android and chromium-linux
3202         https://bugs.webkit.org/show_bug.cgi?id=97824
3203
3204         Reviewed by Tony Chang.
3205
3206         The issue occurred when a font that contains vert GSUB table but doesn't have
3207         a DFLT script and the first script doesn't have vert feature. Added logic to
3208         handle the case.
3209
3210         Test: fast/writing-mode/vertical-subst-font-vert-no-dflt.html
3211
3212         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
3213         (FeatureList):
3214         (WebCore::OpenType::FeatureList::findFeature): Added to find the matching feature in FeatureList.
3215         (WebCore::OpenType::GSUBTable::feature): Added logic to handle the case of no DFLT script and no vert feature under the first script.
3216
3217 2012-10-05  Tony Chang  <tony@chromium.org>
3218
3219         Form controls should always be horizontal
3220         https://bugs.webkit.org/show_bug.cgi?id=98563
3221
3222         Reviewed by Ojan Vafai.
3223
3224         Fix a regression where we didn't force form controls to be horizontal.
3225
3226         Tests: fast/dom/HTMLMeterElement/meter-writing-mode.html
3227                fast/dom/HTMLProgressElement/progress-writing-mode.html
3228                fast/table/colspanMinWidth-vertical.html
3229
3230         * css/html.css:
3231         (input, textarea, keygen, select, button, isindex, meter, progress):
3232
3233 2012-10-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3234
3235         Unreviewed, rolling out r130556 and r130564.
3236         http://trac.webkit.org/changeset/130556
3237         http://trac.webkit.org/changeset/130564
3238         https://bugs.webkit.org/show_bug.cgi?id=98572
3239
3240         The patch wasn't reviewed by a reviewer and it is breaking
3241         Chromium Windows (Requested by jchaffraix on #webkit).
3242
3243         * WebCore.exp.in:
3244         * WebCore.xcodeproj/project.pbxproj:
3245         * css/mediaControls.css:
3246         (video::-webkit-media-text-track-container):
3247         (video::-webkit-media-text-track-past-nodes):
3248         (video::-webkit-media-text-track-future-nodes):
3249         (video::-webkit-media-text-track-display):
3250         * html/HTMLMediaElement.cpp:
3251         (WebCore::HTMLMediaElement::HTMLMediaElement):
3252         (WebCore::HTMLMediaElement::attach):
3253         (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage):
3254         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind):
3255         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
3256         (WebCore::HTMLMediaElement::updateClosedCaptionsControls):
3257         * html/HTMLMediaElement.h:
3258         (HTMLMediaElement):
3259         * html/shadow/MediaControlElements.cpp:
3260         (WebCore):
3261         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
3262         * html/shadow/MediaControlElements.h:
3263         (MediaControlTextTrackContainerElement):
3264         * html/shadow/MediaControlRootElement.cpp:
3265         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
3266         * html/shadow/MediaControlRootElement.h:
3267         (MediaControlRootElement):
3268         * html/shadow/MediaControls.h:
3269         (MediaControls):
3270         * html/track/TextTrack.cpp:
3271         (WebCore::TextTrack::TextTrack):
3272         (WebCore::TextTrack::isValidKindKeyword):
3273         (WebCore::TextTrack::setKind):
3274         (WebCore::TextTrack::setMode):
3275         (WebCore::TextTrack::mode):
3276         * html/track/TextTrack.h:
3277         (WebCore::TextTrack::create):
3278         (WebCore::TextTrack::kind):
3279         (TextTrack):
3280         (WebCore::TextTrack::label):
3281         (WebCore::TextTrack::setLabel):
3282         (WebCore::TextTrack::language):
3283         (WebCore::TextTrack::setLanguage):
3284         * html/track/TextTrackCue.cpp:
3285         (WebCore::TextTrackCueBox::TextTrackCueBox):
3286         (WebCore::TextTrackCueBox::shadowPseudoId):
3287         (WebCore):
3288         (WebCore::TextTrackCue::updateDisplayTree):
3289         * html/track/TextTrackCue.h:
3290         (TextTrackCueBox):
3291         (TextTrackCue):
3292         * platform/mac/WebCoreSystemInterface.h:
3293         * platform/mac/WebCoreSystemInterface.mm:
3294         * rendering/CaptionPreferencesChangedListener.h: Removed.
3295         * rendering/RenderTheme.h:
3296         (WebCore):
3297         (RenderTheme):
3298         * rendering/RenderThemeMac.h:
3299         (RenderThemeMac):
3300         * rendering/RenderThemeMac.mm:
3301         (WebCore):
3302         (WebCore::RenderThemeMac::RenderThemeMac):
3303         (WebCore::RenderThemeMac::~RenderThemeMac):
3304
3305 2012-10-05  Tim Horton  <timothy_horton@apple.com>
3306
3307         [cg] GraphicsContextCG should ask CG whether the shadow offset workaround is required
3308         https://bugs.webkit.org/show_bug.cgi?id=98565
3309         <rdar://problem/12436468>
3310
3311         Reviewed by Simon Fraser.
3312
3313         On Mountain Lion and above, CG can tell us whether we need to work around incorrect
3314         shadow offsets. Prior to Mountain Lion, we should assume we need to apply the workaround.
3315
3316         No new tests, as this requires an obscure configuration to test.
3317
3318         * WebCore.exp.in:
3319         * platform/graphics/cg/GraphicsContextCG.cpp:
3320         (WebCore::applyShadowOffsetWorkaroundIfNeeded):
3321         (WebCore::GraphicsContext::setPlatformShadow):
3322         * platform/mac/WebCoreSystemInterface.h: Add wkCGContextDrawsWithCorrectShadowOffsets.
3323         * platform/mac/WebCoreSystemInterface.mm: Add wkCGContextDrawsWithCorrectShadowOffsets.
3324
3325 2012-10-05  Anders Carlsson  <andersca@apple.com>
3326
3327         Try to fix the build.
3328
3329         * rendering/RenderThemeMac.mm:
3330         (WebCore::RenderThemeMac::captionsWindowColor):
3331
3332 2012-10-05  Eric Seidel  <eric@webkit.org>
3333
3334         Remove needless virtual calls and inline RenderStyle::logical* to make table layout faster
3335         https://bugs.webkit.org/show_bug.cgi?id=98550
3336
3337         Reviewed by Andreas Kling.
3338
3339         This shaved another 5% (100ms) off of the runtime of resizecol.html microbenchmark:
3340         http://www.robohornet.org/tests/resizecol.html
3341
3342         * rendering/AutoTableLayout.cpp:
3343         (WebCore::AutoTableLayout::recalcColumn):
3344         * rendering/style/RenderStyle.cpp:
3345         * rendering/style/RenderStyle.h:
3346
3347 2012-10-04  Eric Carlson  <eric.carlson@apple.com>
3348
3349         Allow ports to override text track rendering style
3350         https://bugs.webkit.org/show_bug.cgi?id=97800
3351         <rdar://problem/12044964>
3352
3353         Reviewed by Silvia Pfeiffer.
3354
3355         * WebCore.exp.in: Export new WebkitSystemInterface functions.
3356         * WebCore.xcodeproj/project.pbxproj: Add CaptionPreferencesChangedListener.h.
3357
3358         * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
3359             background, and text independently.
3360
3361         * html/HTMLMediaElement.cpp:
3362         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
3363         (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
3364         (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
3365         (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
3366         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
3367         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
3368             un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
3369         (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
3370         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from 
3371             setClosedCaptionsVisible
3372         * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
3373
3374         * html/shadow/MediaControlElements.cpp:
3375         (WebCore::MediaControlTextTrackContainerElement::userCaptionPreferencesChanged): New, if theme
3376             has a captions style sheet override, inject it into the current page group, otherwise
3377             remove injected sheet.
3378         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
3379             variable. Get caption font scale from theme instead of hard coding.
3380         * html/shadow/MediaControlElements.h:
3381
3382         * html/shadow/MediaControlRootElement.cpp:
3383         (WebCore::MediaControlRootElement::userCaptionPreferencesChanged): New.
3384         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
3385         * html/shadow/MediaControlRootElement.h: Add userCaptionPreferencesChanged, minor cleanup.
3386
3387         * html/shadow/MediaControls.h:
3388         (WebCore::MediaControls::userCaptionPreferencesChanged): New.
3389
3390         * html/track/TextTrackCue.cpp:
3391         (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
3392         (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the 
3393             shadow pseudo id so it can be used elsewhere.
3394         (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
3395         (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the 
3396             shadow pseudo id so it can be used elsewhere.
3397         (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
3398         (WebCore::TextTrackCue::updateDisplayTree):
3399         * html/track/TextTrackCue.h:
3400
3401         * platform/mac/WebCoreSystemInterface.h: Updated.
3402         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3403
3404         * rendering/CaptionPreferencesChangedListener.h: Added.
3405
3406         * rendering/RenderTheme.h:
3407         (WebCore::RenderTheme::userPrefersCaptions): New, default do-nothing implementation.
3408         (WebCore::RenderTheme::userHasCaptionPreferences): Ditto.
3409         (WebCore::RenderTheme::captionFontSizeScale): Ditto.
3410         (WebCore::RenderTheme::captionsStyleSheetOverride): Ditto.
3411         (WebCore::RenderTheme::registerForCaptionPreferencesChangedCallbacks): Ditto.
3412         (WebCore::RenderTheme::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
3413
3414         * rendering/RenderThemeMac.h:
3415         * rendering/RenderThemeMac.mm:
3416         (WebCore::userCaptionPreferencesChangedNotificationCallback): New, receives preference changed notifications.
3417         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_listeningForCaptionPreferenceNotifications.
3418         (WebCore::RenderThemeMac::~RenderThemeMac): Unregister for notifications if necessary.
3419         (WebCore::RenderThemeMac::userHasCaptionPreferences): New, passthrough to WKSI function.
3420         (WebCore::RenderThemeMac::userPrefersCaptions): Ditto.
3421         (WebCore::RenderThemeMac::captionsWindowColor): Return Color with user's caption window color preference.
3422         (WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption 
3423             background color preference.
3424         (WebCore::RenderThemeMac::captionsTextColor): Return Color with user's caption text color preference.
3425         (WebCore::RenderThemeMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
3426         (WebCore::RenderThemeMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
3427             or webkit-text-stroke property.
3428         (WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property 
3429             with a color value.
3430         (WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption 
3431             text with the user's preferred text edge stye.
3432         (WebCore::RenderThemeMac::captionsDefaultFont): Return a String with css to style caption
3433             text with the user's preferred font.
3434         (WebCore::RenderThemeMac::captionsStyleSheetOverride): Return a String with css to style captions
3435             with the user's preferred style.
3436         (WebCore::RenderThemeMac::captionFontSizeScale): Return the user's preferred caption font scale.
3437         (WebCore::RenderThemeMac::captionPreferencesChanged): Notify listeners of caption preference change.
3438         (WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences 
3439             changes listener.
3440         (WebCore::RenderThemeMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
3441             changes listener.
3442
3443 2012-10-05  Takashi Sakamoto  <tasak@google.com>
3444
3445         Inline continuations create :after generated content on style recalcs
3446         https://bugs.webkit.org/show_bug.cgi?id=93170
3447
3448         Reviewed by Abhishek Arya.
3449
3450         The bug is caused by RenderInline::styleDidChange's setContinuation(0).
3451         RenderObjectChildList uses continuation to know whether the given
3452         renderer should have AFTER render object or not.
3453         However, setContinuation(0) makes RenderObjectChildList to
3454         misunderstand that all continuations are last continuation.
3455         To avoid the misunderstanding, added a new flag to class
3456         RenderObejctChildList to enable/disable updating :after content (and
3457         also :before content).
3458
3459         Tests: fast/css-generated-content/after-with-inline-continuation.html
3460                fast/css-generated-content/dynamic-apply-after-for-inline.html
3461
3462         * rendering/RenderInline.cpp:
3463         (WebCore::RenderInline::styleDidChange):
3464         Disable upating :after content for continuations which are not
3465         the last one during setStyle just after setContinuation(0).
3466         The setStyle invokes RenderInline::styleDidChange and also invokes
3467         updateBeforeAfterContent via the styleDidChange. This means,
3468         the last continuation's updateBeforeAfterContent is also invoked
3469         after setContinuation(0). We have to update :after for the last
3470         continuation.
3471         * rendering/RenderObjectChildList.cpp:
3472         (WebCore):
3473         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
3474         If s_updateBeforeAfterContent is false, quickly exit
3475         updateBeforeAfterContent.
3476         * rendering/RenderObjectChildList.h:
3477         (RenderObjectChildList):
3478         Added a new flag s_enableUpdateBeforeAfterContent to enable/disable
3479         updating :before or :after content.
3480
3481 2012-10-05  Simon Fraser  <simon.fraser@apple.com>
3482
3483         Don't assume that TileCache layers are opaque
3484         https://bugs.webkit.org/show_bug.cgi?id=98555
3485
3486         Reviewed by Dean Jackson.
3487
3488         TileCache previously set all its tile CALayers as opaque.
3489         However, we will need non-opaque tile caches when we use this
3490         tile cache for tiled layers, so add a member function to
3491         control tile opacity.
3492         
3493         RenderLayerBacking already calls m_graphicsLayer->setContentsOpaque()
3494         using the FrameView's notion of opaqueness, so this change will
3495         cause the main tile cache to be non-opaque if external forces have
3496         set the FrameView to be non-opaque.
3497         
3498         Also tweak the layer border widths on tiled layers.
3499
3500         * platform/graphics/ca/mac/TileCache.h:
3501         (TileCache):
3502         (WebCore::TileCache::tilesAreOpaque):
3503         * platform/graphics/ca/mac/TileCache.mm:
3504         (WebCore::TileCache::TileCache):
3505         (WebCore::TileCache::setTilesOpaque):
3506         (WebCore::TileCache::createTileLayer):
3507         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3508         (-[WebTileCacheLayer setOpaque:]):
3509         (-[WebTileCacheLayer isOpaque]):
3510         (-[WebTileCacheLayer setBorderWidth:]):
3511
3512 2012-10-05  Tony Chang  <tony@chromium.org>
3513
3514         Fix margin box ascent computation in flexbox
3515         https://bugs.webkit.org/show_bug.cgi?id=98540
3516
3517         Reviewed by Ojan Vafai.
3518
3519         The margin box ascent doesn't depend on the margin below the box.
3520
3521         Tests: css3/flexbox/flex-align.html: Fixed a test case and removed a FIXME.
3522                css3/flexbox/flex-align-vertical-writing-mode.html: Similar test case.
3523
3524         * rendering/RenderFlexibleBox.cpp:
3525         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
3526
3527 2012-10-05  Ojan Vafai  <ojan@chromium.org>
3528
3529         Deprecated flexboxes subtract scrollbar width/height twice
3530         https://bugs.webkit.org/show_bug.cgi?id=98552
3531
3532         Reviewed by Tony Chang.
3533
3534         This is a regression from http://trac.webkit.org/changeset/119507.
3535         The problem is that contentHeight subtracts the scrollbar and
3536         RenderDeprecatedFlexbox subtracts the scrollbar.
3537
3538         -Make it so that we only access override sizes if one has been set.
3539         I think this makes the calling code more clear.
3540         -If we don't have one set, grab the height/width - borderAndPadding.
3541         -Add a FIXME to change this all back to being borderbox sizes.
3542         There's something trick with making table padding/border work right for that
3543         though (noted in the original patch).
3544
3545         Test: fast/flexbox/flexing-overflow-scroll-item.html
3546
3547         * rendering/RenderBox.cpp:
3548         (WebCore::RenderBox::overrideLogicalContentWidth):
3549         (WebCore::RenderBox::overrideLogicalContentHeight):
3550         (WebCore::RenderBox::availableLogicalHeightUsing):
3551         * rendering/RenderBox.h:
3552         (RenderBox):
3553         * rendering/RenderDeprecatedFlexibleBox.cpp:
3554         (WebCore::contentWidthForChild):
3555         (WebCore):
3556         (WebCore::contentHeightForChild):
3557         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3558         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3559         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
3560
3561 2012-10-05  Eric Seidel  <eric@webkit.org>
3562
3563         Make tables which don't use col/row span much faster to layout
3564         https://bugs.webkit.org/show_bug.cgi?id=98221
3565
3566         Reviewed by Julien Chaffraix.
3567
3568         My sense is that most tables on webpages do not use colspan/rowspan
3569         so I stole another bit from RenderTableCell::m_column to avoid
3570         having to re-parse the colSpan/rowSpan attributes for every cell
3571         when doing table layout.
3572         This made these symbols disappear from biggrid.html/redraw.html (dglazkov's spreadsheets benchmarks)
3573         as well as moved our robohornet/resizecol.html number from an average of 3221ms to 2608ms (~20%!).
3574
3575         I removed m_hasHTMLTableCellElement (from http://trac.webkit.org/changeset/97691)
3576         since it was attempting to do the same sort of optimization.
3577
3578         * rendering/RenderTableCell.cpp:
3579         (WebCore::RenderTableCell::RenderTableCell):
3580         (WebCore::RenderTableCell::parseColSpanFromDOM):
3581         (WebCore::RenderTableCell::parseRowSpanFromDOM):
3582         (WebCore::RenderTableCell::layout):
3583         * rendering/RenderTableCell.h:
3584         (WebCore::RenderTableCell::colSpan):
3585         (WebCore::RenderTableCell::rowSpan):
3586         (RenderTableCell):
3587
3588 2012-10-05  Oli Lan  <olilan@chromium.org>
3589
3590         Allow EventHandler to handle longpress gestures, including longpress selection on Android.
3591         https://bugs.webkit.org/show_bug.cgi?id=98173
3592         
3593         Reviewed by Ryosuke Niwa.
3594
3595         Adds handling for GestureLongPress to EventHandler::handleGestureEvent, with a new
3596         handleGestureLongPress method. On Android, this method selects the closest word
3597         if the gesture event was over non-link text.
3598
3599         This is tested via a new chromium test WebViewTest.LongPressSelection.  
3600
3601         * page/EventHandler.cpp:
3602         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
3603         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
3604         (WebCore):
3605         (WebCore::EventHandler::handleGestureEvent):
3606         (WebCore::EventHandler::handleGestureLongPress):
3607         * page/EventHandler.h:
3608         (EventHandler):
3609
3610 2012-10-05  Tab Atkins  <jackalmage@gmail.com>
3611
3612         <marquee> element forces itself to be at least 1em high, regardless of 'height' declaration
3613         https://bugs.webkit.org/show_bug.cgi?id=18098
3614
3615         Reviewed by Eric Seidel.
3616
3617         This restriction originally existed to match IE, but IE changed some time ago to be normal instead.
3618         We're the last browser, afaict, to still enforce this de-facto restriction.
3619         This patch makes <marquee> instead act like a normal element.
3620
3621         Tests: fast/css/MarqueeLayoutTest.html (rewritten from the older, bad version)
3622
3623         * rendering/RenderMarquee.cpp:
3624         (WebCore::RenderMarquee::updateMarqueeStyle):
3625
3626 2012-10-05  Joe Mason  <jmason@rim.com>
3627
3628         [BlackBerry] Fix regression in proxy auth
3629         https://bugs.webkit.org/show_bug.cgi?id=98533
3630
3631         Reviewed by Yong Li.
3632
3633         The proxy auth dialog gets the proxy address from
3634         BlackBerry::Platform::Settings::proxyAddress, which returns
3635         "host:port", but we try to parse it with a KURL, which expects
3636         "scheme://host:port".  Since this is an http proxy, add http:// to the
3637         url to get it to parse.
3638
3639         PR 220567.
3640
3641         * platform/network/blackberry/NetworkJob.cpp:
3642         (WebCore::NetworkJob::sendRequestWithCredentials):
3643
3644 2012-10-05  Jer Noble  <jer.noble@apple.com>
3645
3646         No autorelease pool in place, causing buildup of autoreleased objects.
3647         https://bugs.webkit.org/show_bug.cgi?id=98522
3648         <rdar://problem/11647950>
3649
3650         Reviewed by Alexey Proskuryakov.
3651
3652         Wrap each timer callback in an AutodrainPool, ensuring an autorelease
3653         pool is present during calls from C/C++ into ObjC.
3654
3655         * platform/cf/RunLoopTimerCF.cpp:
3656         (WebCore::timerFired):
3657
3658 2012-10-05  Ryosuke Niwa  <rniwa@webkit.org>
3659
3660         Deleting across multiple paragraphs can change the style of surrounding text
3661         https://bugs.webkit.org/show_bug.cgi?id=97266
3662
3663         Reviewed by Levi Weintraub.
3664
3665         Preserve editing styles from CSS rules in wrappingStyleForSerialization as well as inline styles
3666         even when we're not annotating. We don't want to preserve all styles because it's against
3667         the user expectation to keep borders, etc... when merging paragraphs. We also don't want to copy
3668         styles from a mail blockquote because that's not a style the user has applied. See the comment
3669         in EditingStyle::wrappingStyleForSerialization.
3670
3671         Test: editing/deleting/merge-paragraph-with-style-from-rule.html
3672
3673         * editing/EditingStyle.cpp:
3674         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
3675         (WebCore::EditingStyle::wrappingStyleForSerialization):
3676
3677 2012-10-05  Dan Bernstein  <mitz@apple.com>
3678
3679         Reversing a GlyphBuffer needlessly queries its size multiple times
3680         https://bugs.webkit.org/show_bug.cgi?id=98530
3681
3682         Reviewed by Simon Fraser.
3683
3684         No new tests because there is no change in behavior.
3685
3686         * WebCore.xcodeproj/project.pbxproj:
3687         * platform/graphics/FontFastPath.cpp:
3688         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced the condition
3689         (i < glyphBuffer.size() / 2) with the equivalent test (i < end).
3690         * platform/graphics/mac/FontComplexTextMac.cpp:
3691         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Ditto.
3692
3693 2012-10-05  José Dapena Paz  <jdapena@igalia.com>
3694
3695         [GTK] Add support for creating EGL contexts
3696         https://bugs.webkit.org/show_bug.cgi?id=77921
3697
3698         Reviewed by Martin Robinson.
3699
3700         This patch adds support for EGL, using OpenGL and OpenGL ES 2. Both
3701         options are set up on compile time, with the configure options
3702         --enable-egl and --enable-gles2.
3703
3704         The implementation only adds support for EGL on top of X11, to
3705         isolate the changes to the minimum. More changes should come
3706         later to enable EGL for other targets (as Wayland).
3707
3708         No new tests required, as existing WebGL and AC tests should cover
3709         the cases.
3710
3711         * GNUmakefile.am:
3712         * GNUmakefile.list.am:
3713         * platform/graphics/GraphicsContext3D.h:
3714         (GraphicsContext3D):
3715         * platform/graphics/OpenGLESShims.h:
3716         * platform/graphics/cairo/GLContext.cpp:
3717         (WebCore):
3718         (WebCore::GLContext::sharedX11Display):
3719         (WebCore::GLContext::cleanupSharedX11Display):
3720         (WebCore::activeContextList):
3721         (WebCore::GLContext::addActiveContext):
3722         (WebCore::GLContext::removeActiveContext):
3723         (WebCore::GLContext::cleanupActiveContextsAtExit):
3724         (WebCore::GLContext::createContextForWindow):
3725         (WebCore::GLContext::createOffscreenContext):
3726         * platform/graphics/cairo/GLContext.h:
3727         (GLContext):
3728         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3729         (WebCore::GraphicsContext3D::create):
3730         (WebCore::GraphicsContext3D::GraphicsContext3D):
3731         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3732         (WebCore::GraphicsContext3D::isGLES2Compliant):
3733         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
3734         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3735         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
3736         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3737         * platform/graphics/egl/GLContextEGL.cpp: Added.
3738         (WebCore):
3739         (WebCore::sharedEGLDisplay):
3740         (WebCore::getEGLConfig):
3741         (WebCore::GLContextEGL::createWindowContext):
3742         (WebCore::GLContextEGL::createPbufferContext):
3743         (WebCore::GLContextEGL::createPixmapContext):
3744         (WebCore::GLContextEGL::createContext):
3745         (WebCore::GLContextEGL::GLContextEGL):
3746         (WebCore::GLContextEGL::~GLContextEGL):
3747         (WebCore::GLContextEGL::canRenderToDefaultFramebuffer):
3748         (WebCore::GLContextEGL::defaultFrameBufferSize):
3749         (WebCore::GLContextEGL::makeContextCurrent):
3750         (WebCore::GLContextEGL::swapBuffers):
3751         (WebCore::GLContextEGL::waitNative):
3752         (WebCore::GLContextEGL::platformContext):
3753         * platform/graphics/egl/GLContextEGL.h: Added.
3754         (WebCore):
3755         (GLContextEGL):
3756         * platform/graphics/glx/GLContextGLX.cpp:
3757         (WebCore::GLContextGLX::createWindowContext):
3758         (WebCore::GLContextGLX::createPbufferContext):
3759         (WebCore::GLContextGLX::createPixmapContext):
3760         (WebCore::GLContextGLX::createContext):
3761         (WebCore::GLContextGLX::~GLContextGLX):
3762         (WebCore::GLContextGLX::defaultFrameBufferSize):
3763         (WebCore::GLContextGLX::makeContextCurrent):
3764         (WebCore::GLContextGLX::swapBuffers):
3765         (WebCore):
3766         (WebCore::GLContextGLX::waitNative):
3767         * platform/graphics/glx/GLContextGLX.h:
3768         (GLContextGLX):
3769         * platform/graphics/mac/GraphicsContext3DMac.mm:
3770         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3771         (WebCore::GraphicsContext3D::releaseShaderCompiler):
3772         (WebCore):
3773         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
3774         (WebCore::GraphicsContext3D::readPixels):
3775         (WebCore::GraphicsContext3D::reshapeFBOs):
3776         (WebCore::GraphicsContext3D::renderbufferStorage):
3777         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3778         * platform/graphics/texmap/TextureMapper.h:
3779         * platform/gtk/RedirectedXCompositeWindow.cpp:
3780         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
3781         (WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
3782         (WebCore::RedirectedXCompositeWindow::resize):
3783         * platform/gtk/RedirectedXCompositeWindow.h:
3784
3785 2012-10-04  Jon Lee  <jonlee@apple.com>
3786
3787         Add a setting to enable plugin snapshotting
3788         https://bugs.webkit.org/show_bug.cgi?id=98319
3789         <rdar://problem/12426480>
3790
3791         Reviewed by Brady Eidson.
3792
3793         Add a new bit for this preference.
3794
3795         * page/Settings.cpp:
3796         (WebCore::Settings::Settings): Preference is false by default.
3797         * page/Settings.h: Added m_plugInSnapshottingEnabled bit.
3798         (WebCore::Settings::setPlugInSnapshottingEnabled): Set the bit.
3799         (WebCore::Settings::plugInSnapshottingEnabled): Return the bit.
3800
3801 2012-10-05  Vsevolod Vlasov  <vsevik@chromium.org>
3802
3803         Unreviewed inspector front-end closure compilaiton fixes.
3804
3805         * inspector/InjectedScriptCanvasModuleSource.js:
3806         * inspector/InjectedScriptExterns.js:
3807         (InjectedScriptHost.prototype.getInternalProperties):
3808         * inspector/front-end/DockController.js:
3809         * inspector/front-end/externs.js:
3810         (InspectorFrontendHostAPI.prototype.requestSetDockSide):
3811
3812 2012-10-05  Tab Atkins  <jackalmage@gmail.com>
3813
3814         Replace uses of prefixed properties with unprefixed versions in the UA stylesheets
3815         https://bugs.webkit.org/show_bug.cgi?id=98453
3816
3817         Reviewed by Ojan Vafai.
3818
3819         Switched 'border-radius' and 'box-shadow' to their unprefixed version in the UA stylesheets.
3820
3821         No new tests, because the unprefixed properties have the same behavior as the prefixed.
3822
3823         * css/fullscreenQuickTime.css:
3824         (video:-webkit-full-screen::-webkit-media-controls-panel):
3825         * css/html.css:
3826         (keygen, select):
3827         (select[size][multiple]):
3828         (select[size="1"]):
3829         (::-webkit-validation-bubble-message):
3830         * css/themeBlackBerry.css:
3831         (input, textarea):
3832         * css/themeChromiumAndroid.css:
3833         (select[size][multiple]):
3834         * css/themeQtNoListboxes.css:
3835         (select[size][multiple]):
3836         * css/themeWin.css:
3837         (select[size="1"]):
3838         * css/view-source.css:
3839         (.webkit-html-message-bubble):
3840
3841 2012-10-05  Kevin Ellis  <kevers@chromium.org>
3842
3843         [chromium] Only inflate the height of rows in a popup menu when a touch device is detected.
3844         https://bugs.webkit.org/show_bug.cgi?id=98515
3845
3846         Reviewed by Adam Barth.
3847
3848         Enforces a minimum row height for popup menus when a touch device is
3849         detected.  In a previous patch (r127597), the sizing of popup was 
3850         consolidated for touch and non-touch.  Based on user feedback, reverting
3851         to the old behavior for non-touch and only adding padding for touch
3852         devices seems like a much safer strategy.  This patch is not a direct
3853         revert of r127567 since the padding previously used for touch is a bit
3854         excessive.
3855
3856         Covered by existing tests.
3857
3858         * platform/chromium/PopupListBox.cpp:
3859         (WebCore::PopupListBox::getRowHeight):
3860         * platform/chromium/PopupMenuChromium.cpp:
3861         (WebCore):
3862         * platform/chromium/PopupMenuChromium.h:
3863         (WebCore::PopupMenuChromium::optionRowHeightForTouch):
3864         (WebCore::PopupMenuChromium::setOptionRowHeightForTouch):
3865         (PopupMenuChromium):
3866
3867 2012-10-05  Alexander Pavlov  <apavlov@chromium.org>
3868
3869         Web Inspector: [Styles] Unable to edit properties in broken stylesheets
3870         https://bugs.webkit.org/show_bug.cgi?id=98246
3871
3872         Reviewed by Vsevolod Vlasov.
3873
3874         Pop source data for invalid rules off the stack whenever we have consecutive CSSParser::markRuleHeaderStart() invocations.
3875
3876         Test: inspector/styles/parse-stylesheet-errors.html
3877
3878         * css/CSSParser.cpp:
3879         (WebCore::CSSParser::popRuleData):
3880         (WebCore::CSSParser::markRuleHeaderStart):
3881         (WebCore::CSSParser::markRuleBodyStart):
3882         * css/CSSParser.h:
3883         (CSSParser):
3884
3885 2012-10-05  Gabor Rapcsanyi  <rgabor@webkit.org>
3886
3887         Add ARM-NEON support to VectorMath in WebAudio
3888         https://bugs.webkit.org/show_bug.cgi?id=98131
3889
3890         Reviewed by Zoltan Herczeg.
3891
3892         Speed up vector operations in WebAudio with NEON intrinsics.
3893
3894         * platform/audio/VectorMath.cpp:
3895         (WebCore::VectorMath::vsma):
3896         (WebCore::VectorMath::vsmul):
3897         (WebCore::VectorMath::vadd):
3898         (WebCore::VectorMath::vmul):
3899         (WebCore::VectorMath::zvmul):
3900         (WebCore::VectorMath::vsvesq):
3901         (WebCore::VectorMath::vmaxmgv):
3902
3903 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
3904
3905         Unreviewed, rolling out r130495.
3906         http://trac.webkit.org/changeset/130495
3907         https://bugs.webkit.org/show_bug.cgi?id=98268
3908
3909         Made WK2 tests crash.
3910
3911         * Target.pri:
3912         * platform/qt/QStyleFacade.cpp: Removed.
3913         * platform/qt/QStyleFacade.h: Removed.
3914
3915 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
3916
3917         [Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
3918         https://bugs.webkit.org/show_bug.cgi?id=98268
3919
3920         Reviewed by Tor Arne Vestbø.
3921
3922         Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
3923
3924         QStyleFacade is a pure interface that lives in WebCore/platform/qt
3925         (next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
3926         minimal interface of what we need to draw with QStyle as well as basic
3927         hit testing and metric retrieval. It also provides a
3928         QStyleFacadeOption class that aggregates common meta-data for
3929         rendering primitives, such as direction, rectangle, state (sunken,
3930         enabled, etc.) or palette. It also provides some more slider/scrollbar
3931         specific fields in a slider sub-structure.
3932
3933         RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
3934         them with state information from render objects, before calling straight to QStyle. Most of the common code
3935         was encapsulated in StylePainterQStyle.
3936
3937         The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
3938         StylePainterQStyle to populate state into QStyleFacadeOption before
3939         calling into QStyleFacade.
3940
3941         The style facade is then implemented by QStyleFacadeImp, which extracts
3942         meta-data from QStyleFacadeOption arguments, populates style
3943         primitive specific QStyleOption objects and then calls on QStyle.
3944
3945         RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
3946         from QStyleFacade. QStyleFacadeImp on the other hand will live in the
3947         separate QtWebKitWidgets library in the future and therefore cannot use
3948         any WebCore types.
3949
3950         * Target.pri:
3951         * platform/qt/QStyleFacade.cpp: Added.
3952         (WebCore):
3953         (WebCore::QStyleFacade::styleForPage):
3954         * platform/qt/QStyleFacade.h: Added.
3955         (WebCore):
3956         (QStyleFacade):
3957         (WebCore::QStyleFacade::~QStyleFacade):
3958         (WebCore::QStyleFacadeOption::QStyleFacadeOption):
3959         (QStyleFacadeOption):
3960         * platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
3961         (WebCore):
3962         (WebCore::RenderThemeQStyle::getStylePainter):
3963         (WebCore::StylePainterQStyle::StylePainterQStyle):
3964         (WebCore::StylePainterQStyle::init):
3965         (WebCore::RenderThemeQStyle::create):
3966         (WebCore::RenderThemeQStyle::setStyleFactoryFunction):
3967         (WebCore::RenderThemeQStyle::styleFactory):
3968         (WebCore::RenderThemeQStyle::RenderThemeQStyle):
3969         (WebCore::RenderThemeQStyle::~RenderThemeQStyle):
3970         (WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
3971         (WebCore::RenderThemeQStyle::inflateButtonRect):
3972         (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
3973         (WebCore::RenderThemeQStyle::adjustButtonStyle):
3974         (WebCore::RenderThemeQStyle::setButtonPadding):
3975         (WebCore::RenderThemeQStyle::paintButton):
3976         (WebCore::RenderThemeQStyle::paintTextField):
3977         (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
3978         (WebCore::RenderThemeQStyle::paintTextArea):
3979         (WebCore::RenderThemeQStyle::setPopupPadding):
3980         (WebCore::RenderThemeQStyle::colorPalette):
3981         (WebCore::RenderThemeQStyle::paintMenuList):
3982         (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
3983         (WebCore::RenderThemeQStyle::paintMenuListButton):
3984         (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
3985         (WebCore::RenderThemeQStyle::paintProgressBar):
3986         (WebCore::RenderThemeQStyle::paintSliderTrack):
3987         (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
3988         (WebCore::RenderThemeQStyle::paintSliderThumb):
3989         (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):</