2011-06-26 Adam Barth <abarth@webkit.org>
[WebKit.git] / Source / WebCore / ChangeLog
1 2011-06-26  Dirk Schulze  <krit@webkit.org>
2
3         Reviewed by Nikolas Zimmermann.
4
5         SVGAnimatedType should support SVGNumberOptionalNumber animation
6         https://bugs.webkit.org/show_bug.cgi?id=63397
7         
8         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
9         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedNumberOptionalNumber.
10         
11         Animations of attributes with type SVGAnimatedNumberOptionalNumber can be interpolated now. This can be used for smooth
12         growing shadows with feGaussianBlur, feDropShadow or other filter effects.
13
14         Tests: svg/animations/svgnumberoptionalnumber-animation-1.html
15                svg/animations/svgnumberoptionalnumber-animation-2.html
16                svg/animations/svgnumberoptionalnumber-animation-3.html
17                svg/animations/svgnumberoptionalnumber-animation-4.html
18
19         * CMakeLists.txt: Added new files to build system.
20         * GNUmakefile.list.am: Ditto.
21         * WebCore.gypi: Ditto.
22         * WebCore.pro: Ditto.
23         * WebCore.vcproj/WebCore.vcproj: Ditto.
24         * WebCore.xcodeproj/project.pbxproj: Ditto.
25         * svg/SVGAllInOne.cpp: Ditto.
26         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberOptionalNumber.
27         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
28         (WebCore::SVGAnimateElement::calculateAnimatedValue):
29         (WebCore::SVGAnimateElement::calculateFromAndToValues):
30         (WebCore::SVGAnimateElement::calculateFromAndByValues):
31         (WebCore::SVGAnimateElement::resetToBaseValue):
32         (WebCore::SVGAnimateElement::applyResultsToTarget):
33         (WebCore::SVGAnimateElement::calculateDistance):
34         * svg/SVGAnimatedNumberOptionalNumber.cpp: Added. New animator for SVGAnimatedNumberOptionalNumber.
35         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::SVGAnimatedNumberOptionalNumberAnimator):
36         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
37         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndToValues):
38         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndByValues):
39         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
40         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateDistance):
41         * svg/SVGAnimatedNumberOptionalNumber.h: Added.
42         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::~SVGAnimatedNumberOptionalNumberAnimator):
43         * svg/SVGAnimatedType.cpp: Added new type: pair<float, float>.
44         (WebCore::SVGAnimatedType::~SVGAnimatedType):
45         (WebCore::SVGAnimatedType::createNumberOptionalNumber):
46         (WebCore::SVGAnimatedType::numberOptionalNumber):
47         (WebCore::SVGAnimatedType::valueAsString):
48         (WebCore::SVGAnimatedType::setValueAsString):
49         * svg/SVGAnimatedType.h:
50         * svg/SVGAnimatorFactory.h: Add new animator to factory.
51         (WebCore::SVGAnimatorFactory::create):
52
53 2011-06-25  Dimitri Glazkov  <dglazkov@chromium.org>
54
55         Reviewed by Adam Barth.
56
57         Crash in frameless document with media element.
58         https://bugs.webkit.org/show_bug.cgi?id=63393
59
60         Since MediaControls::create can return 0 (and does for frameless documents), we must anticipate it
61         in the calling code.
62
63         Test: fast/dom/shadow/frameless-media-element-crash.html
64
65         * html/HTMLMediaElement.cpp:
66         (WebCore::HTMLMediaElement::attributeChanged): Changed to bail out if controls weren't successfully created.
67         (WebCore::HTMLMediaElement::createMediaControls): Renamed to better reflect the purpose, changed to handle failure of creation.
68         (WebCore::HTMLMediaElement::preDispatchEventHandler): Changed to bail out if controls weren't successfully created.
69         * html/HTMLMediaElement.h: Adjusted def.
70
71 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
72
73         Reviewed by Darin Adler.
74
75         Fix some minor style issues
76         https://bugs.webkit.org/show_bug.cgi?id=63391
77
78         * inspector/DOMNodeHighlighter.cpp:
79         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
80         The explicit WebCore namespace usage can be dropped.
81
82         * rendering/RenderView.cpp:
83         (WebCore::RenderView::mapLocalToContainer):
84         Use ASSERT_UNUSED for a parameter that we want to ASSERT
85         on for a debug build, but is UNUSED in a release build.
86
87 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
88
89         Unreviewed build fix.
90
91         Use UNUSED_PARAM on the correct param!
92
93         * rendering/RenderView.cpp:
94         (WebCore::RenderView::mapLocalToContainer):
95
96 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
97
98         Reviewed by Simon Fraser.
99
100         Inspector highlight rect is wrong for contents of transformed iframes
101         https://bugs.webkit.org/show_bug.cgi?id=53627
102
103         Part 2: Only adjust for the FrameView's scroll position when
104         the localToAbsolute mapping did not end with fixed content.
105         Content that is inside of a fixed position container is already
106         adjusted for the FrameView's scrollPosition when RenderView
107         maps local to container.
108
109         This patch uses a "wasFixed" out parameter to determine if
110         the localToAbsolute transformation ended inside a fixed block,
111         and if so does not apply the scroll position.
112
113         * page/FrameView.cpp:
114         (WebCore::FrameView::convertFromRenderer):
115         Respect wasFixed as described above.
116
117         * rendering/RenderBox.h:
118         * rendering/RenderBox.cpp:
119         (WebCore::RenderBox::mapLocalToContainer):
120         This is the only time that "fixed" ever changed. So when
121         fixed changes, update the optional wasFixed out parameter.
122
123         * rendering/RenderObject.cpp:
124         (WebCore::RenderObject::localToAbsolute):
125         (WebCore::RenderObject::mapLocalToContainer):
126         (WebCore::RenderObject::localToContainerQuad):
127         * rendering/RenderObject.h:
128         (WebCore::RenderObject::localToAbsoluteQuad):
129         Ignore wasFixed by default, but pipe it though where needed.
130
131         * rendering/RenderView.h:
132         * rendering/RenderView.cpp:
133         (WebCore::RenderView::mapLocalToContainer):
134         This is the final recursive call, so wasFixed goes no
135         further. We sanity check its value in debug builds.
136
137         * rendering/RenderBlock.cpp:
138         (WebCore::RenderBlock::selectionGapRectsForRepaint):
139         * rendering/RenderInline.cpp:
140         (WebCore::RenderInline::mapLocalToContainer):
141         * rendering/RenderInline.h:
142         * rendering/svg/RenderSVGForeignObject.cpp:
143         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
144         * rendering/svg/RenderSVGForeignObject.h:
145         * rendering/svg/RenderSVGInline.cpp:
146         (WebCore::RenderSVGInline::mapLocalToContainer):
147         * rendering/svg/RenderSVGInline.h:
148         * rendering/svg/RenderSVGModelObject.cpp:
149         (WebCore::RenderSVGModelObject::mapLocalToContainer):
150         * rendering/svg/RenderSVGModelObject.h:
151         * rendering/svg/RenderSVGRoot.cpp:
152         (WebCore::RenderSVGRoot::mapLocalToContainer):
153         * rendering/svg/RenderSVGRoot.h:
154         * rendering/svg/RenderSVGText.cpp:
155         (WebCore::RenderSVGText::mapLocalToContainer):
156         * rendering/svg/RenderSVGText.h:
157         * rendering/svg/SVGRenderSupport.cpp:
158         (WebCore::SVGRenderSupport::mapLocalToContainer):
159         * rendering/svg/SVGRenderSupport.h:
160         Pipe wasFixed through where needed.
161
162 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
163
164         Reviewed by Simon Fraser.
165
166         Inspector highlight rect is wrong for contents of transformed iframes
167         https://bugs.webkit.org/show_bug.cgi?id=53627
168
169         Part 1: Provide FloatQuad versions of convertFromRenderer,
170         convertToContainingView, and convertChildToSelf, so that we
171         can get the fully transformed quad of a renderer all the
172         way up to the root widget.
173
174         * page/FrameView.cpp:
175         (WebCore::FrameView::convertFromRenderer):
176         (WebCore::FrameView::convertToContainingView):
177         * page/FrameView.h:
178         * platform/ScrollView.h:
179         (WebCore::ScrollView::convertChildToSelf):
180         * platform/Widget.h:
181         * platform/Widget.cpp:
182         (WebCore::Widget::convertToContainingView):
183         Provide FloatQuad versions of these already existing functions.
184
185         (WebCore::Widget::convertToRootContainingView):
186         Provide a helper conversion function to recursively
187         convert a given FloatQuad up to the root widget.
188
189         * inspector/DOMNodeHighlighter.cpp:
190         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
191         Use the new methods to convert the FloatQuad for the highlighted
192         node to the root container, without losing transformation
193         information. Add a FIXME for SVG, which is still broken.
194
195         * WebCore.exp.in:
196         Export the new Widget functions so WebKit can link properly.
197
198 2011-06-25  Dirk Schulze  <krit@webkit.org>
199
200         Unreviewed build fix.
201
202         SVGAnimatedType should support SVGNumberList animation
203         https://bugs.webkit.org/show_bug.cgi?id=63387
204
205         * svg/SVGAnimatedNumberList.cpp:
206         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
207
208 2011-06-25  Dirk Schulze  <krit@webkit.org>
209
210         Reviewed by Nikolas Zimmermann.
211
212         SVGAnimatedType should support SVGNumberList animation
213         https://bugs.webkit.org/show_bug.cgi?id=63387
214         
215         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
216         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGNumberList.
217         
218         Animations of attributes with type SVGNumberList can be interpolated now.
219
220         Tests: svg/animations/svgnumberlist-animation-1.html
221                svg/animations/svgnumberlist-animation-2.html
222
223         * CMakeLists.txt: Added new file to build system.
224         * GNUmakefile.list.am: Ditto.
225         * WebCore.gypi: Ditto.
226         * WebCore.pro: Ditto.
227         * WebCore.xcodeproj/project.pbxproj: Ditto.
228         * svg/SVGAllInOne.cpp: Ditto.
229         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberList.
230         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
231         (WebCore::SVGAnimateElement::calculateAnimatedValue):
232         (WebCore::SVGAnimateElement::calculateFromAndToValues):
233         (WebCore::SVGAnimateElement::calculateFromAndByValues):
234         (WebCore::SVGAnimateElement::resetToBaseValue):
235         (WebCore::SVGAnimateElement::applyResultsToTarget):
236         (WebCore::SVGAnimateElement::calculateDistance):
237         * svg/SVGAnimatedNumber.cpp:
238         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedNumber): Made method static for reuse in SVGAnimatedNumberList (and SVGAnimatedNumberOptionalNumber later).
239         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): Use new static function.
240         * svg/SVGAnimatedNumber.h:
241         * svg/SVGAnimatedNumberList.cpp: Added. New animator for SVGNumberList.
242         (WebCore::SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator):
243         (WebCore::SVGAnimatedNumberListAnimator::constructFromString):
244         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndToValues):
245         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndByValues):
246         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
247         (WebCore::SVGAnimatedNumberListAnimator::calculateDistance):
248         * svg/SVGAnimatedNumberList.h:
249         (WebCore::SVGAnimatedNumberListAnimator::~SVGAnimatedNumberListAnimator):
250         * svg/SVGAnimatedType.cpp: Use new Animator.
251         (WebCore::SVGAnimatedType::~SVGAnimatedType):
252         (WebCore::SVGAnimatedType::createNumberList):
253         (WebCore::SVGAnimatedType::numberList):
254         (WebCore::SVGAnimatedType::valueAsString):
255         (WebCore::SVGAnimatedType::setValueAsString):
256         * svg/SVGAnimatedType.h:
257         * svg/SVGAnimatorFactory.h:
258         (WebCore::SVGAnimatorFactory::create):
259
260 2011-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
261
262         Reviewed by Dirk Schulze.
263
264         Convert SVGPath to SVGAnimatorFactory concept
265         https://bugs.webkit.org/show_bug.cgi?id=63336
266
267         Convert <animate attributeName="d"> parsing to the new SVGAnimatorFactory concept, removing
268         the last special data types from SVGAnimateElement: SVGPathByteStream m_fromPath/m_toPath/m_animatedPath.
269         All existing non-string primitives have been converted to the new concept.
270
271         Doesn't change any functionality.
272
273         * CMakeLists.txt: Added SVGAnimatedPath.*.
274         * GNUmakefile.list.am: Ditto.
275         * WebCore.gypi: Ditto.
276         * WebCore.pro: Ditto.
277         * WebCore.vcproj/WebCore.vcproj: Ditto.
278         * WebCore.xcodeproj/project.pbxproj: Ditto.
279         * svg/SVGAllInOne.cpp: Ditto.
280         * svg/SVGAnimateElement.cpp:
281         (WebCore::SVGAnimateElement::SVGAnimateElement):
282         (WebCore::SVGAnimateElement::calculateAnimatedValue):
283         (WebCore::SVGAnimateElement::calculateFromAndToValues):
284         (WebCore::SVGAnimateElement::calculateFromAndByValues):
285         (WebCore::SVGAnimateElement::resetToBaseValue):
286         (WebCore::SVGAnimateElement::applyResultsToTarget):
287         * svg/SVGAnimateElement.h:
288         * svg/SVGAnimatedPath.cpp: Added.
289         (WebCore::SVGAnimatedPathAnimator::SVGAnimatedPathAnimator):
290         (WebCore::SVGAnimatedPathAnimator::constructFromString):
291         (WebCore::SVGAnimatedPathAnimator::calculateFromAndToValues):
292         (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues):
293         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
294         (WebCore::SVGAnimatedPathAnimator::calculateDistance):
295         * svg/SVGAnimatedPath.h: Added.
296         (WebCore::SVGAnimatedPathAnimator::~SVGAnimatedPathAnimator):
297         * svg/SVGAnimatedType.cpp:
298         (WebCore::SVGAnimatedType::~SVGAnimatedType):
299         (WebCore::SVGAnimatedType::createPath):
300         (WebCore::SVGAnimatedType::path):
301         (WebCore::SVGAnimatedType::valueAsString):
302         (WebCore::SVGAnimatedType::setValueAsString):
303         * svg/SVGAnimatedType.h:
304         * svg/SVGAnimatorFactory.h:
305         (WebCore::SVGAnimatorFactory::create):
306         * svg/SVGPathByteStream.h:
307         (WebCore::SVGPathByteStream::initializeFrom):
308         * svg/SVGPathParserFactory.cpp:
309         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromSVGPathSegList):
310         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromString):
311         (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream):
312
313 2011-06-25  Jer Noble  <jer.noble@apple.com>
314
315         Reviewed by Maciej Stachowiak.
316
317         SOFT_LINK_POINTER_OPTIONAL isn't optional.
318         https://bugs.webkit.org/show_bug.cgi?id=63378
319
320         Continuation of r89718.  SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it.
321
322         * platform/mac/SoftLinking.h:
323
324 2011-06-25  Rob Buis  <rbuis@rim.com>
325
326         Reviewed by Nikolas Zimmermann.
327
328         SVG1.1SE test linking-uri-01-b.svg fails
329         https://bugs.webkit.org/show_bug.cgi?id=63322
330
331         Allow navigating to internal <view> targets. When choosing Back ensure
332         the <svg> current view is initialized correctly.
333
334         Tests: svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg
335                svg/custom/linking-uri-01-b.svg
336
337         * page/FrameView.cpp: Delegate to setupInitialView.
338         (WebCore::FrameView::scrollToAnchor):
339         * svg/SVGAElement.cpp: Allow navigating to internal <view> targets.
340         (WebCore::SVGAElement::defaultEventHandler):
341         * svg/SVGSVGElement.cpp:
342         (WebCore::SVGSVGElement::setupInitialView): Initialize current view depending on fragment identifier.
343         (WebCore::SVGSVGElement::inheritViewAttributes):
344         * svg/SVGSVGElement.h:
345
346 2011-06-24  Dimitri Glazkov  <dglazkov@chromium.org>
347
348         Reviewed by Darin Adler.
349
350         REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors
351         https://bugs.webkit.org/show_bug.cgi?id=63373
352
353         * css/CSSStyleSelector.cpp:
354         (WebCore::CSSStyleSelector::pushParentStackFrame): Changed to use parentOrHostElement.
355         (WebCore::CSSStyleSelector::pushParent): Ditto.
356         * dom/Node.cpp:
357         (WebCore::Node::parentOrHostElement): Added.
358         * dom/Node.h:
359
360 2011-06-24  Dan Bernstein  <mitz@apple.com>
361
362         Reviewed by Anders Carlsson.
363
364         Add an option to enable legacy rounding hacks
365         https://bugs.webkit.org/show_bug.cgi?id=63363
366
367         Restored most of text rounding hacks which were removed in r78846, with a global flag to control
368         whether rounding hacks are allowed, which defaults to false.
369
370         Test: platform/mac/fast/text/rounding-hacks.html
371
372         * CMakeLists.txt: Added TextRun.cpp.
373         * GNUmakefile.list.am: Ditto.
374         * WebCore.exp.in: Export new TextRun function and global and updated StringTruncator functions.
375         * WebCore.gypi: Added TextRun.cpp.
376         * WebCore.pro: Ditto.
377         * WebCore.vcproj/WebCore.vcproj: Ditto.
378         * WebCore.xcodeproj/project.pbxproj: Ditto.
379         * html/canvas/CanvasRenderingContext2D.cpp:
380         (WebCore::CanvasRenderingContext2D::drawTextInternal): Disable rounding hacks in the one place
381         they used to be disabled.
382         * platform/graphics/Font.cpp: Re-added the rounding character table.
383         * platform/graphics/Font.h:
384         (WebCore::Font::isRoundingHackCharacter): Re-added.
385         * platform/graphics/FontFastPath.cpp:
386         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Account for final rounding width.
387         * platform/graphics/SimpleFontData.cpp:
388         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth.
389         * platform/graphics/SimpleFontData.h:
390         (WebCore::SimpleFontData::adjustedSpaceWidth): Re-added.
391         * platform/graphics/StringTruncator.cpp:
392         (WebCore::stringWidth): Re-added disableRoundingHacks parameter.
393         (WebCore::truncateString): Ditto.
394         (WebCore::StringTruncator::centerTruncate): Added EnableRoundingHacksOrNot parameter.
395         (WebCore::StringTruncator::rightTruncate): Ditto.
396         (WebCore::StringTruncator::width): Ditto.
397         * platform/graphics/StringTruncator.h:
398         * platform/graphics/TextRun.cpp: Added.
399         (WebCore::TextRun::setAllowsRoundingHacks): Added.
400         * platform/graphics/TextRun.h:
401         (WebCore::TextRun::TextRun): Added RoundingHacks parameter to the constructors, used to initialize
402         the m_applyRunRounding and m_applyWordRounding member variables, subject to rounding hacks being allowed.
403         (WebCore::TextRun::applyRunRounding): Re-added this accessor.
404         (WebCore::TextRun::applyWordRounding): Ditto.
405         (WebCore::TextRun::disableRoundingHacks): Re-added.
406         * platform/graphics/WidthIterator.cpp:
407         (WebCore::WidthIterator::WidthIterator): Re-added code to apply rounding hacks.
408         (WebCore::WidthIterator::advance): Ditto.
409         * platform/graphics/WidthIterator.h:
410         * platform/graphics/mac/ComplexTextController.cpp:
411         (WebCore::ceilCGFloat): Re-added.
412         (WebCore::ComplexTextController::ComplexTextController): Re-added code to apply rounding hacks.
413         (WebCore::ComplexTextController::advance): Ditto.
414         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
415         * platform/graphics/mac/ComplexTextController.h:
416         (WebCore::ComplexTextController::finalRoundingWidth): Re-added this accessor.
417         * platform/graphics/mac/FontComplexTextMac.cpp:
418         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Accound for final rounding width.
419         * platform/graphics/qt/SimpleFontDataQt.cpp:
420         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth.
421         * platform/gtk/RenderThemeGtk.cpp:
422         (WebCore::RenderThemeGtk::fileListNameForWidth): Enabled rounding hacks in the string truncator.
423         * platform/mac/DragImageMac.mm:
424         (WebCore::widthWithFont): Disable rounding hacks when measuring.
425         (WebCore::drawAtPoint): Disable rounding hacks when drawing.
426         * platform/win/DragImageWin.cpp:
427         (WebCore::createDragImageForLink): Enable rounding hacks in the string truncator.
428         * platform/win/WebCoreTextRenderer.cpp:
429         (WebCore::WebCoreTextFloatWidth): Ditto.
430         * rendering/RenderFileUploadControl.cpp:
431         (WebCore::RenderFileUploadControl::paintObject): Disable rounding hacks.
432         * rendering/RenderListBox.cpp:
433         (WebCore::RenderListBox::updateFromElement): Ditto.
434         (WebCore::RenderListBox::paintItemForeground): Ditto.
435         * rendering/RenderTextControl.cpp:
436         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
437         * rendering/RenderTheme.cpp:
438         (WebCore::RenderTheme::fileListNameForWidth): Enabled rounding hacks in the string truncator.
439         * rendering/RenderThemeMac.mm:
440         (WebCore::RenderThemeMac::fileListNameForWidth): Ditto.
441         * rendering/svg/SVGInlineTextBox.cpp:
442         (WebCore::SVGInlineTextBox::constructTextRun): Disabled rounding hacks.
443         * rendering/svg/SVGTextMetrics.cpp:
444         (WebCore::constructTextRun): Ditto.
445
446 2011-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
447
448         Reviewed by Rob Buis.
449
450         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
451         https://bugs.webkit.org/show_bug.cgi?id=59085
452
453         font substitution doesn't work for HTML text using SVG fonts
454         https://bugs.webkit.org/show_bug.cgi?id=17608
455
456         Selection rects are wrong for text with SVG fonts
457         https://bugs.webkit.org/show_bug.cgi?id=25460
458
459         With @font-face, SVG fonts only work as primary, non-segmented
460         https://bugs.webkit.org/show_bug.cgi?id=32227
461
462         When using SVG fonts with @font-face word-spacing and text-align: justify are not being honored
463         https://bugs.webkit.org/show_bug.cgi?id=34236
464
465         SVG @font-face breaks text-overflow: ellipsis
466         https://bugs.webkit.org/show_bug.cgi?id=36840
467
468         REGRESSION: SVG Font selection problems
469         https://bugs.webkit.org/show_bug.cgi?id=41934
470
471         Tests: svg/custom/svg-fonts-fallback.xhtml (for bug 17608, extended the original test from Mark Ambachtsheer)
472                svg/custom/svg-fonts-segmented.xhtml (for bug 32227)
473                svg/custom/svg-fonts-word-spacing.html (for bug 34236, from Michael Lewis)
474                svg/text/select-text-svgfont.html (for bug 25460/41934, from Emil Schutte)
475                svg/text/text-overflow-ellipsis-svgfont.html (for 36840, from Emil Schutte)
476
477         Rewrite the SVG Fonts support to fully integrate within the GlyphPage concept and the "simple" code path used to render platform fonts.
478         That means the special logic for measuring text using SVG Fonts, calculating offset for positions, computing selection rects etc. is all gone now.
479         There's no difference anymore between using a native font or a SVG Font, in terms of these operations.
480
481         This makes text selection using SVG Fonts possible again.
482
483         * features.pri: Temporarily turn of SVG Fonts for Qt, as long as QRawFont support is not available and the fast path is disabled.
484         * page/DOMWindow.idl: Touched file to force Qt regenerating the bindings.
485         * platform/graphics/Font.cpp: Remove SVG Font special cases, the simple code path now handles SVG Fonts as well.
486         (WebCore::Font::drawText):
487         (WebCore::Font::drawEmphasisMarks):
488         (WebCore::Font::width):
489         (WebCore::Font::selectionRectForText):
490         (WebCore::Font::offsetForPosition):
491         (WebCore::Font::codePath):
492         * platform/graphics/Font.h: Pass TextRun to drawGlyphBuffer/drawEmphasisMarks. Add new glyphDataAndPageForCharacter() method which returns a pair
493                                     std::pair<GlyphData, GlyphPage*>, so we know the associated GlyphPage for a certain GlyphData object, which is needed to properly
494                                     handle font fallback glyph matching for SVG Fonts..
495         (WebCore::Font::fontList): Add FontFallbackList accessor.
496         * platform/graphics/FontFallbackList.h: Add getters/setters for glyphPageZero -- SVG Fonts support needs access to these objects from SVGTextRunRenderingContext.
497         (WebCore::FontFallbackList::glyphPageZero):
498         (WebCore::FontFallbackList::glyphPages):
499         (WebCore::FontFallbackList::setGlyphPageZero):
500         (WebCore::FontFallbackList::setGlyphPages):
501         * platform/graphics/FontFastPath.cpp:
502         (WebCore::Font::glyphDataForCharacter): Move implementation to glyphDataAndPageForCharacter(), and use that method from here.
503         (WebCore::Font::glyphDataAndPageForCharacter): Does the same as before, just returns an additional GlyphPage* pointer.
504         (WebCore::Font::getEmphasisMarkGlyphData): Remove SVG Fonts special case.
505         (WebCore::Font::drawGlyphBuffer): Ditto.
506         * platform/graphics/FontMetrics.h:
507         (WebCore::scaleEmToUnits): Refactored scaleEmToUnits free function from SimpleFontDataMac/CGWin to share with SVGFontData/SVGTextRunRenderingContext.
508         * platform/graphics/GlyphPageTreeNode.cpp:
509         (WebCore::fill): Stop skipping SVG Fonts, they now also fill the GlyphPage using the glyphs defined in the SVG Font.
510         * platform/graphics/SVGGlyph.h: s/isValid/isPartOfLigature/. Its usage has been changed.
511         (WebCore::SVGGlyph::SVGGlyph):
512         (WebCore::SVGGlyph::operator==):
513         * platform/graphics/SimpleFontData.cpp: Change font size to be a float, not an int.
514         (WebCore::SimpleFontData::SimpleFontData):
515         * platform/graphics/SimpleFontData.h: Add new pure virtual methods to the AdditionalFontData interface, to be implemented in SVGFontData.
516         (WebCore::SimpleFontData::widthForGlyph): Call widthForSVGGlyph, if we encounter a SVG glyph.
517         * platform/graphics/TextRun.h: 
518         * platform/graphics/WidthIterator.cpp:
519         (WebCore::WidthIterator::glyphDataForCharacter):
520         (WebCore::WidthIterator::advance):
521         * platform/graphics/WidthIterator.h: Store several new members needed for SVG Fonts support (last processed glyph name used for kerning pair lookup)
522                                              and a map mapping each character of a text to its arabic-form (if needed, to perform SVG glyph selection for Arabic text).
523         (WebCore::WidthIterator::run):
524         (WebCore::WidthIterator::runWidthSoFar):
525         (WebCore::WidthIterator::lastGlyphName):
526         (WebCore::WidthIterator::setLastGlyphName):
527         (WebCore::WidthIterator::arabicForms):
528         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Use new scaleEmToUnits free function from FontMetrics.h.
529         * platform/graphics/mac/SimpleFontDataMac.mm: Ditto.
530         * platform/graphics/win/SimpleFontDataCGWin.cpp: Ditto.
531         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
532         (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes): Handle UTF-16 surrogate pairs correctly, fixes the previous Acid3 regression.
533         * rendering/svg/SVGTextMetrics.cpp:
534         (WebCore::SVGTextMetrics::SVGTextMetrics):
535         (WebCore::constructTextRun):
536         (WebCore::SVGTextMetrics::measureCharacterRange):
537         * rendering/svg/SVGTextMetrics.h:
538         * rendering/svg/SVGTextRunRenderingContext.cpp: Remove drawTextUsingSVGFont/floatWidthUsingSVGFont/selectionRectForTextUsingSVGFont/offsetForPositionForTextUsingSVGFont.
539         (WebCore::firstParentRendererForNonTextNode): Don't assert node() exists, doesn't hold true for generated render objects.
540         (WebCore::renderObjectFromRun): Renamed from referencingRenderObjectFromRun.
541         (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Remove extra "extraCharsAvailable" parameter, now solves via TextRun::charactersLength().
542         (WebCore::calculateEmUnitToPixelScaleFactor): Add helper method.
543         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Main drawing method, this actually creates/renders Paths.
544         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Part 1/2 of SVG Glyph selection code.
545         * rendering/svg/SVGTextRunRenderingContext.h:
546         * svg/SVGAltGlyphElement.cpp:
547         (WebCore::SVGAltGlyphElement::hasValidGlyphElement):
548         * svg/SVGAltGlyphElement.h:
549         * svg/SVGFontData.cpp:
550         (WebCore::SVGFontData::initializeFontData): Changed font size from int to float.
551         (WebCore::SVGFontData::widthForSVGGlyph): Lookup a SVGGlyph from a Glyph using the glyph table in SVGFontElement and calculate its width.
552         (WebCore::SVGFontData::applySVGGlyphSelection): Part 2/2 of SVG Glyph selection code.
553         (WebCore::SVGFontData::fillSVGGlyphPage): Fill GlyphPage using glyphs defined in the SVG Font.
554         (WebCore::SVGFontData::fillBMPGlyphs): Moved from the previous fillSVGGlyphPage implementation.
555         (WebCore::SVGFontData::fillNonBMPGlyphs): Add non-bmp glyph handling, fixing the Acid3 regression (support using SVGGlyphs for UTF-16 surrogate pairs).
556         * svg/SVGFontData.h:
557         * svg/SVGFontElement.cpp:
558         (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Enable ligature registration for the use within GlyphPage.
559         (WebCore::SVGFontElement::ensureGlyphCache):
560         * svg/SVGGlyphMap.h: Switch to use SurrogatePairTextIterator, and switch glyph table from UChar to UChar32, just like GlyphPage, to handle glyphs from non-BMP correctly.
561         (WebCore::SVGGlyphMap::addGlyph): Remove setting isValid, it's not needed anymore and gone.
562         (WebCore::SVGGlyphMap::collectGlyphsForString):
563         * svg/svgtags.in: Surround vkern in ENABLE_SVG_FONTS block.
564
565 2011-06-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
566
567         Reviewed by Antonio Gomes.
568
569         [CMAKE] Replace ";" with space in FEATURE_DEFINES macro
570         https://bugs.webkit.org/show_bug.cgi?id=62211
571
572         html.css file doesn't recognize ENABLE_XXX macro because FEATURE_DEFINES macro has ";"
573         as separator. So, let the html.css to use new feature macro with space separator.
574
575         * CMakeLists.txt:
576
577 2011-06-24  Gavin Peters  <gavinp@chromium.org>
578
579         Reviewed by Darin Adler.
580
581         fix possible race in LinkLoader
582         https://bugs.webkit.org/show_bug.cgi?id=63360
583
584         In chromium bug 80729
585         http://code.google.com/p/chromium/issues/detail?id=80729 I am
586         seeing some kind of double triggering of the timer; I am concerned
587         that it is possible that a Link element errors out or succeeds,
588         sets a timer, and shortly before the timer is triggered it is
589         editted, launches another request.  After that, the first timer
590         triggers, zeroing out m_cachedResource.  Then, the second load
591         finishes, and *crash*.  If this is the case, this fix should stop
592         it.
593
594         No new tests; I haven't reproduced this.  I hope chrome's crash
595         telemetry will give good feedback; this crash is occuring many times a
596         day so the difference should be obvious.
597
598         * loader/LinkLoader.cpp:
599         (WebCore::LinkLoader::LinkLoader):
600         (WebCore::LinkLoader::linkLoadTimerFired):
601         (WebCore::LinkLoader::linkLoadingErrorTimerFired):
602         (WebCore::LinkLoader::notifyFinished):
603         * loader/LinkLoader.h:
604
605 2011-06-24  Jer Noble  <jer.noble@apple.com>
606
607         Reviewed by Eric Carlson.
608
609         Safari will quit unexpectedly when launching Safari in the first time (crash in initQTSecurityPolicyNoLocalToRemoteSiteAttribute)
610         https://bugs.webkit.org/show_bug.cgi?id=63332
611         <rdar://problem/9661650>
612
613         No new tests; Only affects machines with QTKit < 7.6.3 installed.
614
615         Check to see if QTSecurityPolicyNoRemoteToLocalSiteAttribute is non-NULL before passing it into -[QTMovie initWithAttributes:],
616         as it is only defined in QTKit >= 7.6.3.  If it is NULL, pass QTSecurityPolicyNoCrossSiteAttribute=YES instead, which has
617         the same effect in earlier versions of QTKit as the NoLocalToRemote and NoRemoteToLocal keys.  To avoid ASSERTs when running
618         debug builds with earlier versions of QTKit, add a SOFT_LINK_POINTER_OPTIONAL macro to SoftLinking.h and make these keys optional.
619
620         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
621         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
622         * platform/mac/SoftLinking.h: Add SOFT_LINK_POINTER_OPTIONAL macro.
623
624 2011-06-24  Darin Adler  <darin@apple.com>
625
626         Try to fix Windows build failure.
627
628         * platform/win/ClipboardUtilitiesWin.cpp:
629         (WebCore::setFileDescriptorData): Copy string into a local so we
630         can call charactersWithNullTermination on it.
631
632 2011-06-23  Darin Adler  <darin@apple.com>
633
634         Reviewed by Adam Barth.
635
636         Remove some unneeded functions from FrameLoader
637         https://bugs.webkit.org/show_bug.cgi?id=63295
638
639         Removing 7 of the functions in FrameLoader.h is probably a step
640         in the right direction.
641
642         * loader/DocumentLoader.cpp:
643         (WebCore::DocumentLoader::handledOnloadEvents):
644         Moved the call to stopDeferringEvents in here from FrameLoader.
645         * loader/DocumentLoader.h: Ditto.
646
647         * loader/DocumentWriter.h: Fixed a typo.
648
649         * loader/FrameLoader.cpp:
650         (WebCore::FrameLoader::setFirstPartyForCookies): Changed this to
651         use a non-recursive tree walk instead of recursion.
652         (WebCore::FrameLoader::stopAllLoaders): Moved the code from
653         stopLoadingSubframes inline, since it's only two lines of code.
654         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Moved
655         the code from markLoadComplete inline, since it's only one line.
656         (WebCore::FrameLoader::checkLoadComplete): Changed this to use a
657         non-recursive tree walk instead of recursion, eliminating the
658         recursiveCheckLoadComplete function completely.
659         (WebCore::FrameLoader::handledOnloadEvents): Moved the call to
660         stopDeferringEvents into DocumentLoader.
661
662         * loader/FrameLoader.h: Removed unneeded forward declarations,
663         and now-unneeded functions setupForReplaceByMIMEType,
664         isStopping, isLoadingFromCachedPage, stopLoadingSubframes,
665         markLoadComplete, mainReceivedError, and recursiveCheckLoadComplete.
666         Also made allChildrenAreComplete private.
667
668         * loader/MainResourceLoader.cpp:
669         (WebCore::MainResourceLoader::continueAfterContentPolicy):
670         Call DocumentLoader::isStopping so we can remove the function
671         from FrameLoader that just calls through. Other call sites were
672         using DocumentLoader::isStopping directly.
673         (WebCore::MainResourceLoader::didReceiveResponse): Call
674         DocumentLoader::setupForReplaceByMIMEType so we can remove the
675         function from FrameLoader that just calls through. This was
676         the only call site.
677
678         * loader/ResourceLoader.cpp:
679         (WebCore::ResourceLoader::init): Call the
680         ResourceLoader::cancelledError function instead of calling
681         directly to FrameLoader.
682
683         * loader/ResourceLoader.h: Made response an inline function.
684
685 2011-06-24  Alexey Proskuryakov  <ap@apple.com>
686
687         Rubber-stamped by Maciej Stachowiak.
688
689         REGRESSION (r88984): Infinite recursion in DocumentLoader::detachFromFrame/stopLoading
690
691         No new tests, as there is no known way to reproduce this (but we'll keep investigating, as
692         the rollout will re-introduce the older less frequent crash).
693
694         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): Rollout the fix
695         for bug 62764.
696
697 2011-06-24  Tony Chang  <tony@chromium.org>
698
699         Reviewed by Ojan Vafai.
700
701         add flexbox and inline-flexbox as possible CSS display values
702         https://bugs.webkit.org/show_bug.cgi?id=63361
703
704         Test: css3/flexbox/display-property.html
705
706         * css/CSSParser.cpp:
707         (WebCore::CSSParser::parseValue):
708         * css/CSSValueKeywords.in:
709
710 2011-06-24  Anna Cavender  <annacc@chromium.org>
711
712         Reviewed by Eric Carlson.
713
714         Loading out-of-band text track files from <track>.
715         https://bugs.webkit.org/show_bug.cgi?id=62881
716
717         Uses the src attribute of <track> urls to load out-of-band text track
718         files using ThreadableLoader.  Also removes TextTrackPrivateInterface
719         (as well as LoadableTextTrackImpl and MutableTextTrackImpl) classes.
720
721         No new tests because feature is hidden behind VIDEO_TRACK feature
722         define, which is turned off.
723
724         * CMakeLists.txt:
725         * GNUmakefile.am:
726         * GNUmakefile.list.am:
727         * WebCore.gypi:
728         * WebCore.pro:
729         * WebCore.xcodeproj/project.pbxproj:
730         * html/HTMLMediaElement.cpp:
731         * html/HTMLMediaElement.h:
732         * html/HTMLTrackElement.cpp:
733         * html/HTMLTrackElement.h:
734         * html/LoadableTextTrack.cpp:
735         * html/LoadableTextTrack.h:
736         * html/LoadableTextTrackImpl.cpp: Removed.
737         * html/LoadableTextTrackImpl.h: Removed.
738         * html/MutableTextTrack.cpp:
739         * html/MutableTextTrack.h:
740         * html/MutableTextTrackImpl.cpp: Removed.
741         * html/MutableTextTrackImpl.h: Removed.
742         * html/TextTrack.cpp:
743         * html/TextTrack.h:
744         * html/TextTrackPrivate.h: Removed.
745         * platform/track/CueParser.cpp:
746         * platform/track/CueParser.h:
747
748 2011-06-24  Rob Buis  <rbuis@rim.com>
749
750         Rubber-stamped by Nikolas Zimmermann.
751
752         All pointer-events fail if text has visibility="hidden"
753         https://bugs.webkit.org/show_bug.cgi?id=62209
754
755         Do not use writing mode aware code for SVG Text.
756
757         No new tests needed.
758
759         * rendering/svg/SVGInlineTextBox.cpp:
760         (WebCore::SVGInlineTextBox::nodeAtPoint):
761
762 2011-06-24  Lukasz Slachciak  <l.slachciak@samsung.com>
763
764         Reviewed by Darin Adler.
765
766         Change NDEBUG to !LOG_DISABLED macro in databases for logging.
767         https://bugs.webkit.org/show_bug.cgi?id=63346
768
769         Changed NDEBUG to !LOG_DISABLED in databases code which involves logging.
770         This change resolves also build break in Release build when logging enabled.
771
772         No new tests because there is no new behavior or feature exposed.
773
774         * loader/icon/IconDatabase.cpp: Macro fixes.
775         (WebCore::IconDatabase::iconDatabaseSyncThread):
776         (WebCore::IconDatabase::syncThreadMainLoop):
777         (WebCore::IconDatabase::readFromDatabase):
778         (WebCore::IconDatabase::writeToDatabase):
779         (WebCore::IconDatabase::cleanupSyncThread):
780         * storage/AbstractDatabase.h: Macro fixes.
781         * storage/DatabaseTask.cpp: Macro fixes.
782         * storage/DatabaseTask.h: Macro fixes.
783         * storage/SQLTransaction.cpp: Macro fixes.
784         * storage/SQLTransaction.h: Macro fixes.
785
786 2011-06-24  Tony Chang  <tony@chromium.org>
787
788         Reviewed by Adam Barth.
789
790         Pass Strings by const reference to functions
791         https://bugs.webkit.org/show_bug.cgi?id=63341
792
793         Note that since Strings hold a RefPtr to StringImpl, passing Strings
794         by value isn't horrible, but it does cause ref count churn and using
795         const references is more consistent with the rest of the code base.
796
797         * loader/FrameLoader.cpp:
798         (WebCore::FrameLoader::addHTTPOriginIfNeeded): Rework the code to not
799             change the value of the passed in String.
800         * loader/FrameLoader.h:
801         * platform/win/ClipboardUtilitiesWin.cpp:
802         (WebCore::setFileDescriptorData):
803         * platform/win/ClipboardUtilitiesWin.h:
804         * storage/DatabaseTracker.h:
805         * storage/IDBLevelDBBackingStore.cpp:
806         (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
807         * storage/IDBLevelDBBackingStore.h:
808         * storage/IDBSQLiteBackingStore.cpp:
809         (WebCore::IDBSQLiteBackingStore::IDBSQLiteBackingStore):
810         * storage/IDBSQLiteBackingStore.h:
811         * storage/chromium/DatabaseTrackerChromium.cpp:
812         (WebCore::DatabaseTracker::getOpenDatabases):
813         * svg/SVGPaint.cpp:
814         (WebCore::SVGPaint::SVGPaint):
815         * svg/SVGPaint.h:
816         * svg/animation/SMILTimeContainer.cpp:
817         (WebCore::SMILTimeContainer::updateAnimations):
818         * svg/animation/SMILTimeContainer.h:
819         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
820         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
821         * websockets/ThreadableWebSocketChannelClientWrapper.h:
822
823 2011-06-24  Abhishek Arya  <inferno@chromium.org>
824
825         Reviewed by Darin Adler.
826
827         Add clamping for CSSPrimitiveValues and SVGInlineText font size.
828         https://bugs.webkit.org/show_bug.cgi?id=53449        
829
830         Test: svg/text/svg-zoom-large-value.xhtml
831
832         * css/CSSPrimitiveValue.cpp:
833         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): add asserts to detect if the
834         number created is valid.
835         * css/CSSPrimitiveValue.h: add clamping checks to prevent overflows.
836         (WebCore::CSSPrimitiveValue::getFloatValue):
837         (WebCore::CSSPrimitiveValue::getIntValue):
838         * css/CSSStyleSelector.cpp:
839         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): split into two
840         static functions, one specific to CSSStyleSelector and other generic to help
841         in clamping font size for other callers like svg text, etc.
842         * css/CSSStyleSelector.h:
843         * platform/graphics/FontDescription.h: add asserts to detect if the new font
844         size is valid.
845         (WebCore::FontDescription::setComputedSize):
846         (WebCore::FontDescription::setSpecifiedSize):
847         * rendering/svg/RenderSVGInlineText.cpp:
848         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): use the new helper
849         from CSSStyleSelector to help in clamping new scaled font size. do not use
850         "smart minimum" since svg allows really small unreadable fonts (tested by existing
851         layout tests). Document's minimum font size clamp (0 in my case) and harmless epsilon
852         check in CSSStyleSelector function should still hold for svg.
853
854 2011-06-24  Julien Chaffraix  <jchaffraix@webkit.org>
855
856         Reviewed by Darin Adler.
857
858         Remove unsafe static_cast inside the InlineBox hierarchy
859         https://bugs.webkit.org/show_bug.cgi?id=63077
860
861         Refactoring only, no new test.
862
863         * rendering/InlineFlowBox.h:
864         (WebCore::toInlineFlowBox):
865         * rendering/InlineTextBox.h:
866         (WebCore::toInlineTextBox):
867         Added the proper cast methods to those 2 classes from an InlineBox.
868
869         * rendering/InlineBox.cpp:
870         (WebCore::InlineBox::nextLeafChild):
871         (WebCore::InlineBox::prevLeafChild):
872         * rendering/InlineFlowBox.cpp:
873         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
874         (WebCore::InlineFlowBox::addToLine):
875         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
876         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
877         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
878         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
879         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
880         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
881         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
882         (WebCore::InlineFlowBox::computeOverflow):
883         (WebCore::InlineFlowBox::firstLeafChild):
884         (WebCore::InlineFlowBox::lastLeafChild):
885         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
886         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
887         * rendering/RenderBlock.cpp:
888         (WebCore::RenderBlock::positionForBox):
889         * rendering/RenderBlockLineLayout.cpp:
890         (WebCore::RenderBlock::createLineBoxes):
891         (WebCore::RenderBlock::constructLine):
892         (WebCore::setLogicalWidthForTextRun):
893         (WebCore::computeExpansionForJustifiedText):
894         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
895         * rendering/RenderText.cpp:
896         (WebCore::RenderText::localCaretRect):
897         (WebCore::RenderText::positionLineBox):
898         * rendering/RootInlineBox.cpp:
899         (WebCore::RootInlineBox::ascentAndDescentForBox):
900         (WebCore::RootInlineBox::includeFontForBox):
901         (WebCore::RootInlineBox::includeGlyphsForBox):
902         Replaced the static_cast in those previous call sites with the new cast methods.
903
904 2011-06-24  Alexis Menard  <alexis.menard@openbossa.org>
905
906         Unreviewed build fix.
907
908         Build fix on Linux when using the GStreamer backend.
909
910         No new tests, just a build fix.
911
912         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
913         (FullScreenVideoWindow::keyPressEvent):
914
915 2011-06-24  Nat Duca  <nduca@chromium.org>
916
917         Unreviewed, rolling out r89694.
918         http://trac.webkit.org/changeset/89694
919         https://bugs.webkit.org/show_bug.cgi?id=58408
920
921         Test shell still not ready for animate changes.
922
923         * WebCore.gypi:
924         * platform/graphics/chromium/LayerRendererChromium.cpp:
925         (WebCore::LayerRendererChromium::create):
926         (WebCore::LayerRendererChromium::LayerRendererChromium):
927         (WebCore::LayerRendererChromium::setViewport):
928         (WebCore::LayerRendererChromium::updateAndDrawLayers):
929         * platform/graphics/chromium/LayerRendererChromium.h:
930         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
931         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
932         (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
933         (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
934         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed.
935         * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed.
936         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Removed.
937         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed.
938         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed.
939         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed.
940         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed.
941         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Removed.
942         * platform/graphics/chromium/cc/CCMainThreadTask.h:
943         * platform/graphics/chromium/cc/CCThread.cpp:
944         (WebCore::CCThread::runLoop):
945         * platform/graphics/chromium/cc/CCThreadTask.h:
946
947 2011-06-24  Chris Rogers  <crogers@google.com>
948
949         Unreviewed build fix.
950
951         Fix Chromium Linux Build
952         https://bugs.webkit.org/show_bug.cgi?id=63349
953
954         * WebCore.gyp/WebCore.gyp:
955
956 2011-06-24  Henry Song  <hsong@sisa.samsung.com>
957
958         Reviewed by Martin Robinson.
959
960         Correct _sharedTimer value in SharedTimerEfl.cpp
961         https://bugs.webkit.org/show_bug.cgi?id=62380
962
963         SharedTimerEfl.cpp set _sharedTimer = 0 is incorrect in 
964         timerEvent(), we have observed addNewTimer() can be triggered 
965         by either inside timerFunction() or others that are not within
966         timerFunction().  We have observed the following case:
967         1. add a new Timer within timerFunction()
968         2. timerFunction returns, set _sharedTimer = 0
969         3. addNewTimer() is triggered again within webkit, don't know
970            it triggers this.
971         4. because at this moment, _sharedTimer == 0, the previous
972            registered timer (in step 1) did not get removed.
973         5. Now in ecore_timer, there are two timers with same callbacks
974         6. From now on, timerFunction() will be called twice back-to-back
975            in each ecore_timer loop.
976         To correct this, we should set _sharedTimer = 0 before
977         timerFunction() so that when addNewTimer() triggered within,
978         we have a valid timer object.
979
980         * platform/efl/SharedTimerEfl.cpp:
981         (WebCore::timerEvent):
982
983 2011-05-17  Nat Duca  <nduca@chromium.org>
984
985         Reviewed by James Robinson.
986
987         [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
988         https://bugs.webkit.org/show_bug.cgi?id=58408
989
990         Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main
991         thread and compositor thread halves of a composited view. Communication
992         between the two is based on the design used in FileStreamProxy.
993
994         * WebCore.gypi:
995         * platform/chromium/TraceEvent.h:
996         * platform/graphics/chromium/LayerRendererChromium.cpp:
997         (WebCore::LayerRendererChromium::create):
998         (WebCore::LayerRendererChromium::LayerRendererChromium):
999         (WebCore::LayerRendererChromium::setViewport):
1000         (WebCore::LayerRendererChromium::updateLayers):
1001         (WebCore::LayerRendererChromium::drawLayers):
1002         (WebCore::LayerRendererChromiumImpl::create):
1003         (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent):
1004         (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl):
1005         (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread):
1006         (WebCore::LayerRendererChromiumImplProxy::create):
1007         (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl):
1008         (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy):
1009         (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy):
1010         * platform/graphics/chromium/LayerRendererChromium.h:
1011         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1012         (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
1013         (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
1014         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1015         (WebCore::CCHeadsUpDisplay::currentFrameNumber):
1016         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
1017         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1018         (WebCore::CCLayerTreeHost::init):
1019         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1020         (WebCore::CCLayerTreeHost::beginCommit):
1021         (WebCore::CCLayerTreeHost::commitComplete):
1022         (WebCore::CCLayerTreeHost::animateAndLayout):
1023         (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter):
1024         (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw):
1025         (WebCore::CCLayerTreeHost::setNeedsRedraw):
1026         (WebCore::CCLayerTreeHost::updateLayers):
1027         * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
1028         (WebCore::CCLayerTreeHost::frameNumber):
1029         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
1030         (WebCore::CCLayerTreeHostCommitter::create):
1031         (WebCore::CCLayerTreeHostCommitter::commit):
1032         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
1033         (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter):
1034         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added.
1035         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1036         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
1037         (WebCore::CCLayerTreeHostImpl::beginCommit):
1038         (WebCore::CCLayerTreeHostImpl::commitComplete):
1039         (WebCore::CCLayerTreeHostImpl::drawLayers):
1040         (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw):
1041         (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
1042         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
1043         (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient):
1044         (WebCore::CCLayerTreeHostImpl::frameNumber):
1045         (WebCore::CCLayerTreeHostImpl::sourceFrameNumber):
1046         (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber):
1047         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added.
1048         (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy):
1049         (WebCore::CCLayerTreeHostImplProxy::start):
1050         (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy):
1051         (WebCore::CCLayerTreeHostImplProxy::isStarted):
1052         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw):
1053         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw):
1054         (WebCore::CCLayerTreeHostImplProxy::stop):
1055         (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
1056         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
1057         (WebCore::CCLayerTreeHostImplProxy::isMainThread):
1058         (WebCore::CCLayerTreeHostImplProxy::isCCThread):
1059         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
1060         (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
1061         (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
1062         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
1063         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
1064         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
1065         (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
1066         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added.
1067         (WebCore::CCLayerTreeHostImplProxy::host):
1068         * platform/graphics/chromium/cc/CCMainThreadTask.h:
1069         * platform/graphics/chromium/cc/CCThread.cpp:
1070         (WebCore::CCThread::runLoop):
1071         * platform/graphics/chromium/cc/CCThreadTask.h:
1072
1073 2011-06-24  Adrienne Walker  <enne@google.com>
1074
1075         Unreviewed, remove assertion about root layers in RenderLayerBacking.
1076         https://bugs.webkit.org/show_bug.cgi?id=60741
1077
1078         This was added in r89687, but somehow is not true on Safari Leopard.
1079         However, as the tests that were added with that revision are passing
1080         correctly, the assertion is most likely not correct.
1081
1082         * rendering/RenderLayerBacking.cpp:
1083         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1084
1085 2011-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
1086
1087         Reviewed by Dirk Schulze.
1088
1089         Refactor text iterator code respecting surrogate pairs from WidthIterator
1090         https://bugs.webkit.org/show_bug.cgi?id=63319
1091
1092         WidthIterator contains a surrogate pair aware text iterator that is needed in other parts of WebCore.
1093         Refactor the code into its own SurrogatePairAwareTextIterator class. It can be used like this:
1094
1095         UChar32 character = 0;
1096         unsigned clusterLength = 0;
1097
1098         SurrogatePairAwareTextIterator textIterator(myString.characters(), 0, myString.length(), myString.length());
1099         while (textIterator.consume(character, clusterLength)) {
1100             // Either clusterLength is 1 and UChar32 fits into a single UChar.
1101             // Or     clusterLength is 2 and the UChar32 has been computed by combining the high & low surrogate pairs
1102             ...
1103         
1104             textIterator.advance(clusterLength);
1105         }
1106
1107         SVGGlyphMap is the next candidate that wants to make use of SurrogatePairAwareTextIterator.
1108         Doesn't affect any tests, just refactoring.
1109
1110         * CMakeLists.txt: Add SurrogatePairAwareTextIterator.* to build.
1111         * GNUmakefile.list.am: Ditto.
1112         * WebCore.gypi: Ditto.
1113         * WebCore.pro: Ditto.
1114         * WebCore.vcproj/WebCore.vcproj: Ditto.
1115         * WebCore.xcodeproj/project.pbxproj: Ditto.
1116         * platform/graphics/SurrogatePairAwareTextIterator.cpp: Copied from platform/graphics/WidthIterator.cpp.
1117         * platform/graphics/SurrogatePairAwareTextIterator.h: Added.
1118         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
1119         * platform/graphics/WidthIterator.cpp:
1120         (WebCore::WidthIterator::advance):
1121         * platform/graphics/WidthIterator.h:
1122
1123 2011-06-24  Adrienne Walker  <enne@google.com>
1124
1125         Reviewed by Simon Fraser.
1126
1127         Incorrect RenderLayer transforms on overflow RTL pages
1128         https://bugs.webkit.org/show_bug.cgi?id=60741
1129
1130         Fix positioning of the root graphics layer for RTL pages.  The fact
1131         that the left side of the page is negative for pages with overflow is
1132         not taken into account when calculating the position.  This negative
1133         value ends up being double-counted for the root graphics layer (once
1134         in the position and once in the offset) and it shifts child layers
1135         into the wrong place.
1136
1137         Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html
1138                compositing/rtl/rtl-absolute-overflow.html
1139                compositing/rtl/rtl-absolute.html
1140                compositing/rtl/rtl-fixed-overflow-scrolled.html
1141                compositing/rtl/rtl-fixed-overflow.html
1142                compositing/rtl/rtl-fixed.html
1143                compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
1144                compositing/rtl/rtl-iframe-absolute-overflow.html
1145                compositing/rtl/rtl-iframe-absolute.html
1146                compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
1147                compositing/rtl/rtl-iframe-fixed-overflow.html
1148                compositing/rtl/rtl-iframe-fixed.html
1149                compositing/rtl/rtl-iframe-relative.html
1150                compositing/rtl/rtl-relative.html
1151
1152         * rendering/RenderLayerBacking.cpp:
1153         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1154
1155 2011-06-24  Ryosuke Niwa  <rniwa@webkit.org>
1156
1157         Reviewed by Enrica Casucci.
1158
1159         Add BeforeChildren and AfterChildren to the Position's anchor types
1160         https://bugs.webkit.org/show_bug.cgi?id=63100
1161
1162         Added PositionIsBeforeChildren and PositionIsAfterChildren to Position::AnchorType and deployed them in
1163         firstPositionInNode and lastPositionInNode.
1164
1165         These new types of positions will let us express the first and the last positions in a non-text node in O(1).
1166
1167         No new tests because there is no new behavior or feature exposed.
1168
1169         * dom/Position.cpp:
1170         (WebCore::Position::Position): Assert that the anchor type is not BeforeChildren and AfterChildren for text nodes.
1171         (WebCore::Position::containerNode): For BeforeChildren and AfterChildren, the anchor node is the container node.
1172         (WebCore::Position::computeOffsetInContainerNode): The offset in the container node is 0 for BeforeChildren and
1173         the offset in the anchor node for AfterChildren.
1174         (WebCore::Position::offsetForPositionAfterAnchor): Called by deprecatedNode; the anchor type could be AfterChildren.
1175         (WebCore::Position::parentAnchoredEquivalent): If the anchor node is before or after children, then do the trick
1176         for table and ignored contents like before or after anchor.
1177         (WebCore::Position::computeNodeBeforePosition): Returns null for BeforeChildren and returns the last child of
1178         the anchor node for AfterChildren.
1179         (WebCore::Position::computeNodeAfterPosition): Returns the first child of the anchor node for BeforeChildren
1180         (WebCore::Position::atFirstEditingPositionForNode): A position is at the last editing position if the anchor type
1181         is BeforeChildren, or the anchor type is AfterChildren or AfterAnchor and the anchor doesn't have any children.
1182         (WebCore::Position::atLastEditingPositionForNode): A position is at the last editing position if the anchor type
1183         is AfterChildren.
1184         (WebCore::Position::showAnchorTypeAndOffset): Supports BeforeChildren and AfterChildren.
1185         * dom/Position.h:
1186         (WebCore::Position::deprecatedEditingOffset): Returns m_offset if the anchor type is BeforeChildren.
1187         (WebCore::firstPositionInNode): Returns a position in offset for a text node. Otherwise returns BeforeChildren.
1188         (WebCore::lastPositionInNode): Returns a position in offset for a text node. Otherwise returns AfterChildren.
1189         * editing/CompositeEditCommand.cpp:
1190         (WebCore::CompositeEditCommand::positionOutsideTabSpan): Since the anchor node was a text node,
1191         the anchor type shouldn't be BeforeChildren or AfterChildren.
1192         * editing/DeleteSelectionCommand.cpp:
1193         (WebCore::updatePositionForNodeRemoval): Supports BeforeChildren and AfterChildren.
1194         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Calls updatePositionForNodeRemoval on m_downstremEnd
1195         when its anchor node is removed instead of manually updating the offset; also avoid calling moveToOffset
1196         on BeforeChildren or AfterChildren position.
1197         * editing/FormatBlockCommand.cpp:
1198         (WebCore::FormatBlockCommand::formatRange): Since lastParagraphInBlockNode is used to insert a placeholder
1199         after paragraphs below the block is moved into, it needs to be the position after the current last child in
1200         the block instead of after children in the block; otherwise the position will move to the end of block.
1201         * editing/VisiblePosition.cpp:
1202         (WebCore::VisiblePosition::characterAfter): Since the container node is never a text for position before/after
1203         children or before/after anchor, just return null for these anchor types.
1204
1205 2011-06-24  Dominic Cooney  <dominicc@chromium.org>
1206
1207         Reviewed by Dimitri Glazkov.
1208
1209         Convert shadow DOM-related tests to use window.internals
1210         https://bugs.webkit.org/show_bug.cgi?id=61671
1211
1212         * WebCore.exp.in: Exports for symbols used by WebCoreTestSupport.
1213         * testing/Internals.cpp: The new home of shadowRoot and friends.
1214         (WebCore::Internals::ensureShadowRoot):
1215         (WebCore::Internals::shadowRoot):
1216         (WebCore::Internals::removeShadowRoot):
1217         (WebCore::Internals::shadowPseudoId):
1218         * testing/Internals.h:
1219         * testing/Internals.idl:
1220
1221 2011-06-24  Tony Chang  <tony@chromium.org>
1222
1223         Reviewed by Darin Adler.
1224
1225         Refactor creation of primitive values in CSSParser
1226         https://bugs.webkit.org/show_bug.cgi?id=63270
1227
1228         Covered by existing tests.
1229
1230         * css/CSSParser.cpp:
1231         (WebCore::CSSParser::createPrimitiveNumericValue): Helper method for creating numeric values
1232             to keep the cast in one place.
1233         (WebCore::CSSParser::createPrimitiveStringValue): Helper method for creating string values.
1234         (WebCore::CSSParser::parseValidPrimitive):
1235         (WebCore::CSSParser::parseValue):
1236         (WebCore::CSSParser::parseWCSSInputProperty):
1237         (WebCore::CSSParser::parsePage):
1238         (WebCore::CSSParser::parseSizeParameter):
1239         (WebCore::CSSParser::parseContent):
1240         (WebCore::CSSParser::parseFillPositionX):
1241         (WebCore::CSSParser::parseFillPositionY):
1242         (WebCore::CSSParser::parseFillPositionComponent):
1243         (WebCore::CSSParser::parseFillSize):
1244         (WebCore::CSSParser::parseAnimationDelay):
1245         (WebCore::CSSParser::parseAnimationDuration):
1246         (WebCore::CSSParser::parseAnimationIterationCount):
1247         (WebCore::CSSParser::parseAnimationName):
1248         (WebCore::CSSParser::parseTransformOriginShorthand):
1249         (WebCore::CSSParser::parseDashboardRegions):
1250         (WebCore::CSSParser::parseCounterContent):
1251         (WebCore::CSSParser::parseShape):
1252         (WebCore::CSSParser::parseFont):
1253         (WebCore::CSSParser::parseReflect):
1254         (WebCore::CSSParser::parseBorderRadius):
1255         (WebCore::CSSParser::parseCounter):
1256         (WebCore::CSSParser::parseDeprecatedGradient):
1257         (WebCore::CSSParser::parseLinearGradient):
1258         (WebCore::CSSParser::parseRadialGradient):
1259         (WebCore::CSSParser::parseGradientColorStops):
1260         (WebCore::CSSParser::parseTransform):
1261         (WebCore::CSSParser::parseTransformOrigin):
1262         (WebCore::CSSParser::parseTextEmphasisStyle):
1263         * css/CSSParser.h:
1264         * css/CSSPrimitiveValueCache.h:
1265         (WebCore::CSSPrimitiveValueCache::createValue): pass String by const reference
1266
1267 2011-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1268
1269         Reviewed by Martin Robinson.
1270
1271         [GTK] Fix runtime critical warnings in WebKit2
1272         https://bugs.webkit.org/show_bug.cgi?id=63256
1273
1274         Check whether there's a view widget before trying to use it in
1275         PlatformScreenGtk. If there isn't a view widget, which is the case
1276         in WebKit2, try to use the default GdkScreen and monitor.
1277
1278         * platform/gtk/PlatformScreenGtk.cpp:
1279         (WebCore::getToplevel): Helper function to get the toplevel
1280         widget.
1281         (WebCore::getVisual): Use getToplevel().
1282         (WebCore::getScreen): Helper funtion to get the screen of a
1283         widget.
1284         (WebCore::screenRect): Use getToplevel() and getScreen().
1285
1286 2011-06-24  Yuta Kitamura  <yutak@chromium.org>
1287
1288         Reviewed by Adam Barth.
1289
1290         WebSocket: Add run-time flag for new HyBi protocol
1291         https://bugs.webkit.org/show_bug.cgi?id=60348
1292
1293         Add a flag in Setting so that WebSocket protocols can be switched
1294         dynamically. The protocol we have implemented so far is based on
1295         older Hixie-76 specification. A new protocol is being discussed in
1296         IETF HyBi working group, and I'm planning to implement the new protocol
1297         behind this Settings flag.
1298
1299         I will add a method to LayoutTestController which flips this flag in
1300         a later patch. In this way, we can put tests for both protocols in
1301         the same place and test implementation for both protocols at the same time.
1302
1303         This patch only adds a flag. The flag is not used yet, thus there is
1304         no change in functionality. Therefore, no tests were added.
1305
1306         * page/Settings.cpp:
1307         (WebCore::Settings::Settings):
1308         * page/Settings.h:
1309         (WebCore::Settings::setUseHixie76WebSocketProtocol):
1310         (WebCore::Settings::useHixie76WebSocketProtocol):
1311
1312 2011-06-23  Mikhail Naganov  <mnaganov@chromium.org>
1313
1314         Reviewed by Pavel Feldman.
1315
1316         Web Inspector: [Chromium] Shorten DOMWindow URLs in heap profiles.
1317         https://bugs.webkit.org/show_bug.cgi?id=63238
1318
1319         * inspector/front-end/DetailedHeapshotGridNodes.js:
1320         (WebInspector.HeapSnapshotGridNode.prototype.hasHoverMessage.false.hoverMessage):
1321         (WebInspector.HeapSnapshotGenericObjectNode):
1322         (WebInspector.HeapSnapshotGenericObjectNode.prototype.hoverMessage):
1323         (WebInspector.HeapSnapshotGenericObjectNode.prototype._updateHasChildren):
1324         (WebInspector.HeapSnapshotGenericObjectNode.prototype.isDOMWindow):
1325         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
1326         * inspector/front-end/DetailedHeapshotView.js:
1327         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext.pathFound):
1328         (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor):
1329         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup.displayString):
1330         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
1331         * inspector/front-end/utilities.js:
1332         ():
1333
1334 2011-06-24  Vsevolod Vlasov  <vsevik@chromium.org>
1335
1336         Reviewed by Pavel Feldman.
1337
1338         Web Inspector: HTML preview should delete old iframe on show().
1339         https://bugs.webkit.org/show_bug.cgi?id=63170
1340
1341         * inspector/front-end/ResourceHTMLView.js:
1342         (WebInspector.ResourceHTMLView.prototype._createIFrame):
1343         * inspector/front-end/ResourcePreviewView.js:
1344         (WebInspector.ResourcePreviewView.prototype.contentLoaded):
1345
1346 2011-06-24  Dirk Schulze  <krit@webkit.org>
1347
1348         Reviewed by Nikolas Zimmermann.
1349
1350         Convert AnimatedString to SVGAnimatorFactory concept
1351         https://bugs.webkit.org/show_bug.cgi?id=63296
1352
1353         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
1354         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGString.
1355
1356         No new tests added. No change of functionality.
1357
1358         * CMakeLists.txt: Added new file to build system.
1359         * GNUmakefile.list.am: Ditto.
1360         * WebCore.gypi: Ditto.
1361         * WebCore.pro: Ditto.
1362         * WebCore.xcodeproj/project.pbxproj: Ditto.
1363         * svg/SVGAllInOne.cpp: Ditto.
1364         * svg/SVGAnimateElement.cpp:
1365         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1366         (WebCore::SVGAnimateElement::calculateFromAndToValues):
1367         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1368         (WebCore::SVGAnimateElement::resetToBaseValue):
1369         (WebCore::SVGAnimateElement::applyResultsToTarget):
1370         (WebCore::SVGAnimateElement::calculateDistance):
1371         * svg/SVGAnimateElement.h:
1372         * svg/SVGAnimatedString.cpp: Added. Animator for SVGString.
1373         (WebCore::SVGAnimatedStringAnimator::SVGAnimatedStringAnimator):
1374         (WebCore::SVGAnimatedStringAnimator::constructFromString):
1375         (WebCore::SVGAnimatedStringAnimator::calculateFromAndToValues):
1376         (WebCore::SVGAnimatedStringAnimator::calculateFromAndByValues):
1377         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
1378         (WebCore::SVGAnimatedStringAnimator::calculateDistance):
1379         * svg/SVGAnimatedString.h:
1380         (WebCore::SVGAnimatedStringAnimator::~SVGAnimatedStringAnimator):
1381         * svg/SVGAnimatedType.cpp:
1382         (WebCore::SVGAnimatedType::~SVGAnimatedType):
1383         (WebCore::SVGAnimatedType::createString):
1384         (WebCore::SVGAnimatedType::string):
1385         (WebCore::SVGAnimatedType::valueAsString):
1386         (WebCore::SVGAnimatedType::setValueAsString):
1387         * svg/SVGAnimatedType.h:
1388         * svg/SVGAnimatorFactory.h:
1389         (WebCore::SVGAnimatorFactory::create):
1390
1391 2011-06-24  Mario Sanchez Prada  <msanchez@igalia.com>
1392
1393         Reviewed by Chris Fleizach.
1394
1395         [GTK] Consider rows being ignored when adding children to tables
1396         https://bugs.webkit.org/show_bug.cgi?id=62718
1397
1398         Hide row objects in tables in GTK's accessibility wrapper.
1399
1400         This is a different approach in the way WebCore's accessible
1401         rows are exposed to assistive technologies in the GTK port,
1402         since from now on those objects are kept in WebCore (they do not
1403         declare to ignore accessibility) and just bypassed in the mapping
1404         to ATK, allowing to hide them in the ATK hierarchy while, at the
1405         same time, keeping them internally to be able to provide enough
1406         information to determine tables related information, such as rows
1407         counting or finding an cell for specific coordinates.
1408
1409         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1410         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1411         Do not ignore accessibility for table rows here.
1412
1413         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1414         (webkit_accessible_get_parent): Bypass rows when needed.
1415         (getNChildrenForTable): New, find the number of children for a
1416         table, which will be the addition of all cells for its rows.
1417         (webkit_accessible_get_n_children): Call to getNChildrenForTable
1418         for accessibility tables if needed.
1419         (getChildForTable): New, bypass rows when needed, retrieving
1420         cells as if they were direct children for tables.
1421         (webkit_accessible_ref_child): Call to refChildForTable if needed.
1422         (getIndexInParentForCellInRow): New, get the index for a given
1423         cell in its parent table, considering other rows' cells.
1424         (webkit_accessible_get_index_in_parent): Call to
1425         getIndexInParentForCellInRow if needed.
1426
1427 2011-06-24  Andrey Kosyakov  <caseq@chromium.org>
1428
1429         Reviewed by Yury Semikhatsky.
1430
1431         Web Inspector: extension panel iframes do not span entire panel client area
1432         https://bugs.webkit.org/show_bug.cgi?id=63165
1433
1434         * inspector/front-end/ExtensionServer.js:
1435         (WebInspector.ExtensionServer.prototype._onCreatePanel):
1436         (WebInspector.ExtensionServer.prototype.createClientIframe):
1437         * inspector/front-end/inspector.css:
1438         (iframe.extension):
1439         (iframe.panel.extension):
1440
1441 2011-06-24  David Grogan  <dgrogan@chromium.org>
1442
1443         Reviewed by Pavel Feldman.
1444
1445         Web Inspector: [REGRESSION r86838] line numbers do not scroll when script paused
1446         https://bugs.webkit.org/show_bug.cgi?id=61653
1447
1448         roll out r86838
1449
1450         No new tests - refactoring.
1451
1452         * dom/Document.h:
1453         * dom/EventQueue.cpp:
1454         (WebCore::EventQueueTimer::EventQueueTimer):
1455         (WebCore::EventQueueTimer::fired):
1456         (WebCore::EventQueue::create):
1457         (WebCore::EventQueue::EventQueue):
1458         (WebCore::EventQueue::~EventQueue):
1459         (WebCore::EventQueue::enqueueEvent):
1460         (WebCore::EventQueue::cancelEvent):
1461         (WebCore::EventQueue::cancelQueuedEvents):
1462         (WebCore::EventQueue::pendingEventTimerFired):
1463         (WebCore::EventQueue::dispatchEvent):
1464         * dom/EventQueue.h:
1465
1466 2011-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1467
1468         Unreviewed, rolling out r89594.
1469         http://trac.webkit.org/changeset/89594
1470         https://bugs.webkit.org/show_bug.cgi?id=63316
1471
1472         It broke 5 tests on the Qt bot (Requested by Ossy_DC on
1473         #webkit).
1474
1475         * WebCore.exp.in:
1476         * icu/unicode/uscript.h:
1477         * page/Settings.cpp:
1478         (WebCore::Settings::setStandardFontFamily):
1479         (WebCore::Settings::setFixedFontFamily):
1480         (WebCore::Settings::setSerifFontFamily):
1481         (WebCore::Settings::setSansSerifFontFamily):
1482         (WebCore::Settings::setCursiveFontFamily):
1483         (WebCore::Settings::setFantasyFontFamily):
1484         * page/Settings.h:
1485         (WebCore::Settings::standardFontFamily):
1486         (WebCore::Settings::fixedFontFamily):
1487         (WebCore::Settings::serifFontFamily):
1488         (WebCore::Settings::sansSerifFontFamily):
1489         (WebCore::Settings::cursiveFontFamily):
1490         (WebCore::Settings::fantasyFontFamily):
1491
1492 2011-06-23  Tony Chang  <tony@chromium.org>
1493
1494         Reviewed by Kent Tamura.
1495
1496         Pass Strings by const reference in bindings code
1497         https://bugs.webkit.org/show_bug.cgi?id=63302
1498
1499         Note that since Strings hold a RefPtr to StringImpl, passing Strings
1500         by value isn't horrible, but it does cause ref count churn and using
1501         const references is more consistent with the rest of the code base.
1502
1503         * bindings/generic/BindingSecurity.h:
1504         (WebCore::::allowSettingFrameSrcToJavascriptUrl):
1505         (WebCore::::allowSettingSrcToJavascriptURL):
1506         * bindings/js/SerializedScriptValue.cpp:
1507         (WebCore::CloneSerializer::serialize):
1508         (WebCore::SerializedScriptValue::create):
1509         * bindings/js/SerializedScriptValue.h:
1510         * bindings/v8/SerializedScriptValue.cpp:
1511         (WebCore::SerializedScriptValue::createFromWire):
1512         (WebCore::SerializedScriptValue::create):
1513         (WebCore::SerializedScriptValue::SerializedScriptValue):
1514         * bindings/v8/SerializedScriptValue.h:
1515         * bindings/v8/V8Binding.h:
1516         (WebCore::V8ParameterBase::setString):
1517
1518 2011-06-23  Yury Semikhatsky  <yurys@chromium.org>
1519
1520         Reviewed by Pavel Feldman.
1521
1522         [Chromium] Web Inspector: provide context menu item for enabling native worker inspection
1523         https://bugs.webkit.org/show_bug.cgi?id=63258
1524
1525         Added context menu checkbox item that allows to enable inspection of
1526         native workers. The value will be persisted as other inspector settings
1527         and will be restored after frontend/breowser reopening.
1528
1529         * inspector/Inspector.json:
1530         * inspector/InspectorController.cpp:
1531         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1532         * inspector/InspectorInstrumentation.h:
1533         (WebCore::InspectorInstrumentation::didStartWorkerContext):
1534         * inspector/InspectorWorkerAgent.cpp:
1535         (WebCore::InspectorWorkerAgent::setFrontend):
1536         (WebCore::InspectorWorkerAgent::restore):
1537         (WebCore::InspectorWorkerAgent::setWorkerInspectionEnabled):
1538         * inspector/InspectorWorkerAgent.h:
1539         * inspector/front-end/ScriptsPanel.js:
1540         (WebInspector.ScriptsPanel):
1541         (WebInspector.ScriptsPanel.prototype.reset):
1542         (WebInspector.ScriptsPanel.prototype._toggleFormatSourceFiles):
1543         (WebInspector.ScriptsPanel.prototype._contextMenu.enableWorkerInspection):
1544         (WebInspector.ScriptsPanel.prototype._contextMenu):
1545         * inspector/front-end/Settings.js:
1546         (WebInspector.Settings):
1547         * inspector/front-end/inspector.js:
1548         (WebInspector.didCreateWorker):
1549         (WebInspector.didDestroyWorker):
1550         * workers/Worker.cpp:
1551         (WebCore::Worker::notifyFinished):
1552
1553 2011-06-23  Simon Fraser  <simon.fraser@apple.com>
1554
1555         Reviewed by Dan Bernstein.
1556
1557         Need to turn off default animations for anchorPointZ in PlatformCALayer
1558         https://bugs.webkit.org/show_bug.cgi?id=63159
1559         
1560         When the z-component of transform-origin changed, we ran an implicit
1561         animation of anchorPointZ on the CALayer. Turn this off.
1562
1563         Test: transforms/3d/general/transform-origin-z-change.html
1564
1565         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1566         (nullActionsDictionary):
1567
1568 2011-06-23  Zhenyao Mo  <zmo@google.com>
1569
1570         Reviewed by Kenneth Russell.
1571
1572         Limit WebGL internal drawingBuffer size to 4k x 4k
1573         https://bugs.webkit.org/show_bug.cgi?id=63304
1574
1575         * html/canvas/WebGLRenderingContext.cpp:
1576         (WebCore::WebGLRenderingContext::reshape): Limit drawing buffer size to 4k x 4k.
1577
1578 2011-06-20  MORITA Hajime  <morrita@google.com>
1579
1580         Reviewed by Dimitri Glazkov.
1581
1582         [ShadowContentElement] should layout child whitespace between span.
1583         https://bugs.webkit.org/show_bug.cgi?id=62202
1584
1585         NodeRenderingContext::nextRenderer() and previousRenderer()
1586         ignored forwarded content tree hierarchies and used render-object
1587         hierarchies instead, that caused some wrong Text node rendering.
1588         
1589         This change uses ShadowContentElement::m_inclusions for the lookup.
1590         In this way, these methods can reflect hierarchies of forward light tree.
1591         
1592         * dom/NodeRenderingContext.cpp:
1593         (WebCore::NodeRenderingContext::NodeRenderingContext):
1594         (WebCore::nextRendererOf): Added. This traverses content element's children for searching neighboring renderer.
1595         (WebCore::previousRendererOf): Added. This traverses content element's children for searching neighboring renderer.
1596         (WebCore::NodeRenderingContext::nextRenderer):
1597         (WebCore::NodeRenderingContext::previousRenderer):
1598         * dom/NodeRenderingContext.h:
1599         * dom/ShadowContentElement.h:
1600         (ShadowContentElement::inclusionIndexOf): Added.
1601         * dom/ShadowContentSelector.cpp:
1602         (WebCore::ShadowContentSelector::activeElement):
1603         * dom/ShadowContentSelector.h:
1604         * dom/ShadowRoot.cpp:
1605         (WebCore::ShadowRoot::activeContentElement):
1606         * dom/ShadowRoot.h:
1607         * rendering/RenderTreeAsText.cpp: 
1608         (WebCore::externalRepresentation): Fixed an apparent bug introduced at r89230.
1609
1610 2011-05-25  James Robinson  <jamesr@chromium.org>
1611
1612         Reviewed by Kenneth Russell.
1613
1614         [chromium] Fix ownership of PlatformImage for ImageLayerChromiums
1615         https://bugs.webkit.org/show_bug.cgi?id=61099
1616
1617         For a composited image, both the ImageLayerChromium and its associated LayerTilerChromium need access to a
1618         PlatformImage - the ImageLayerChromium has to update the PlatformImage's contents and the LayerTilerChromium has
1619         to upload pixels from it.  This patch makes the ImageLayerTextureUpdater have exclusive ownership of the
1620         PlatformImage and moves ownership of the LayerTextureUpdater from the LayerTilerChromium to the owner of the
1621         tiler.  The updater is passed in as a parameter to the relevant tiler calls.
1622
1623         Patch also fixes a number of minor style issues (missing explicit keyword on constructor, etc).
1624
1625         Refactor only, no new tests.
1626
1627         * platform/graphics/chromium/ContentLayerChromium.cpp:
1628         (WebCore::ContentLayerPainter::create):
1629         (WebCore::ContentLayerPainter::ContentLayerPainter):
1630         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1631         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
1632         (WebCore::ContentLayerChromium::draw):
1633         (WebCore::ContentLayerChromium::createTilerIfNeeded):
1634         (WebCore::ContentLayerChromium::updateCompositorResources):
1635         * platform/graphics/chromium/ContentLayerChromium.h:
1636         * platform/graphics/chromium/ImageLayerChromium.cpp:
1637         (WebCore::ImageLayerTextureUpdater::create):
1638         (WebCore::ImageLayerTextureUpdater::updateFromImage):
1639         (WebCore::ImageLayerTextureUpdater::imageSize):
1640         (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater):
1641         (WebCore::ImageLayerChromium::~ImageLayerChromium):
1642         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1643         (WebCore::ImageLayerChromium::updateCompositorResources):
1644         (WebCore::ImageLayerChromium::setLayerRenderer):
1645         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
1646         (WebCore::ImageLayerChromium::layerBounds):
1647         * platform/graphics/chromium/ImageLayerChromium.h:
1648         * platform/graphics/chromium/LayerRendererChromium.cpp:
1649         (WebCore::LayerRendererChromium::LayerRendererChromium):
1650         (WebCore::LayerRendererChromium::updateRootLayerContents):
1651         (WebCore::LayerRendererChromium::drawRootLayer):
1652         (WebCore::LayerRendererChromium::updateLayers):
1653         * platform/graphics/chromium/LayerRendererChromium.h:
1654         * platform/graphics/chromium/LayerTextureUpdater.h:
1655         (WebCore::LayerTextureUpdater::LayerTextureUpdater):
1656         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1657         (WebCore::LayerTextureUpdaterBitmap::create):
1658         (WebCore::LayerTextureUpdaterSkPicture::create):
1659         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1660         * platform/graphics/chromium/LayerTilerChromium.cpp:
1661         (WebCore::LayerTilerChromium::create):
1662         (WebCore::LayerTilerChromium::LayerTilerChromium):
1663         (WebCore::LayerTilerChromium::prepareToUpdate):
1664         (WebCore::LayerTilerChromium::updateRect):
1665         (WebCore::LayerTilerChromium::draw):
1666         * platform/graphics/chromium/LayerTilerChromium.h:
1667
1668 2011-06-23  Adrienne Walker  <enne@google.com>
1669
1670         Unreviewed, rolling out r89632 and r89640.
1671         http://trac.webkit.org/changeset/89632
1672         http://trac.webkit.org/changeset/89640
1673         https://bugs.webkit.org/show_bug.cgi?id=60741
1674
1675         Breaks ancestor-overflow-change unexpectedly
1676
1677         * rendering/RenderLayerBacking.cpp:
1678         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1679
1680 2011-06-23  John Bates  <jbates@google.com>
1681
1682         Reviewed by James Robinson.
1683
1684         Fix latch deadlock when GPU process crashes or context is lost.
1685         https://bugs.webkit.org/show_bug.cgi?id=63189
1686         The main bug fix is to only set/wait latches if the child context has no errors.
1687         Additionally, the LayerChromium classes needed to be modified to not continue drawing when
1688         their corresponding contexts have errors. Otherwise, they would draw with invalid texture ids.
1689
1690         Test: open particles WebGL demo in chrome, kill GPU process from Task Manager; observe no deadlock.
1691
1692         * platform/graphics/chromium/LayerRendererChromium.cpp:
1693         (WebCore::LayerRendererChromium::LayerRendererChromium):
1694         (WebCore::LayerRendererChromium::updateAndDrawLayers):
1695         (WebCore::LayerRendererChromium::updateLayers):
1696         (WebCore::LayerRendererChromium::isCompositorContextLost):
1697         * platform/graphics/chromium/LayerRendererChromium.h:
1698         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1699         (WebCore::WebGLLayerChromium::drawsContent):
1700         (WebCore::WebGLLayerChromium::updateCompositorResources):
1701         (WebCore::WebGLLayerChromium::setContext):
1702         * platform/graphics/chromium/WebGLLayerChromium.h:
1703         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1704         (WebCore::Canvas2DLayerChromium::drawsContent):
1705         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1706
1707 2011-06-23  Alok Priyadarshi  <alokp@chromium.org>
1708
1709         Reviewed by James Robinson.
1710
1711         [chromium] Red and Blue channels are swapped in images with accelerated drawing
1712         https://bugs.webkit.org/show_bug.cgi?id=61442
1713
1714         We were uploading BGRA pixels into RGBA textures and swapping the components in the pixel shader.
1715         This strategy does not work with accelerated drawing because we are directly rendering to the texture, not uploading pixels.
1716         This patch uses BGRA textures if available. If not it falls back to the original scheme of swapping the components in the pixel shader. 
1717
1718         Tests: compositing/color-matching/image-color-matching.html (existing)
1719
1720         * WebCore.gypi:
1721         * platform/graphics/chromium/ImageLayerChromium.cpp:
1722         (WebCore::ImageLayerTextureUpdater::sampledTexelFormat):
1723         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1724         * platform/graphics/chromium/LayerRendererChromium.cpp:
1725         (WebCore::LayerRendererChromium::LayerRendererChromium):
1726         (WebCore::LayerRendererChromium::skiaContext):
1727         (WebCore::LayerRendererChromium::tilerProgram):
1728         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
1729         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1730         * platform/graphics/chromium/LayerRendererChromium.h:
1731         * platform/graphics/chromium/LayerTexture.h:
1732         (WebCore::LayerTexture::format):
1733         * platform/graphics/chromium/LayerTextureSubImage.cpp:
1734         (WebCore::LayerTextureSubImage::upload):
1735         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1736         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1737         * platform/graphics/chromium/LayerTextureSubImage.h:
1738         * platform/graphics/chromium/LayerTextureUpdater.h:
1739         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1740         (WebCore::LayerTextureUpdaterBitmap::sampledTexelFormat):
1741         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1742         (WebCore::LayerTextureUpdaterSkPicture::sampledTexelFormat):
1743         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
1744         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1745         * platform/graphics/chromium/LayerTilerChromium.cpp:
1746         (WebCore::LayerTilerChromium::LayerTilerChromium):
1747         (WebCore::LayerTilerChromium::prepareToUpdate):
1748         (WebCore::LayerTilerChromium::updateRect):
1749         (WebCore::LayerTilerChromium::draw):
1750         (WebCore::LayerTilerChromium::growLayerToContain):
1751         (WebCore::LayerTilerChromium::drawTiles):
1752         (WebCore::LayerTilerChromium::drawTexturedQuad):
1753         * platform/graphics/chromium/LayerTilerChromium.h:
1754         * platform/graphics/chromium/PlatformColor.h: Added.
1755         (WebCore::PlatformColor::format):
1756         (WebCore::PlatformColor::bestTextureFormat):
1757         (WebCore::PlatformColor::sameComponentOrder):
1758         * platform/graphics/chromium/ShaderChromium.cpp:
1759         (WebCore::FragmentShaderRGBATexSwizzleAlpha::getShaderString):
1760         * platform/graphics/chromium/ShaderChromium.h:
1761         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1762
1763 2011-06-23  Adrienne Walker  <enne@google.com>
1764
1765         Reviewed by Simon Fraser.
1766
1767         Incorrect RenderLayer transforms on overflow RTL pages
1768         https://bugs.webkit.org/show_bug.cgi?id=60741
1769
1770         Fix positioning of the root graphics layer for RTL pages.  The fact
1771         that the left side of the page is negative for pages with overflow is
1772         not taken into account when calculating the position.  This negative
1773         value ends up being double-counted for the root graphics layer (once
1774         in the position and once in the offset) and it shifts child layers
1775         into the wrong place.
1776
1777         Tests: compositing/rtl/rtl-absolute-overflow-scrolled.html
1778                compositing/rtl/rtl-absolute-overflow.html
1779                compositing/rtl/rtl-absolute.html
1780                compositing/rtl/rtl-fixed-overflow-scrolled.html
1781                compositing/rtl/rtl-fixed-overflow.html
1782                compositing/rtl/rtl-fixed.html
1783                compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html
1784                compositing/rtl/rtl-iframe-absolute-overflow.html
1785                compositing/rtl/rtl-iframe-absolute.html
1786                compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html
1787                compositing/rtl/rtl-iframe-fixed-overflow.html
1788                compositing/rtl/rtl-iframe-fixed.html
1789                compositing/rtl/rtl-iframe-relative.html
1790                compositing/rtl/rtl-relative.html
1791
1792         * rendering/RenderLayerBacking.cpp:
1793         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1794
1795 2011-06-23  Emil A Eklund  <eae@chromium.org>
1796
1797         Reviewed by Eric Seidel.
1798
1799         FloatRect should implement the same methods as IntRect
1800         https://bugs.webkit.org/show_bug.cgi?id=63273
1801         
1802         Add missing methods from IntRect to FloatRect in preparation for moving
1803         the rendering tree over to floats.
1804
1805         * platform/graphics/FloatPoint.h:
1806         (WebCore::FloatPoint::expandedTo):
1807         (WebCore::FloatPoint::transposedPoint):
1808         * platform/graphics/FloatRect.h:
1809         (WebCore::FloatRect::move):
1810         (WebCore::FloatRect::expand):
1811         (WebCore::FloatRect::contract):
1812         (WebCore::FloatRect::shiftXEdgeTo):
1813         (WebCore::FloatRect::shiftMaxXEdgeTo):
1814         (WebCore::FloatRect::shiftYEdgeTo):
1815         (WebCore::FloatRect::shiftMaxYEdgeTo):
1816         (WebCore::FloatRect::minXMinYCorner):
1817         (WebCore::FloatRect::maxXMinYCorner):
1818         (WebCore::FloatRect::minXMaxYCorner):
1819         (WebCore::FloatRect::maxXMaxYCorner):
1820         (WebCore::FloatRect::transposedRect):
1821         * platform/graphics/FloatSize.h:
1822         (WebCore::FloatSize::expand):
1823         (WebCore::FloatSize::transposedSize):
1824
1825 2011-06-23  Emil A Eklund  <eae@chromium.org>
1826
1827         Reviewed by Darin Adler.
1828
1829         input/textarea onchange doesn't fire if value is set in key listener
1830         https://bugs.webkit.org/show_bug.cgi?id=63092
1831
1832         Change setValue implementation of HTMLInputElement and HTMLTextAreaElement to
1833         not call setTextAsOfLastFormControlChangeEvent unless the value truly changed.
1834         Thus element.value = element.value will no longer reset the state 
1835         m_textAsOfLastFormControlChangeEvent field and suppress the change event.
1836
1837         Test: fast/events/onchange-setvalue.html
1838
1839         * html/HTMLInputElement.cpp:
1840         (WebCore::HTMLInputElement::setValue):
1841         * html/HTMLTextAreaElement.cpp:
1842         (WebCore::HTMLTextAreaElement::setValue):
1843         (WebCore::HTMLTextAreaElement::setNonDirtyValue):
1844         (WebCore::HTMLTextAreaElement::setValueCommon):
1845
1846 2011-06-23  Alexis Menard  <alexis.menard@openbossa.org>
1847
1848         Reviewed by Eric Carlson.
1849
1850         [Qt] Implement fullscreen support on Mac with the QuickTime backend.
1851         https://bugs.webkit.org/show_bug.cgi?id=61728
1852
1853         Implement fullscreen support for Qt when using the QuickTime backend.
1854         We mostly use what is already done for the Mac port.
1855
1856         * DerivedSources.pro: We use the mac files and they have <WebCore/x> type
1857         of includes. We need to generate those headers.
1858         * WebCore.pro:
1859         * platform/mac/WebVideoFullscreenController.h:
1860         * platform/mac/WebVideoFullscreenController.mm:
1861         * platform/mac/WebVideoFullscreenHUDWindowController.h:
1862         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1863         * platform/qt/WebCoreSystemInterface.h:
1864         * platform/qt/WebCoreSystemInterface.mm:
1865
1866 2011-06-23  Darin Adler  <darin@apple.com>
1867
1868         Reviewed by Ryosuke Niwa.
1869
1870         RefPtr misused as argument type in a few classes
1871         https://bugs.webkit.org/show_bug.cgi?id=62955
1872
1873         * dom/DataTransferItem.cpp:
1874         (WebCore::DataTransferItem::DataTransferItem):
1875         * dom/DataTransferItem.h:
1876         * dom/DataTransferItems.cpp:
1877         (WebCore::DataTransferItems::DataTransferItems):
1878         * dom/DataTransferItems.h:
1879         * editing/CompositeEditCommand.cpp:
1880         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
1881         * editing/CompositeEditCommand.h:
1882         * page/WebKitAnimationList.cpp:
1883         (WebCore::WebKitAnimationList::append):
1884         (WebCore::WebKitAnimationList::insertAnimation):
1885         * page/WebKitAnimationList.h:
1886         * svg/graphics/filters/SVGFEImage.cpp:
1887         (WebCore::FEImage::FEImage):
1888         (WebCore::FEImage::create):
1889         * svg/graphics/filters/SVGFEImage.h:
1890         * svg/graphics/filters/SVGFilterBuilder.cpp:
1891         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
1892         (WebCore::SVGFilterBuilder::add):
1893         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
1894         * svg/graphics/filters/SVGFilterBuilder.h:
1895         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1896         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
1897         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
1898         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
1899         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
1900         * websockets/ThreadableWebSocketChannelClientWrapper.h:
1901         * websockets/WorkerThreadableWebSocketChannel.cpp:
1902         (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
1903         (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel):
1904         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
1905         * websockets/WorkerThreadableWebSocketChannel.h:
1906         Use PassRefPtr or raw pointer as appropriate for RefPtr arguments.
1907
1908 2011-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1909
1910         Unreviewed, rolling out r89591 and r89593.
1911         http://trac.webkit.org/changeset/89591
1912         http://trac.webkit.org/changeset/89593
1913         https://bugs.webkit.org/show_bug.cgi?id=63279
1914
1915         Caused test crashes in SL and Chromium (Requested by dimich_
1916         on #webkit).
1917
1918         * accessibility/AXObjectCache.cpp:
1919         (WebCore::AXObjectCache::AXObjectCache):
1920         (WebCore::AXObjectCache::remove):
1921         (WebCore::AXObjectCache::childrenChanged):
1922         * accessibility/AXObjectCache.h:
1923         * accessibility/AccessibilityMenuList.cpp:
1924         (WebCore::AccessibilityMenuList::childrenChanged):
1925         * accessibility/AccessibilityMenuList.h:
1926         * accessibility/AccessibilityMenuListPopup.cpp:
1927         (WebCore::AccessibilityMenuListPopup::childrenChanged):
1928         * accessibility/AccessibilityMenuListPopup.h:
1929         * accessibility/AccessibilityObject.h:
1930         (WebCore::AccessibilityObject::childrenChanged):
1931         * accessibility/AccessibilityRenderObject.cpp:
1932         (WebCore::startOfContinuations):
1933         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
1934         (WebCore::AccessibilityRenderObject::childrenChanged):
1935         * accessibility/AccessibilityRenderObject.h:
1936
1937 2011-06-23  Andreas Kling  <kling@webkit.org>
1938
1939         Reviewed by Benjamin Poulain.
1940
1941         [Qt] Unbreak simple font fast-path after QRawFont API changes.
1942         https://bugs.webkit.org/show_bug.cgi?id=63272
1943
1944         In the Qt 4.8 branch, the QGlyphs class has been renamed to
1945         QGlyphRun, and some other small things have been tweaked.
1946
1947         * WebCore.pro:
1948         * platform/graphics/qt/FontCacheQt.cpp:
1949         (WebCore::rawFontForCharacters):
1950         * platform/graphics/qt/FontQt.cpp:
1951         (WebCore::Font::drawGlyphs):
1952
1953 2011-06-23  Tony Chang  <tony@chromium.org>
1954
1955         Reviewed by Andreas Kling.
1956
1957         Pass Strings as const references in NetworkResourcesData.h
1958         https://bugs.webkit.org/show_bug.cgi?id=63271
1959
1960         * inspector/NetworkResourcesData.h:
1961         (WebCore::NetworkResourcesData::ResourceData::setFrameId):
1962         (WebCore::NetworkResourcesData::ResourceData::setUrl):
1963         (WebCore::NetworkResourcesData::ResourceData::setTextEncodingName):
1964
1965 2011-06-23  Jay Civelli  <jcivelli@chromium.org>
1966
1967         Reviewed by Adam Barth.
1968
1969         Fixing the SharedBufferChunkReader API so it works correctly with
1970         binary data (non printable characters).
1971         Also adding a method to peek at the data (this is needed for MHTML
1972         with binary parts).
1973         https://bugs.webkit.org/show_bug.cgi?id=63231
1974
1975         * loader/archive/mhtml/MHTMLParser.cpp:
1976         (WebCore::skipLinesUntilBoundaryFound):
1977         (WebCore::MHTMLParser::parseNextPart):
1978         * loader/archive/mhtml/MHTMLParser.h:
1979         * platform/SharedBufferChunkReader.cpp:
1980         (WebCore::SharedBufferChunkReader::SharedBufferChunkReader):
1981         (WebCore::SharedBufferChunkReader::setSeparator):
1982         (WebCore::SharedBufferChunkReader::nextChunk):
1983         (WebCore::SharedBufferChunkReader::nextChunkAsUTF8StringWithLatin1Fallback):
1984         (WebCore::SharedBufferChunkReader::peek):
1985         * platform/SharedBufferChunkReader.h:
1986         * platform/network/MIMEHeader.cpp:
1987         (WebCore::retrieveKeyValuePairs):
1988
1989 2011-06-23  Nate Chapin  <japhet@chromium.org>
1990
1991         Unreviewed.
1992
1993         Revert production code part of r89503, since it's causing
1994         crashes on WebKit2/mac and failures on qt.
1995
1996         * dom/Document.cpp:
1997         (WebCore::Document::Document):
1998         (WebCore::Document::dispatchWindowLoadEvent):
1999         * dom/Document.h:
2000         (WebCore::Document::processingLoadEvent):
2001         * loader/DocumentLoader.cpp:
2002         (WebCore::DocumentLoader::isLoadingInAPISense):
2003
2004 2011-06-23  Young Han Lee  <joybro@company100.net>
2005
2006         Reviewed by Simon Fraser.
2007
2008         runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count.
2009         https://bugs.webkit.org/show_bug.cgi?id=63152
2010
2011         The pausing conditions are modified. Now it accepts the infinite-iteration-count,
2012         but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation.
2013         
2014         Test: animations/keyframes-infinite-iterations.html
2015
2016         * page/animation/CompositeAnimation.cpp:
2017         (WebCore::CompositeAnimation::pauseAnimationAtTime):
2018
2019 2011-06-23  Abhishek Arya  <inferno@chromium.org>
2020
2021         Reviewed by Adam Barth.
2022
2023         RefPtr m_style in MediaQueryEvaluator in case of callers like
2024         MediaQueryMatcher::prepareEvaluator that do not retain its reference.
2025         https://bugs.webkit.org/show_bug.cgi?id=63264
2026
2027         Test: fast/css/media-query-evaluator-crash.html
2028
2029         * css/MediaQueryEvaluator.cpp:
2030         (WebCore::MediaQueryEvaluator::eval):
2031         * css/MediaQueryEvaluator.h:
2032
2033 2011-06-23  Jungshik Shin  <jshin@chromium.org>
2034
2035         Reviewed by Alexey Proskuryakov.
2036
2037         Allow generic font family settings per script code.
2038         https://bugs.webkit.org/show_bug.cgi?id=20797
2039
2040         Make generic font family getters/setters accept an additional
2041         argument (script code). It has a default value so that if an embedder
2042         does not have/want a per-script font family setting, call-sites
2043         don't have to be changed.
2044         This is to prepare for fixing bug 10874 (font selection is not
2045         language-dependent) and bug 18085.
2046
2047         uscript.h has been updated to that of ICU 3.6 (the version of ICU on
2048         Mac OS 10.5)
2049
2050         There should be no change in layout and no new layout test
2051         is added.
2052
2053         * WebCore.exp.in:
2054         * icu/unicode/uscript.h: updated to ICU 4.6
2055         * page/Settings.cpp:
2056         (WebCore::setGenericFontFamilyMap): helper to set generic family per script
2057         (WebCore::getGenericFontFamilyForScript): helper function used by getters for fooFontFamily.
2058         (WebCore::Settings::standardFontFamily):
2059         (WebCore::Settings::setStandardFontFamily):
2060         (WebCore::Settings::fixedFontFamily):
2061         (WebCore::Settings::setFixedFontFamily):
2062         (WebCore::Settings::serifFontFamily):
2063         (WebCore::Settings::setSerifFontFamily):
2064         (WebCore::Settings::sansSerifFontFamily):
2065         (WebCore::Settings::setSansSerifFontFamily):
2066         (WebCore::Settings::cursiveFontFamily):
2067         (WebCore::Settings::setCursiveFontFamily):
2068         (WebCore::Settings::fantasyFontFamily):
2069         (WebCore::Settings::setFantasyFontFamily):
2070         * page/Settings.h: setter and getter for FooFontFamily have a new optional argument, scriptCode.
2071
2072 2011-06-23  Dan Bernstein  <mitz@apple.com>
2073
2074         Reviewed by Alexey Proskuryakov.
2075
2076         Make line breaking obey the -webkit-locale property
2077         https://bugs.webkit.org/show_bug.cgi?id=63209
2078
2079         Test: platform/mac/fast/text/line-break-locale.html
2080
2081         * platform/text/TextBreakIterator.h:
2082         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator): Take an optional locale identifier and
2083         initialize the m_locale member.
2084         (WebCore::LazyLineBreakIterator::get): Pass the locale to acquireLineBreakIterator().
2085         (WebCore::LazyLineBreakIterator::reset): Pass the locale to releaseLineBreakIterator() and update
2086         the m_locale member.
2087         * platform/text/TextBreakIteratorICU.cpp:
2088         (WebCore::LineBreakIteratorPool::sharedPool): Return a shared instance.
2089         (WebCore::LineBreakIteratorPool::take): Returns a text iterator for the given locale, either a newly-
2090         created one, or an existing one from the pool.
2091         (WebCore::LineBreakIteratorPool::put): Puts an iterator back into the pool, removing the least-recently used
2092         one if needed.
2093         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
2094         (WebCore::acquireLineBreakIterator): Changed to take an optional local identifier, and to use the pool.
2095         (WebCore::releaseLineBreakIterator): Changed to use the pool.
2096         * platform/text/brew/TextBreakIteratorBrew.cpp:
2097         (WebCore::acquireLineBreakIterator): Updated for new parameter.
2098         * platform/text/gtk/TextBreakIteratorGtk.cpp:
2099         (WebCore::acquireLineBreakIterator): Ditto.
2100         * platform/text/qt/TextBreakIteratorQt.cpp:
2101         (WebCore::acquireLineBreakIterator): Ditto.
2102         * platform/text/wince/TextBreakIteratorWinCE.cpp:
2103         (WebCore::acquireLineBreakIterator): Ditto.
2104         * rendering/RenderBlockLineLayout.cpp:
2105         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use the locale from the style for the line break
2106         iterator.
2107         * rendering/RenderText.cpp:
2108         (WebCore::RenderText::computePreferredLogicalWidths): Ditto.
2109
2110 2011-06-23  Chris Fleizach  <cfleizach@apple.com>
2111
2112         Reviewed by Darin Adler.
2113
2114         ARIA live regions don't trigger notifications for elements that aren't in the AX tree
2115         https://bugs.webkit.org/show_bug.cgi?id=62289
2116
2117         If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region
2118         notification is not sent. To fix this, I think the childrenChanged() method needs to actually create
2119         the appropriate objects, but since that method gets called during a render tree update, we've learned 
2120         that it's generally not safe to create objects.
2121  
2122         Instead a one shot timer can be fired that will update and create the necessary objects so that the
2123         correct notification can be sent.
2124
2125         Test: platform/mac/accessibility/aria-liveregion-without-element-access.html
2126
2127         * accessibility/AXObjectCache.cpp:
2128         (WebCore::AXObjectCache::AXObjectCache):
2129         (WebCore::AXObjectCache::remove):
2130         (WebCore::AXObjectCache::childrenUpdateTimerFired):
2131         (WebCore::AXObjectCache::childrenChanged):
2132         * accessibility/AXObjectCache.h:
2133         * accessibility/AccessibilityMenuList.cpp:
2134         (WebCore::AccessibilityMenuList::childrenChanged):
2135         * accessibility/AccessibilityMenuList.h:
2136         * accessibility/AccessibilityMenuListPopup.cpp:
2137         (WebCore::AccessibilityMenuListPopup::childrenChanged):
2138         * accessibility/AccessibilityMenuListPopup.h:
2139         * accessibility/AccessibilityObject.h:
2140         (WebCore::AccessibilityObject::childrenChanged):
2141         * accessibility/AccessibilityRenderObject.cpp:
2142         (WebCore::startOfContinuations):
2143            This changed exposed a case where an object was inlineElementContinuation, but not renderInlined,
2144            which led to an assert.
2145         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
2146         (WebCore::AccessibilityRenderObject::childrenChanged):
2147         * accessibility/AccessibilityRenderObject.h:
2148
2149 2011-06-23  Dirk Schulze  <krit@webkit.org>
2150
2151         Reviewed by Nikolas Zimmermann.
2152
2153         Convert SVGColor to SVGAnimatorFactory concept
2154         https://bugs.webkit.org/show_bug.cgi?id=63246
2155
2156         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2157         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGColor.
2158
2159         Changed constructors of animators to take the animation element SVGAnimationsElement as new argument. Removed attribute name argument instead.
2160         This information is already exposed by the animation element. The animators store the pointer of the animation element, so that it is not
2161         necessary to pass it as argument to the functions calculateDistance, calculateAnimatedValue.
2162         
2163         Replace all SVGSMILElement references by SVGAnimationsElement - the common base class of all animation elements.
2164
2165         Added a new method in SVGAnimateElement to determine the property value type of CSS properties (regular value type, inherit or currentColor).
2166         The other two new methods fromPropertyValueType() and toPropertyValueType() avoid passing boolean arguments in calculateAnimatedValue().
2167
2168         No new tests added. Current tests cover the changes.
2169
2170         * CMakeLists.txt: Added new files to build system.
2171         * GNUmakefile.list.am: Ditto.
2172         * WebCore.gypi: Ditto.
2173         * WebCore.pro: Ditto.
2174         * WebCore.vcproj/WebCore.vcproj: Ditto.
2175         * WebCore.xcodeproj/project.pbxproj: Ditto.
2176         * svg/SVGAllInOne.cpp:  Ditto.
2177         * svg/SVGAnimateElement.cpp: Use Animator for SVGColor. 
2178         (WebCore::SVGAnimateElement::SVGAnimateElement):
2179         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2180         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2181         (WebCore::SVGAnimateElement::determinePropertyValueTypes):
2182         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2183         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2184         (WebCore::SVGAnimateElement::resetToBaseValue):
2185         (WebCore::SVGAnimateElement::applyResultsToTarget):
2186         (WebCore::SVGAnimateElement::calculateDistance):
2187         (WebCore::SVGAnimateElement::ensureAnimator): Pass the animation element as pointer to animator.
2188         * svg/SVGAnimateElement.h: Removed unnecessary includes. Some cleanup.
2189         (WebCore::SVGAnimateElement::fromPropertyValueType): Get property value type of 'from' property.
2190         (WebCore::SVGAnimateElement::toPropertyValueType): Get property value type of 'to' property.
2191         * svg/SVGAnimatedAngle.cpp:
2192         (WebCore::SVGAnimatedAngleAnimator::SVGAnimatedAngleAnimator): Added SVGSMILElement as new argument, removed attributeName.
2193         (WebCore::SVGAnimatedAngleAnimator::calculateFromAndToValues): Determine property value type.
2194         (WebCore::SVGAnimatedAngleAnimator::calculateFromAndByValues): Ditto.
2195         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): Use new functions of SVGAnimateElement for handling of 'inherit'.
2196             And removed unnecessary arguments.
2197         (WebCore::SVGAnimatedAngleAnimator::calculateDistance): Removed animation element argument.
2198         * svg/SVGAnimatedAngle.h:
2199         * svg/SVGAnimatedColor.cpp: Added.
2200         (WebCore::SVGAnimatedColorAnimator::SVGAnimatedColorAnimator): Ditto.
2201         (WebCore::SVGAnimatedColorAnimator::constructFromString):
2202         (WebCore::SVGAnimatedColorAnimator::calculateFromAndToValues):
2203         (WebCore::SVGAnimatedColorAnimator::calculateFromAndByValues):
2204         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
2205         (WebCore::SVGAnimatedColorAnimator::calculateDistance):
2206         * svg/SVGAnimatedColor.h: Added.
2207         (WebCore::SVGAnimatedColorAnimator::~SVGAnimatedColorAnimator):
2208         * svg/SVGAnimatedLength.cpp:
2209         (WebCore::SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator): Ditto.
2210         (WebCore::SVGAnimatedLengthAnimator::calculateFromAndToValues):
2211         (WebCore::SVGAnimatedLengthAnimator::calculateFromAndByValues):
2212         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2213         (WebCore::SVGAnimatedLengthAnimator::calculateDistance):
2214         * svg/SVGAnimatedLength.h:
2215         * svg/SVGAnimatedNumber.cpp:
2216         (WebCore::SVGAnimatedNumberAnimator::SVGAnimatedNumberAnimator): Ditto.
2217         (WebCore::SVGAnimatedNumberAnimator::calculateFromAndToValues):
2218         (WebCore::SVGAnimatedNumberAnimator::calculateFromAndByValues):
2219         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
2220         (WebCore::SVGAnimatedNumberAnimator::calculateDistance):
2221         * svg/SVGAnimatedNumber.h:
2222         * svg/SVGAnimatedPointList.cpp:
2223         (WebCore::SVGAnimatedPointListAnimator::SVGAnimatedPointListAnimator): Ditto.
2224         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
2225         (WebCore::SVGAnimatedPointListAnimator::calculateDistance):
2226         * svg/SVGAnimatedPointList.h:
2227         * svg/SVGAnimatedRect.cpp:
2228         (WebCore::SVGAnimatedRectAnimator::SVGAnimatedRectAnimator): Ditto.
2229         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
2230         (WebCore::SVGAnimatedRectAnimator::calculateDistance):
2231         * svg/SVGAnimatedRect.h:
2232         * svg/SVGAnimatedType.cpp: Added handling of Color values.
2233         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2234         (WebCore::SVGAnimatedType::createColor):
2235         (WebCore::SVGAnimatedType::color):
2236         (WebCore::SVGAnimatedType::valueAsString):
2237         (WebCore::SVGAnimatedType::setValueAsString):
2238         * svg/SVGAnimatedType.h:
2239         * svg/SVGAnimatedTypeAnimator.h:
2240         (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
2241         * svg/SVGAnimatorFactory.h:
2242         (WebCore::SVGAnimatorFactory::create):
2243
2244 2011-06-23  Yael Aharon  <yael.aharon@nokia.com>
2245
2246         Reviewed by Andreas Kling.
2247
2248         [Qt] [WK2] Add drag and drop support
2249         https://bugs.webkit.org/show_bug.cgi?id=62838
2250
2251         Add convenience methods to allow encoding/decoding of DragData.
2252         Move the call to dragEnded() to DragClient, to make WebKit1 and WebKit2 
2253         consistent.
2254
2255         * page/qt/DragControllerQt.cpp:
2256         (WebCore::DragController::cleanupAfterSystemDrag):
2257         * platform/DragData.h:
2258         (WebCore::DragData::flags):
2259         (WebCore::DragData::DragData):
2260         (WebCore::DragData::operator =):
2261
2262 2011-06-23  Vsevolod Vlasov  <vsevik@chromium.org>
2263
2264         Reviewed by Yury Semikhatsky.
2265
2266         Web Inspector: Show "no content" message in network panel when resource does not have content available.
2267         https://bugs.webkit.org/show_bug.cgi?id=63007
2268
2269         * English.lproj/localizedStrings.js:
2270         * WebCore.gypi:
2271         * WebCore.vcproj/WebCore.vcproj:
2272         * inspector/front-end/ApplicationCacheItemsView.js:
2273         (WebInspector.ApplicationCacheItemsView):
2274         (WebInspector.ApplicationCacheItemsView.prototype._updateCallback):
2275         * inspector/front-end/CookieItemsView.js:
2276         (WebInspector.CookieItemsView):
2277         (WebInspector.CookieItemsView.prototype._updateWithCookies):
2278         * inspector/front-end/DatabaseTableView.js:
2279         (WebInspector.DatabaseTableView.prototype._queryFinished):
2280         * inspector/front-end/EmptyView.js: Added.
2281         (WebInspector.EmptyView):
2282         (WebInspector.EmptyView.prototype.show):
2283         (WebInspector.EmptyView.prototype.set text):
2284         * inspector/front-end/NetworkItemView.js:
2285         (WebInspector.NetworkItemView):
2286         (WebInspector.ResourceContentView):
2287         (WebInspector.ResourceContentView.prototype.hasContent):
2288         (WebInspector.ResourceContentView.prototype.get sourceView):
2289         (WebInspector.ResourceContentView.prototype.show):
2290         (WebInspector.ResourceContentView.prototype._ensureInnerViewShown.callback):
2291         (WebInspector.ResourceContentView.prototype._ensureInnerViewShown):
2292         (WebInspector.ResourceContentView.prototype.contentLoaded):
2293         * inspector/front-end/ResourceCookiesView.js:
2294         (WebInspector.ResourceCookiesView.prototype.show):
2295         * inspector/front-end/ResourcePreviewView.js:
2296         (WebInspector.ResourcePreviewView):
2297         (WebInspector.ResourcePreviewView.prototype.contentLoaded):
2298         (WebInspector.ResourcePreviewView.prototype._createInnerView):
2299         * inspector/front-end/ResourceResponseView.js: Added.
2300         (WebInspector.ResourceResponseView):
2301         (WebInspector.ResourceResponseView.prototype.get sourceView):
2302         (WebInspector.ResourceResponseView.prototype.contentLoaded):
2303         * inspector/front-end/ResourceTimingView.js:
2304         (WebInspector.ResourceTimingView.prototype.show):
2305         * inspector/front-end/ResourcesPanel.js:
2306         (WebInspector.StorageCategoryView):
2307         (WebInspector.StorageCategoryView.prototype.setText):
2308         * inspector/front-end/WebKit.qrc:
2309         * inspector/front-end/inspector.html:
2310
2311 2011-06-23  Balazs Kelemen  <kbalazs@webkit.org>
2312
2313         Reviewed by Adam Roben.
2314
2315         PluginView::dispatchNPEvent is deceptive
2316         https://bugs.webkit.org/show_bug.cgi?id=63243
2317
2318         Straighten the inverted logic of dispatchNPEvent
2319         and it's callers.
2320
2321         No change in behaviour so no new tests.
2322         Existing plugin tests cover this.
2323
2324         * plugins/gtk/PluginViewGtk.cpp:
2325         (WebCore::PluginView::dispatchNPEvent):
2326         (WebCore::PluginView::handleKeyboardEvent):
2327         (WebCore::PluginView::handleMouseEvent):
2328         * plugins/qt/PluginViewQt.cpp:
2329         (WebCore::PluginView::dispatchNPEvent):
2330         (WebCore::PluginView::handleKeyboardEvent):
2331         (WebCore::PluginView::handleMouseEvent):
2332         * plugins/symbian/PluginViewSymbian.cpp:
2333         (WebCore::PluginView::dispatchNPEvent):
2334         (WebCore::PluginView::handleKeyboardEvent):
2335         (WebCore::PluginView::handleMouseEvent):
2336         * plugins/win/PluginViewWin.cpp:
2337         (WebCore::PluginView::dispatchNPEvent):
2338         (WebCore::PluginView::handleKeyboardEvent):
2339         (WebCore::PluginView::handleMouseEvent):
2340
2341 2011-06-23  Tommy Widenflycht  <tommyw@google.com>
2342
2343         Reviewed by Tony Gentilcore.
2344
2345         MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec
2346         https://bugs.webkit.org/show_bug.cgi?id=63122
2347
2348         Fixing broken makefile.
2349
2350         * GNUmakefile.list.am:
2351
2352 2011-06-23  Tommy Widenflycht  <tommyw@google.com>
2353
2354         Reviewed by Tony Gentilcore.
2355
2356         MediaStream API: Rename Stream, GeneratedStream and StreamRecorder to the latest spec
2357         https://bugs.webkit.org/show_bug.cgi?id=63122
2358
2359         No new tests since no code has actually changed.
2360
2361         * CMakeLists.txt:
2362         * CodeGenerators.pri:
2363         * DerivedSources.cpp:
2364         * DerivedSources.make:
2365         * GNUmakefile.list.am:
2366         * WebCore.gypi:
2367         * WebCore.pro:
2368         * WebCore.vcproj/WebCore.vcproj:
2369         * WebCore.xcodeproj/project.pbxproj:
2370         * bindings/js/JSEventTarget.cpp:
2371         (WebCore::toJS):
2372         * bindings/v8/V8DOMWrapper.cpp:
2373         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
2374         * dom/DOMAllInOne.cpp:
2375         * dom/EventTarget.cpp:
2376         (WebCore::EventTarget::toMediaStream):
2377         (WebCore::EventTarget::toLocalMediaStream):
2378         * dom/EventTarget.h:
2379         * dom/LocalMediaStream.cpp: Renamed from Source/WebCore/dom/GeneratedStream.cpp.
2380         (WebCore::LocalMediaStream::DispatchUpdateTask::create):
2381         (WebCore::LocalMediaStream::DispatchUpdateTask::performTask):
2382         (WebCore::LocalMediaStream::DispatchUpdateTask::DispatchUpdateTask):
2383         (WebCore::LocalMediaStream::create):
2384         (WebCore::LocalMediaStream::LocalMediaStream):
2385         (WebCore::LocalMediaStream::~LocalMediaStream):
2386         (WebCore::LocalMediaStream::toLocalMediaStream):
2387         (WebCore::LocalMediaStream::detachEmbedder):
2388         (WebCore::LocalMediaStream::streamEnded):
2389         (WebCore::LocalMediaStream::audioTracks):
2390         (WebCore::LocalMediaStream::videoTracks):
2391         (WebCore::LocalMediaStream::stop):
2392         (WebCore::LocalMediaStream::onStop):
2393         * dom/LocalMediaStream.h: Renamed from Source/WebCore/dom/GeneratedStream.h.
2394         * dom/LocalMediaStream.idl: Renamed from Source/WebCore/dom/GeneratedStream.idl.
2395         * dom/MediaStream.cpp: Renamed from Source/WebCore/dom/Stream.cpp.
2396         (WebCore::MediaStream::create):
2397         (WebCore::MediaStream::MediaStream):
2398         (WebCore::MediaStream::~MediaStream):
2399         (WebCore::MediaStream::toMediaStream):
2400         (WebCore::MediaStream::streamEnded):
2401         (WebCore::MediaStream::scriptExecutionContext):
2402         (WebCore::MediaStream::eventTargetData):
2403         (WebCore::MediaStream::ensureEventTargetData):
2404         * dom/MediaStream.h: Renamed from Source/WebCore/dom/Stream.h.
2405         (WebCore::MediaStream::readyState):
2406         (WebCore::MediaStream::label):
2407         (WebCore::MediaStream::refEventTarget):
2408         (WebCore::MediaStream::derefEventTarget):
2409         * dom/MediaStream.idl: Renamed from Source/WebCore/dom/Stream.idl.
2410         * dom/MediaStreamContainer.h: Renamed from Source/WebCore/dom/StreamContainer.h.
2411         (WebCore::MediaStreamContainer::create):
2412         (WebCore::MediaStreamContainer::~MediaStreamContainer):
2413         (WebCore::MediaStreamContainer::length):
2414         (WebCore::MediaStreamContainer::item):
2415         (WebCore::MediaStreamContainer::add):
2416         (WebCore::MediaStreamContainer::remove):
2417         (WebCore::MediaStreamContainer::contains):
2418         (WebCore::MediaStreamContainer::get):
2419         (WebCore::MediaStreamContainer::MediaStreamContainer):
2420         * dom/MediaStreamList.cpp: Renamed from Source/WebCore/dom/StreamList.cpp.
2421         (WebCore::MediaStreamList::create):
2422         (WebCore::MediaStreamList::MediaStreamList):
2423         (WebCore::MediaStreamList::~MediaStreamList):
2424         (WebCore::MediaStreamList::length):
2425         (WebCore::MediaStreamList::item):
2426         * dom/MediaStreamList.h: Renamed from Source/WebCore/dom/StreamList.h.
2427         * dom/MediaStreamList.idl: Renamed from Source/WebCore/dom/StreamList.idl.
2428         * dom/StreamEvent.cpp:
2429         (WebCore::StreamEvent::create):
2430         (WebCore::StreamEvent::StreamEvent):
2431         (WebCore::StreamEvent::initStreamEvent):
2432         (WebCore::StreamEvent::stream):
2433         * dom/StreamEvent.h:
2434         (WebCore::StreamEvent::isMediaStreamEvent):
2435         * dom/StreamEvent.idl:
2436         * page/MediaStreamFrameController.cpp:
2437         (WebCore::MediaStreamFrameController::unregister):
2438         (WebCore::MediaStreamFrameController::getStreamFromLabel):
2439         (WebCore::MediaStreamFrameController::stopGeneratedStream):
2440         (WebCore::MediaStreamFrameController::streamGenerated):
2441         (WebCore::MediaStreamFrameController::audioTrackFailed):
2442         (WebCore::MediaStreamFrameController::videoTrackFailed):
2443         * page/MediaStreamFrameController.h:
2444         (WebCore::MediaStreamFrameController::ClientBase::isMediaStream):
2445         (WebCore::MediaStreamFrameController::ClientBase::isLocalMediaStream):
2446         (WebCore::MediaStreamFrameController::MediaStreamClient::MediaStreamClient):
2447         (WebCore::MediaStreamFrameController::MediaStreamClient::~MediaStreamClient):
2448         (WebCore::MediaStreamFrameController::MediaStreamClient::isMediaStream):
2449         (WebCore::MediaStreamFrameController::MediaStreamClient::isLocalMediaStream):
2450         * page/NavigatorUserMediaSuccessCallback.h:
2451         * page/NavigatorUserMediaSuccessCallback.idl:
2452
2453 2011-06-23  Mikhail Naganov  <mnaganov@chromium.org>
2454
2455         Reviewed by Yury Semikhatsky.
2456
2457         Web Inspector: [Chromium] Fix showing dominator leaf nodes after r89457
2458         https://bugs.webkit.org/show_bug.cgi?id=63250
2459
2460         * inspector/front-end/DetailedHeapshotView.js:
2461         * inspector/front-end/HeapSnapshot.js:
2462         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get isEmpty):
2463
2464 2011-06-23  Vsevolod Vlasov  <vsevik@chromium.org>
2465
2466         Reviewed by Yury Semikhatsky.
2467
2468         Web Inspector: HTML preview in network panel should take 100% of resource view height.
2469         https://bugs.webkit.org/show_bug.cgi?id=63167
2470
2471         * inspector/front-end/inspector.css:
2472         (.resource-view.html iframe):
2473
2474 2011-06-23  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2475
2476         Reviewed by Pavel Feldman.
2477
2478         Inspector may close at the start of the next inspector test in DRT
2479         https://bugs.webkit.org/show_bug.cgi?id=60881
2480
2481         Add a new function to the inspector, which tests whether the
2482         dispatch queue is empty.
2483
2484         * inspector/front-end/inspector.js:
2485         (WebInspector.dispatchQueueIsEmpty):
2486
2487 2011-06-23  Jeffrey Pfau  <jpfau@apple.com>
2488
2489         Reviewed by Nikolas Zimmermann.
2490
2491         Incorrectly placed SVG gradients can cause crashes when referenced
2492         https://bugs.webkit.org/show_bug.cgi?id=62914
2493
2494         Added a check for gradient rendering contexts. If the contexts can't be found, the gradient must be in an invalid location, so we use the fallback color instead.
2495
2496         Tests: svg/custom/invalid-gradient-with-xlink.svg
2497                svg/custom/xlink-to-invalid-gradient.svg
2498
2499         * rendering/svg/RenderSVGResourceGradient.cpp:
2500         (WebCore::RenderSVGResourceGradient::applyResource):
2501         * rendering/svg/RenderSVGResourceGradient.h:
2502         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
2503         (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
2504         * rendering/svg/RenderSVGResourceLinearGradient.h:
2505         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
2506         (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
2507         * rendering/svg/RenderSVGResourceRadialGradient.h:
2508         * svg/SVGLinearGradientElement.cpp:
2509         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
2510         * svg/SVGLinearGradientElement.h:
2511         * svg/SVGRadialGradientElement.cpp:
2512         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2513         * svg/SVGRadialGradientElement.h:
2514
2515 2011-06-23  Dmitriy Vyukov  <dvyukov@google.com>
2516
2517         Reviewed by David Levin.
2518
2519         Fix incorrect usage of a condition variable.
2520         https://bugs.webkit.org/show_bug.cgi?id=63127
2521
2522         No new tests. This does not affect existing
2523         functionality.
2524
2525         * storage/DatabaseTask.cpp:
2526         (WebCore::DatabaseTaskSynchronizer::waitForTaskCompletion):
2527
2528 2011-06-23  David Grogan  <dgrogan@chromium.org>
2529
2530         Reviewed by Eric Seidel.
2531
2532         IndexedDB: add detail to an ASSERT error message
2533         https://bugs.webkit.org/show_bug.cgi?id=60407
2534
2535         No new tests, this is just a debug ASSERT.
2536
2537         * storage/IDBRequest.cpp:
2538         (WebCore::IDBRequest::dispatchEvent):
2539
2540 2011-06-22  Dirk Schulze  <krit@webkit.org>
2541
2542         Reviewed by Rob Buis.
2543
2544         Convert SVGPointList to SVGAnimatorFactory concept
2545         https://bugs.webkit.org/show_bug.cgi?id=63171
2546
2547         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2548         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGPointList.
2549
2550         Added support for from-by animations of SVGPointLists.
2551
2552         Tests: svg/animations/svgpointlist-animation-1.html
2553                svg/animations/svgpointlist-animation-2.html
2554
2555         * CMakeLists.txt: Added new files to build system.
2556         * GNUmakefile.list.am: Ditto.
2557         * WebCore.gypi: Ditto.
2558         * WebCore.pro: Ditto.
2559         * WebCore.vcproj/WebCore.vcproj: Ditto.
2560         * WebCore.xcodeproj/project.pbxproj: Ditto.
2561         * svg/SVGAllInOne.cpp: Added SVGAnimatedPointList.cpp
2562         * svg/SVGAnimateElement.cpp:
2563         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2564         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2565         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2566         (WebCore::SVGAnimateElement::resetToBaseValue):
2567         (WebCore::SVGAnimateElement::applyResultsToTarget):
2568         (WebCore::SVGAnimateElement::calculateDistance):
2569         * svg/SVGAnimateElement.h:
2570         * svg/SVGAnimatedPointList.cpp: Added.
2571         (WebCore::SVGAnimatedPointListAnimator::SVGAnimatedPointListAnimator):
2572         (WebCore::SVGAnimatedPointListAnimator::constructFromString):
2573         (WebCore::SVGAnimatedPointListAnimator::calculateFromAndToValues):
2574         (WebCore::SVGAnimatedPointListAnimator::calculateFromAndByValues):
2575         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
2576         (WebCore::SVGAnimatedPointListAnimator::calculateDistance):
2577         * svg/SVGAnimatedPointList.h: Added.
2578         (WebCore::SVGAnimatedPointListAnimator::~SVGAnimatedPointListAnimator):
2579         * svg/SVGAnimatedType.cpp:
2580         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2581         (WebCore::SVGAnimatedType::createPointList):
2582         (WebCore::SVGAnimatedType::pointList):
2583         (WebCore::SVGAnimatedType::valueAsString):
2584         (WebCore::SVGAnimatedType::setValueAsString):
2585         * svg/SVGAnimatedType.h:
2586         * svg/SVGAnimatorFactory.h:
2587         (WebCore::SVGAnimatorFactory::create):
2588
2589 2011-06-22  Dimitri Glazkov  <dglazkov@chromium.org>
2590
2591         Reviewed by Kent Tamura.
2592
2593         Move file-choosing and icon-loading management to FileInputType
2594         https://bugs.webkit.org/show_bug.cgi?id=62069
2595
2596         1) Moved the duties of FileChooserClient and FileIconLoaderClient from
2597         RenderFileUploadControl to FileInputType, along with all of the
2598         supporting functions.
2599
2600         2) Moved Icon ownership to FileInputType and exposed accessor on
2601         HTMInputElement to allow RenderFileUploadControl to query current icon.
2602
2603         As a result, RenderFileUploadControl is now completely stateless, which is
2604         neat and clean.
2605
2606         Refactoring, covered by existing tests.
2607
2608         * html/FileInputType.cpp:
2609         (WebCore::FileInputType::handleDOMActivateEvent): Moved logic here from RenderFileUploadControl.
2610         (WebCore::FileInputType::requestIcon): Ditto.
2611         (WebCore::FileInputType::filesChosen): Ditto.
2612         (WebCore::FileInputType::receiveDropForDirectoryUpload): Ditto.
2613         (WebCore::FileInputType::updateRendering): Ditto.
2614         (WebCore::FileInputType::chrome): Ditto.
2615         (WebCore::FileInputType::receiveDroppedFiles): Ditto.
2616         (WebCore::FileInputType::icon): Added.
2617         * html/FileInputType.h:
2618         * html/HTMLInputElement.cpp:
2619         (WebCore::HTMLInputElement::setValueFromRenderer): Updated comment.
2620         (WebCore::HTMLInputElement::receiveDroppedFiles): Added to replace setFileListFromRenderer.
2621         (WebCore::HTMLInputElement::icon): Added.
2622         * html/HTMLInputElement.h:
2623         * html/InputType.cpp:
2624         (WebCore::InputType::receiveDroppedFiles): Added.
2625         (WebCore::InputType::icon): Added.
2626         * html/InputType.h:
2627         * page/DragController.cpp:
2628         (WebCore::DragController::concludeEditDrag): Changed to use HTMLInputElement. Ahh, nice and clean!
2629         * rendering/RenderFileUploadControl.cpp:
2630         (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed code that is no longer necessary.
2631         (WebCore::RenderFileUploadControl::updateFromElement): Ditto.
2632         (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use HTMLInputElement icon accessor.
2633         (WebCore::RenderFileUploadControl::paintObject): Ditto.
2634         * rendering/RenderFileUploadControl.h:
2635
2636 2011-06-22  Pratik Solanki  <psolanki@apple.com>
2637
2638         Reviewed by Darin Adler.
2639
2640         Add NSError wrapper functions in ResourceError when USE(CFNETWORK) is enabled
2641         https://bugs.webkit.org/show_bug.cgi?id=63155
2642
2643         Add wrapper functions to ResourceError when building with USE(CFNETWORK). We need to create
2644         a new NSError in ResourceError::nsError() since Safari has category methods on NSError and
2645         passing a CFErrorRef back does not work even though CFErrorRef/NSErrror are toll-free
2646         bridged.
2647
2648         No tests because no change in functionality.
2649
2650         * WebCore.exp.in:
2651         * platform/network/cf/ResourceError.h:
2652         * platform/network/mac/ResourceErrorMac.mm:
2653         (WebCore::ResourceError::ResourceError):
2654         (WebCore::ResourceError::nsError):
2655         (WebCore::ResourceError::operator NSError *):
2656
2657 2011-06-22  Dominic Cooney  <dominicc@chromium.org>
2658
2659         Reviewed by Mark Rowe.
2660
2661         Add window.internals to WebKit2's WebKitTestRunner.
2662         https://bugs.webkit.org/show_bug.cgi?id=61073
2663
2664         * Configurations/WebCoreTestSupport.xcconfig:
2665         * WebCore.xcodeproj/project.pbxproj:
2666
2667 2011-06-22  Dimitri Glazkov  <dglazkov@chromium.org>
2668
2669         Reviewed by Kent Tamura.
2670
2671         Convert FileIconLoaderClient to "smart client" pattern, just like FileChooserClient.
2672         https://bugs.webkit.org/show_bug.cgi?id=63224
2673
2674         Refactoring, covered by existing tests.
2675
2676         * platform/FileIconLoader.cpp:
2677         (WebCore::FileIconLoaderClient::~FileIconLoaderClient): Changed to discard loader.
2678         (WebCore::FileIconLoaderClient::newFileIconLoader): Added.
2679         (WebCore::FileIconLoaderClient::discardLoader): Added.
2680         * platform/FileIconLoader.h: Updated defs.
2681         * rendering/RenderFileUploadControl.cpp:
2682         (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed initialization of icon loader.
2683         (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Remove discarding of loader.
2684         (WebCore::RenderFileUploadControl::requestIcon): Changed to use newFileIconLoader.
2685         * rendering/RenderFileUploadControl.h: Updated defs.
2686
2687 2011-06-22  Yael Aharon  <yael.aharon@nokia.com>
2688
2689         Another unreviewed build fix after r89472.
2690
2691         No new tests, just a build fix.
2692
2693         * rendering/svg/SVGResources.cpp:
2694
2695 2011-06-22  Yael Aharon  <yael.aharon@nokia.com>
2696
2697         Unreviewed build fix after r89472.
2698
2699         No new tests, just a build fix.
2700
2701         * rendering/InlineBox.cpp:
2702         * rendering/RenderCounter.cpp:
2703
2704 2011-06-22  Dimitri Glazkov  <dglazkov@chromium.org>
2705
2706         Reviewed by Kent Tamura.
2707
2708         Add a helper function to FileList to retrieve a list of filenames.
2709         https://bugs.webkit.org/show_bug.cgi?id=63222
2710
2711         Refactoring, covered by existing tests.
2712
2713         * fileapi/FileList.cpp:
2714         (WebCore::FileList::filenames): Added.
2715         * fileapi/FileList.h:
2716         * rendering/RenderFileUploadControl.cpp:
2717         (WebCore::RenderFileUploadControl::RenderFileUploadControl): Changed to use newly added helper.
2718         (WebCore::RenderFileUploadControl::click): Ditto.
2719         (WebCore::RenderFileUploadControl::fileTextValue): Ditto.
2720
2721 2011-06-22  Sam Weinig  <sam@webkit.org>
2722
2723         Reviewed by Adam Barth.
2724
2725         Lower HTML parser DOM depth limit to 2048
2726         https://bugs.webkit.org/show_bug.cgi?id=63219
2727
2728         Lower the default depth limit from 4096 to 2048. There isn't a good
2729         reason to have such pathologically nested content, and by-and-large,
2730         the rendering code is not setup to support it that well. Adding this
2731         aggressive limit now will allow us to see if anything breaks in the
2732         nightlies.
2733
2734         * page/Settings.h:
2735
2736 2011-06-22  Julien Chaffraix  <jchaffraix@webkit.org>
2737
2738         Reviewed by Dimitri Glazkov.
2739
2740         Tighten type usage in the Shadow tree code
2741         https://bugs.webkit.org/show_bug.cgi?id=63210
2742
2743         Refactoring only, no new test required.
2744
2745         * dom/Document.cpp:
2746         (WebCore::Document::buildAccessKeyMap):
2747         * dom/Document.h:
2748         Changed the argument of buildAccessKeyMap to TreeScope.
2749
2750         * dom/Element.cpp:
2751         (WebCore::Element::attach):
2752         (WebCore::Element::removeShadowRoot):
2753         * html/ColorInputType.cpp:
2754         (WebCore::ColorInputType::shadowColorSwatch):
2755         * html/HTMLKeygenElement.cpp:
2756         (WebCore::HTMLKeygenElement::shadowSelect):
2757         * html/shadow/SliderThumbElement.cpp:
2758         (WebCore::sliderThumbElementOf):
2759         Use ShadowRoot for the previous call sites as this is what is
2760         returned by shadowRoot().
2761
2762         * dom/Node.cpp:
2763         (WebCore::traverseTreeAndMark): Renamed the parameter here as it is not
2764         expected to be a shadow object. Just the rootNode of our traversal.
2765
2766         * dom/ShadowRoot.h: Made attach() public as it is public in ContainerNode
2767         and we would do some casting to avoid the private attribute in ShadowRoot.
2768
2769 2011-06-22  Joseph Pecoraro  <joepeck@webkit.org>
2770
2771         Reviewed by Darin Adler.
2772
2773         Remove comment about pages with frames not being page-cachable
2774         https://bugs.webkit.org/show_bug.cgi?id=63207
2775
2776         This comment was out of date. Caching pages with Frames in
2777         the PageCache has worked since 2009:
2778         <http://webkit.org/b/13631> Page Cache should support pages with frames
2779
2780         * history/PageCache.cpp:
2781         (WebCore::PageCache::canCache):
2782
2783 2011-06-22  Yael Aharon  <yael.aharon@nokia.com>
2784
2785         Reviewed by Andreas Kling.
2786
2787         [Qt] Add a build flag for building with libxml2 and libxslt.
2788         https://bugs.webkit.org/show_bug.cgi?id=63113
2789
2790         No new tests. If this new flag was set by default, we could unskip
2791         existing xmlviewer tests.
2792
2793         * CodeGenerators.pri:
2794         * WebCore.pri:
2795         * WebCore.pro:
2796         * features.pri:
2797
2798 2011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
2799
2800         Yet another build fix after r89472.
2801
2802         * html/parser/HTMLFormattingElementList.cpp:
2803
2804 2011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
2805
2806         Another build fix after r89472.
2807
2808         * dom/DocumentMarkerController.cpp:
2809
2810 2011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
2811
2812         Build fix after r89472.
2813
2814         * css/CSSStyleDeclaration.cpp:
2815
2816 2011-06-22  Mark Pilgrim  <pilgrim@chromium.org>
2817
2818         Reviewed by Adam Barth.
2819
2820         IndexedDB open (database) should NOT throw if name is null
2821         https://bugs.webkit.org/show_bug.cgi?id=63110
2822
2823         * storage/IDBFactory.idl: remove ConvertNullToNullString flag on
2824         name argument, let IDL code generator stringify null value to "null"
2825
2826 2011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
2827
2828         Reviewed by Darin Adler.
2829
2830         Add a Position constructor that takes (Text*, unsigned offset)
2831         https://bugs.webkit.org/show_bug.cgi?id=63181
2832
2833         Added Position::Position(PassRefPtr<Text*>, unsigned offset) and deployed in a couple of places
2834         by replacing the calls to the old constructor.
2835
2836         * dom/Position.cpp:
2837         (WebCore::Position::Position): Added.
2838         * dom/Position.h:
2839         * editing/CompositeEditCommand.cpp:
2840         (WebCore::CompositeEditCommand::replaceSelectedTextInNode): Calls new constructor; extracted
2841         from InsertTextCommand::performTrivialReplace and ReplaceSelectionCommand::performTrivialReplace.
2842         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Calls new constructor
2843         * editing/CompositeEditCommand.h:
2844         * editing/InsertTextCommand.cpp:
2845         (WebCore::InsertTextCommand::performTrivialReplace): Calls replaceSelectedTextInNode.
2846         (WebCore::InsertTextCommand::input): Calls new constructor.
2847         (WebCore::InsertTextCommand::insertTab): Use RefPtr instead of a raw pointer.
2848         * editing/ReplaceSelectionCommand.cpp:
2849         (WebCore::ReplaceSelectionCommand::performTrivialReplace): Calls replaceSelectedTextInNode.
2850         * editing/visible_units.cpp:
2851         (WebCore::startPositionForLine): Calls new constructor.
2852         * rendering/RenderTextControl.cpp:
2853         (WebCore::RenderTextControl::visiblePositionForIndex): Calls new constructor; calls endPosition
2854         on Range instead of avoid manually constructing a VisiblePosition out of endContainer and endOffset.
2855
2856 2011-06-22  Adam Barth  <abarth@webkit.org>
2857
2858         Reviewed by Darin Fisher.
2859
2860         [Chromium] Add WebDocument APIs for the functions moving from WebFrame
2861         https://bugs.webkit.org/show_bug.cgi?id=62831
2862
2863         * dom/Document.cpp:
2864         (WebCore::Document::openSearchDescriptionURL):
2865             - This function exists to service a Chromium WebKit API, but it's
2866               generally purpose and might be useful to other ports.  The
2867               algorithm has some strange early exits, which I've marked with
2868               FIXME comments.
2869         * dom/Document.h:
2870
2871 2011-06-22  Nate Chapin  <japhet@chromium.org>
2872
2873         Reviewed by Adam Barth.
2874
2875         Don't let all subresources keep isLoadingInAPISense() from
2876         returning false, only requests that affect
2877         CachedResourceRequest::requestCount().
2878
2879         Also, add a callback to Internals to determine whether
2880         a resource has been preloaded.
2881
2882         https://bugs.webkit.org/show_bug.cgi?id=62066
2883
2884         * WebCore.exp.in:
2885         * dom/Document.cpp: Add m_loadEventFinished.
2886         * dom/Document.h:
2887         * loader/DocumentLoader.cpp:
2888         (WebCore::DocumentLoader::isLoadingInAPISense):
2889         * loader/cache/CachedResourceLoader.cpp:
2890         (WebCore::CachedResourceLoader::isPreloaded):
2891         * loader/cache/CachedResourceLoader.h:
2892         * testing/Internals.cpp:
2893         (WebCore::Internals::isPreloaded):
2894         * testing/Internals.h:
2895         * testing/Internals.idl:
2896
2897 2011-06-22  Chris Rogers  <crogers@google.com>
2898
2899         Reviewed by David Levin.
2900
2901         Use create() method for AsyncAudioDecoder::DecodingTask
2902         https://bugs.webkit.org/show_bug.cgi?id=63198
2903
2904         No new tests.  This doesn't change any JS API.
2905
2906         * webaudio/AsyncAudioDecoder.cpp:
2907         (WebCore::AsyncAudioDecoder::decodeAsync):
2908         (WebCore::AsyncAudioDecoder::DecodingTask::create):
2909         * webaudio/AsyncAudioDecoder.h:
2910
2911 2011-06-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2912
2913         Unreviewed, rolling out r89489.
2914         http://trac.webkit.org/changeset/89489
2915         https://bugs.webkit.org/show_bug.cgi?id=63203
2916
2917         Broke chromium mac build on build.webkit.org (Requested by
2918         abarth on #webkit).
2919
2920         * WebCore.gyp/WebCore.gyp:
2921         * loader/cache/CachedFont.cpp:
2922         * platform/chromium/DragImageRef.h:
2923         * platform/graphics/FloatPoint.h:
2924         * platform/graphics/FloatRect.h:
2925         * platform/graphics/FloatSize.h:
2926         * platform/graphics/FontPlatformData.h:
2927         (WebCore::FontPlatformData::hash):
2928         * platform/graphics/GlyphBuffer.h:
2929         (WebCore::GlyphBuffer::advanceAt):
2930         (WebCore::GlyphBuffer::add):
2931         (WebCore::GlyphBuffer::expandLastAdvance):
2932         * platform/graphics/IntPoint.h:
2933         * platform/graphics/IntRect.h:
2934         * platform/graphics/IntSize.h:
2935         * platform/graphics/SimpleFontData.h:
2936         * platform/graphics/cg/FloatPointCG.cpp:
2937         * platform/graphics/cg/FloatRectCG.cpp:
2938         * platform/graphics/cg/FloatSizeCG.cpp:
2939         * platform/graphics/cg/IntPointCG.cpp:
2940         * platform/graphics/cg/IntRectCG.cpp:
2941         * platform/graphics/cg/IntSizeCG.cpp:
2942         * platform/graphics/mac/FontCustomPlatformData.cpp:
2943         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2944         (WebCore::createFontCustomPlatformData):
2945         * platform/graphics/mac/FontCustomPlatformData.h:
2946         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
2947
2948 2011-06-22  Luke Macpherson   <macpherson@chromium.org>
2949
2950         Reviewed by James Robinson.
2951
2952         Remove comment that snuck in via copy & paste.
2953         https://bugs.webkit.org/show_bug.cgi?id=63177
2954
2955         No new tests / no code changes.
2956
2957         * css/CSSPrimitiveValueMappings.h:
2958         (WebCore::CSSPrimitiveValue::operator short):
2959         Removed incorrect comment.
2960
2961 2011-06-22  Annie Sullivan  <sullivan@chromium.org>
2962
2963         Reviewed by Ryosuke Niwa.
2964
2965         REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span
2966         https://bugs.webkit.org/show_bug.cgi?id=61594
2967
2968         When the tree is split at the cursor in InsertParagraphSeparatorCommand, it is possible for the position
2969         split at to be at the end of a text node. The code assumes the position is at the start of the node, so
2970         pass the correct node into splitTreeToNode() in that case.
2971
2972         Tests: editing/inserting/return-key-before-br-in-span.html
2973                editing/inserting/return-key-middle-of-span.html
2974
2975         * editing/InsertParagraphSeparatorCommand.cpp:
2976         (WebCore::InsertParagraphSeparatorCommand::doApply):
2977
2978 2011-06-22  Rob Buis  <rbuis@rim.com>
2979
2980         Reviewed by Nikolas Zimmermann.
2981
2982         SVG1.1SE test with pointer-events and invalid gradient fill fails
2983         https://bugs.webkit.org/show_bug.cgi?id=63109
2984
2985         Properly detect fill/stroke properties of type SVG_PAINTTYPE_URI_NONE, store it in SVGPaint
2986         and don't apply the paint if the uri lookup fails.
2987
2988         Tests: svg/W3C-SVG-1.1-SE/interact-pointer-03-t.svg
2989                svg/custom/pointer-events-invalid-fill.svg
2990
2991         * css/SVGCSSParser.cpp:
2992         (WebCore::CSSParser::parseSVGValue):
2993         * rendering/svg/RenderSVGResource.cpp:
2994         (WebCore::requestPaintingResource):
2995         * svg/SVGPaint.h:
2996         (WebCore::SVGPaint::createURIAndNone):
2997
2998 2011-06-22  Cary Clark  <caryclark@google.com>
2999
3000         Reviewed by Darin Fisher.
3001
3002         Use Skia if Skia on Mac Chrome is enabled
3003         https://bugs.webkit.org/show_bug.cgi?id=62999
3004
3005         No new tests. This does not affect existing
3006         functionality.
3007
3008         * WebCore.gyp/WebCore.gyp:
3009         Include Skia and related files and exclude CG
3010         and related files when building Chromium for Skia
3011         on the Mac.
3012
3013         * loader/cache/CachedFont.cpp:
3014         Rename CHROME to CHROMIUM.
3015
3016         * platform/chromium/DragImageRef.h:
3017         * platform/graphics/FloatPoint.h:
3018         * platform/graphics/FloatRect.h:
3019         * platform/graphics/FloatSize.h:
3020         * platform/graphics/FontPlatformData.h:
3021         (WebCore::FontPlatformData::hash):
3022         * platform/graphics/GlyphBuffer.h:
3023         (WebCore::GlyphBuffer::advanceAt):
3024         (WebCore::GlyphBuffer::add):
3025         (WebCore::GlyphBuffer::expandLastAdvance):
3026         * platform/graphics/IntPoint.h:
3027         * platform/graphics/IntRect.h:
3028         * platform/graphics/IntSize.h:
3029         * platform/graphics/SimpleFontData.h:
3030         * platform/graphics/cg/FloatPointCG.cpp:
3031         * platform/graphics/cg/FloatRectCG.cpp:
3032         * platform/graphics/cg/FloatSizeCG.cpp:
3033         * platform/graphics/cg/IntPointCG.cpp:
3034         * platform/graphics/cg/IntRectCG.cpp:
3035         * platform/graphics/cg/IntSizeCG.cpp:
3036         * platform/graphics/mac/FontCustomPlatformData.cpp:
3037         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3038         (WebCore::createFontCustomPlatformData):
3039         * platform/graphics/mac/FontCustomPlatformData.h:
3040         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
3041         Ditto.
3042
3043 2011-06-22  Mark Pilgrim  <pilgrim@chromium.org>
3044
3045         Reviewed by Adam Barth.
3046
3047         IndexedDB createIndex should NOT throw if name arg is null
3048         https://bugs.webkit.org/show_bug.cgi?id=63114
3049
3050         * storage/IDBObjectStore.idl: remove ConvertNullToNullString flag
3051         so null values will be stringified as "null", as per WebIDL spec.
3052
3053 2011-06-22  Chris Rogers  <crogers@google.com>
3054
3055         Reviewed by Kenneth Russell.
3056
3057         AudioContext needs non-blocking call to create AudioBuffer from audio file data
3058         https://bugs.webkit.org/show_bug.cgi?id=61947
3059
3060         No new tests since audio API is not yet implemented.
3061
3062         * DerivedSources.make:
3063         * WebCore.gypi:
3064         * WebCore.xcodeproj/project.pbxproj:
3065         * webaudio/AsyncAudioDecoder.cpp: Added.
3066         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
3067         (WebCore::AsyncAudioDecoder::~AsyncAudioDecoder):
3068         (WebCore::AsyncAudioDecoder::decodeAsync):
3069         (WebCore::AsyncAudioDecoder::threadEntry):
3070         (WebCore::AsyncAudioDecoder::runLoop):
3071         (WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask):
3072         (WebCore::AsyncAudioDecoder::DecodingTask::decode):
3073         (WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch):
3074         (WebCore::AsyncAudioDecoder::DecodingTask::notifyComplete):
3075         * webaudio/AsyncAudioDecoder.h: Added.
3076         (WebCore::AsyncAudioDecoder::DecodingTask::audioData):
3077         (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate):
3078         (WebCore::AsyncAudioDecoder::DecodingTask::successCallback):
3079         (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback):
3080         (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer):
3081         * webaudio/AudioBufferCallback.h: Added.
3082         (WebCore::AudioBufferCallback::~AudioBufferCallback):
3083         * webaudio/AudioBufferCallback.idl: Added.
3084         * webaudio/AudioContext.cpp:
3085         (WebCore::AudioContext::decodeAudioData):
3086         * webaudio/AudioContext.h:
3087         * webaudio/AudioContext.idl:
3088
3089 2011-06-22  Beth Dakin  <bdakin@apple.com>
3090
3091         Reviewed by Simon Fraser.
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=63174
3094         Don't draw the borders as one path unless there really are 4 borders
3095         -and corresponding-
3096         <rdar://problem/9457997>
3097
3098         If any of the border edges have no width, then allEdgesVisible should be set to 
3099         false since borders without width will not be visible.
3100         * rendering/RenderBoxModelObject.cpp:
3101         (WebCore::RenderBoxModelObject::paintBorder):
3102
3103 2011-06-22  Matthew Delaney  <mdelaney@apple.com>
3104
3105         Reviewed by Oliver Hunt.
3106
3107         Canvas in layer obscures overlapping span
3108         https://bugs.webkit.org/show_bug.cgi?id=63161
3109
3110         Test: compositing/layer-creation/spanOverlapsCanvas.html
3111
3112         * rendering/RenderLayer.cpp: Added checks for canvas to be layered properly.
3113         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
3114         (WebCore::RenderLayer::isSelfPaintingLayer):
3115
3116 2011-06-22  Chris Rogers  <crogers@google.com>
3117
3118         Reviewed by Kenneth Russell.
3119
3120         AudioContext noteGrainOn() method should not apply explicit windowing
3121         https://bugs.webkit.org/show_bug.cgi?id=63005
3122
3123         No new tests since audio API is not yet implemented.
3124
3125         * webaudio/AudioBufferSourceNode.cpp:
3126         (WebCore::AudioBufferSourceNode::readFromBuffer):
3127         * webaudio/AudioBufferSourceNode.h:
3128
3129 2011-06-22  Kentaro Hara  <haraken@google.com>
3130
3131         Reviewed by Tony Chang.
3132
3133         Check |keypath| argument of createObjectStore(). Remove storage/indexeddb/keypath-as-array.html.
3134         https://bugs.webkit.org/show_bug.cgi?id=63054
3135
3136         At the head of createObjectStore(), we parse |keypath| argument and throw an exception
3137         if the |keypath| is invalid. With this parsing, we remove keypath-as-array.html because
3138         the current keypath parser does not support an array of keypath and (more importantly)
3139         the current implementation of ObjectStore does not support multiple keypaths.
3140         We added keypath-basics.html that demonstrates that we do not support an array of keypaths.
3141
3142         Tests: storage/indexeddb/keypath-basics.html
3143
3144         * storage/IDBDatabase.cpp:
3145         (WebCore::IDBDatabase::createObjectStore):
3146         * storage/IDBKeyPath.cpp:
3147         (WebCore::IDBIsValidKeyPath):
3148         * storage/IDBKeyPath.h:
3149
3150 2011-06-22  Young Han Lee  <joybro@company100.net>
3151
3152         Reviewed by Simon Fraser.
3153
3154         animation-timing-function property with a list uses first item for all animations
3155         https://bugs.webkit.org/show_bug.cgi?id=60303
3156
3157         When an element has multiple animations that have different timingFunctions,
3158         the progress of each animation should be calculated using its respective timingFunction.
3159         But at this point, the timingFunction of the first animation is only used for the
3160         calculation, regardless of how many animations the element has.
3161
3162         The code for getting a timingFunction is changed by this patch
3163         so that the timingFunction of the correct animation searched by its name will be used.
3164
3165         Test: animations/multiple-animations-timing-function.html
3166
3167         * page/animation/KeyframeAnimation.cpp:
3168         (WebCore::getAnimationFromStyleByName):
3169         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
3170
3171 2011-06-22  Sheriff Bot  <webkit.review.bot@gmail.com>
3172
3173         Unreviewed, rolling out r89407, r89409, r89410, and r89411.
3174         http://trac.webkit.org/changeset/89407
3175         http://trac.webkit.org/changeset/89409
3176         http://trac.webkit.org/changeset/89410
3177         http://trac.webkit.org/changeset/89411
3178         https://bugs.webkit.org/show_bug.cgi?id=63168
3179
3180         Broke Chromium tests for Forms and Autofill (Requested by
3181         dimich on #webkit).
3182
3183         * css/html.css:
3184         (input[type="search"]::-webkit-search-cancel-button):
3185         (input[type="search"]::-webkit-search-decoration):
3186         (input[type="search"]::-webkit-search-results-decoration):
3187         (input[type="search"]::-webkit-search-results-button):
3188         (input::-webkit-inner-spin-button):
3189         (input::-webkit-input-speech-button):
3190         * html/HTMLInputElement.cpp:
3191         * html/HTMLInputElement.h:
3192         * html/InputType.h:
3193         * html/SearchInputType.cpp:
3194         (WebCore::SearchInputType::SearchInputType):
3195         (WebCore::SearchInputType::createShadowSubtree):
3196         (WebCore::SearchInputType::destroyShadowSubtree):
3197         * html/SearchInputType.h:
3198         (WebCore::SearchInputType::innerBlockElement):
3199         * html/TextFieldInputType.cpp:
3200         (WebCore::TextFieldInputType::TextFieldInputType):
3201         (WebCore::TextFieldInputType::createShadowSubtree):
3202         (WebCore::TextFieldInputType::destroyShadowSubtree):
3203         * html/TextFieldInputType.h:
3204         (WebCore::TextFieldInputType::innerTextElement):
3205         (WebCore::TextFieldInputType::innerSpinButtonElement):
3206         (WebCore::TextFieldInputType::speechButtonElement):
3207         (WebCore::TextFieldInputType::setInnerTextElement):
3208         (WebCore::TextFieldInputType::setSpeechButtonElement):
3209         * rendering/RenderTextControlSingleLine.cpp:
3210         (WebCore::RenderTextControlSingleLine::innerTextElement):
3211         (WebCore::RenderTextControlSingleLine::layout):
3212         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3213         (WebCore::RenderTextControlSingleLine::forwardEvent):
3214         (WebCore::RenderTextControlSingleLine::styleDidChange):
3215         (WebCore::RenderTextControlSingleLine::hasControlClip):
3216         (WebCore::RenderTextControlSingleLine::controlClipRect):
3217         (WebCore::RenderTextControlSingleLine::textBlockWidth):
3218         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3219         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
3220         (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
3221         * rendering/RenderTextControlSingleLine.h:
3222
3223 2011-06-20  Mikhail Naganov  <mnaganov@chromium.org>
3224
3225         Reviewed by Pavel Feldman.
3226
3227         Web Inspector: [Chromium] Improve speed of heap profiles dominators view.
3228         https://bugs.webkit.org/show_bug.cgi?id=62979
3229
3230         * inspector/front-end/DetailedHeapshotGridNodes.js:
3231         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
3232         * inspector/front-end/HeapSnapshot.js:
3233         (WebInspector.HeapSnapshotArraySlice.prototype.item):
3234         (WebInspector.HeapSnapshotArraySlice.prototype.slice):
3235         (WebInspector.HeapSnapshot.prototype.dispose):
3236         (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
3237         (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var):
3238         (WebInspector.HeapSnapshot.prototype._buildReverseIndex):
3239         (WebInspector.HeapSnapshot.prototype._buildRetainers):
3240         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
3241         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
3242         (WebInspector.HeapSnapshot.prototype._getDominatedIndex):
3243         (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass):
3244         (WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator):
3245         (WebInspector.HeapSnapshotFilteredOrderedIterator):
3246         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype._createIterationOrder):
3247         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get length):
3248         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems):
3249         (WebInspector.HeapSnapshotNodesProvider):
3250         * inspector/front-end/HeapSnapshotProxy.js:
3251         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
3252
3253 2011-06-22  Sreeram Ramachandran  <sreeram@chromium.org>
3254
3255         Reviewed by Pavel Feldman.
3256
3257         Web Inspector: Restore console messages when restoring inspector state
3258         https://bugs.webkit.org/show_bug.cgi?id=63146
3259
3260         No new tests (no change in functionality, only in display).
3261
3262         * inspector/InspectorConsoleAgent.cpp:
3263         (WebCore::InspectorConsoleAgent::restore):
3264         * inspector/InspectorConsoleAgent.h:
3265         * inspector/InspectorController.cpp:
3266         (WebCore::InspectorController::restoreInspectorStateFromCookie):
3267
3268 2011-06-22  Adam Barth  <abarth@webkit.org>
3269
3270         Attempt to fix the GTK build after my incomplete rollout of 88332.
3271
3272         * GNUmakefile.list.am:
3273
3274 2011-06-22  Sam Weinig  <sam@webkit.org>
3275
3276         Reviewed by Adam Barth.
3277
3278         HTML parser should limit element depth of produced tree
3279         https://bugs.webkit.org/show_bug.cgi?id=63082
3280
3281         Test by:
3282             fast/parser/block-nesting-cap.html
3283             fast/parser/element-nesting-cap.html
3284
3285         * html/parser/HTMLConstructionSite.cpp:
3286         (WebCore::HTMLConstructionSite::attach):
3287         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
3288         * html/parser/HTMLConstructionSite.h:
3289         Limit the DOM tree depth by turning attempts to add a child passed a certain
3290         threshold (configurable by Settings::maximumDOMTreeDepth) into a sibling.
3291
3292         * html/parser/HTMLDocumentParser.cpp:
3293         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3294         (WebCore::HTMLDocumentParser::maximumDOMTreeDepth):
3295         * html/parser/HTMLDocumentParser.h:
3296         Pass the maximumDOMTreeDepth to the TreeBuilder.
3297
3298         * html/parser/HTMLElementStack.cpp:
3299         (WebCore::HTMLElementStack::HTMLElementStack):
3300         (WebCore::HTMLElementStack::popAll):
3301         (WebCore::HTMLElementStack::insertAbove):
3302         (WebCore::HTMLElementStack::pushCommon):
3303         (WebCore::HTMLElementStack::popCommon):
3304         (WebCore::HTMLElementStack::removeNonTopCommon):
3305         * html/parser/HTMLElementStack.h:
3306         (WebCore::HTMLElementStack::size):
3307         Keep track of the size of the element stack.
3308
3309         * html/parser/HTMLTreeBuilder.cpp:
3310         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3311         * html/parser/HTMLTreeBuilder.h:
3312         (WebCore::HTMLTreeBuilder::create):
3313         Pass the maximumDOMTreeDepth to the construction site.
3314
3315         * page/Settings.cpp:
3316         (WebCore::Settings::Settings):
3317         * page/Settings.h:
3318         (WebCore::Settings::setMaximumHTMLParserDOMTreeDepth):
3319         (WebCore::Settings::maximumHTMLParserDOMTreeDepth):
3320         Add a setting to control the maximum DOM tree depth that the parser will produce.
3321
3322 2011-06-22  Adam Barth  <abarth@webkit.org>
3323
3324         Rollout 88332.  As discussed on webkit-dev, we'd like to iterate on
3325         both the API and it's implementation a bit.
3326
3327         * WebCore.gypi:
3328         * bindings/generic/RuntimeEnabledFeatures.cpp:
3329         * bindings/generic/RuntimeEnabledFeatures.h:
3330         * dom/DocumentMarker.h:
3331         (WebCore::DocumentMarker::activeMatch):
3332         * dom/DocumentMarkerController.cpp:
3333         * dom/DocumentMarkerController.h:
3334         * html/HTMLDivElement.cpp:
3335         * html/HTMLDivElement.h:
3336         * html/HTMLDivElement.idl:
3337         * html/HTMLInputElement.cpp:
3338         * html/HTMLInputElement.h:
3339         * html/HTMLInputElement.idl:
3340         * html/HTMLTextAreaElement.cpp:
3341         * html/HTMLTextAreaElement.h:
3342         * html/HTMLTextAreaElement.idl:
3343         * html/SpellcheckRange.cpp: Removed.
3344         * html/SpellcheckRange.h: Removed.
3345         * html/SpellcheckRange.idl: Removed.
3346         * html/SpellcheckRangeList.cpp: Removed.
3347         * html/SpellcheckRangeList.h: Removed.
3348         * html/SpellcheckRangeList.idl: Removed.
3349         * rendering/InlineTextBox.cpp:
3350         (WebCore::textCheckingLineStyleForMarkerType):
3351         (WebCore::InlineTextBox::paintDocumentMarkers):
3352
3353 2011-06-22  Mark Pilgrim  <pilgrim@chromium.org>
3354
3355         Reviewed by Adam Barth.
3356
3357         IndexedDB: fix multiple issues in IDBDatabase.idl
3358         https://bugs.webkit.org/show_bug.cgi?id=63140
3359
3360         Tests: storage/indexeddb/createObjectStore-name-argument-required.html
3361                storage/indexeddb/createObjectStore-null-name.html
3362                storage/indexeddb/deleteObjectStore-name-argument-required.html
3363                storage/indexeddb/deleteObjectStore-null-name.html
3364                storage/indexeddb/setVersion-null.html
3365                storage/indexeddb/transaction-storeNames-required.html
3366
3367         * storage/IDBDatabase.idl: remove LegacyDefaultOptionalArguments so
3368         all functions will throw TypeError when called with too few arguments,
3369         as per WebIDL spec. Also remove ConvertNullToNullString flags so null
3370         values are stringified as "null" (also as per WebIDL spec).
3371
3372 2011-06-22  Vsevolod Vlasov  <vsevik@chromium.org>
3373
3374         Reviewed by Pavel Feldman.
3375
3376         Web Inspector: Move logic for deciding whether resource content should be base64 encoded on backend.
3377         https://bugs.webkit.org/show_bug.cgi?id=63069
3378
3379         * inspector/Inspector.json:
3380         * inspector/InspectorPageAgent.cpp:
3381         (WebCore::InspectorPageAgent::cachedResourceContent):
3382         (WebCore::InspectorPageAgent::resourceContent):
3383         (WebCore::InspectorPageAgent::getResourceContent):
3384         (WebCore::InspectorPageAgent::searchInResources):
3385         * inspector/InspectorPageAgent.h:
3386         * inspector/InspectorResourceAgent.cpp:
3387         (WebCore::InspectorResourceAgent::getResourceContent):
3388         * inspector/InspectorResourceAgent.h:
3389         * inspector/InspectorStyleSheet.cpp:
3390         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
3391         * inspector/front-end/NetworkManager.js:
3392         (WebInspector.NetworkManager.prototype.requestContent):
3393         * inspector/front-end/Resource.js:
3394         (WebInspector.Resource.prototype._innerRequestContent.onResourceContent):
3395         (WebInspector.Resource.prototype._innerRequestContent):
3396
3397 2011-06-22  Luke Macpherson   <macpherson@chromium.org>
3398
3399         Reviewed by Dimitri Glazkov.
3400
3401         Support cast from CSSPrimitiveValue to short and use for CSSPropertyWidows and CSSPropertyOrphans.
3402         https://bugs.webkit.org/show_bug.cgi?id=62964
3403
3404         No new tests / refactoring only.
3405
3406         * css/CSSPrimitiveValueMappings.h:
3407         Support cast to/from short.
3408         * css/CSSStyleSelector.cpp:
3409         (WebCore::CSSStyleSelector::applyProperty):
3410         Use cast to short to allow CSSPropertWidows and CSSPropertyOrphans to use existing macro.
3411
3412 2011-06-22  Eunmi Lee  <eunmi15.lee@samsung.com>
3413
3414         Reviewed by Martin Robinson.
3415
3416         Change GtkWidgetBackingStore.h to WidgetBackingStore.h in order to use in the EFL port.
3417         https://bugs.webkit.org/show_bug.cgi?id=62848
3418
3419         This patch will make GtkWidgetBackingStore shareable with EFL port.
3420         It is a preparation to integrate WebKit2's BackingStoreGtk.cpp and
3421         BackingStoreEfl.cpp as a BackingStoreCairo.cpp.
3422
3423         * GNUmakefile.am:
3424         * GNUmakefile.list.am:
3425         * platform/graphics/cairo/CairoUtilities.cpp:
3426         (WebCore::copyRectFromOneSurfaceToAnother):
3427         * platform/graphics/cairo/CairoUtilities.h:
3428         * platform/cairo/WidgetBackingStore.h: Added.
3429         * platform/gtk/GtkWidgetBackingStore.h: Removed.
3430         * platform/gtk/GtkWidgetBackingStoreCairo.cpp:
3431         (WebCore::createSurfaceForBackingStore):
3432         (WebCore::WidgetBackingStorePrivate::create):
3433         (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate):
3434         (WebCore::WidgetBackingStore::create):
3435         (WebCore::WidgetBackingStore::WidgetBackingStore):
3436         (WebCore::WidgetBackingStore::~WidgetBackingStore):
3437         (WebCore::WidgetBackingStore::cairoSurface):
3438         (WebCore::WidgetBackingStore::scroll):
3439         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
3440         (WebCore::WidgetBackingStorePrivate::create):
3441         (WebCore::WidgetBackingStorePrivate::~WidgetBackingStorePrivate):
3442         (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate):
3443         (WebCore::WidgetBackingStore::create):
3444         (WebCore::WidgetBackingStore::WidgetBackingStore):
3445         (WebCore::WidgetBackingStore::~WidgetBackingStore):
3446         (WebCore::WidgetBackingStore::cairoSurface):
3447         (WebCore::WidgetBackingStore::scroll):
3448
3449 2011-06-22  Simon Fraser  <simon.fraser@apple.com>
3450
3451         Reviewed by Dan Bernstein.
3452
3453         Update position, bounds and anchor point in GraphicsLayerCA all at once
3454         https://bugs.webkit.org/show_bug.cgi?id=63148
3455
3456         Since position, bounds and anchor point are inter-dependent, avoid
3457         redundant work by simply updating them all at the same time.
3458         
3459         No behavior changes, so no new tests.
3460
3461         * platform/graphics/ca/GraphicsLayerCA.cpp:
3462         (WebCore::GraphicsLayerCA::setPosition):
3463         (WebCore::GraphicsLayerCA::setAnchorPoint):
3464         (WebCore::GraphicsLayerCA::setSize):
3465         (WebCore::GraphicsLayerCA::setBoundsOrigin):
3466         (WebCore::GraphicsLayerCA::setAllowTiledLayer):
3467         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3468         (WebCore::GraphicsLayerCA::updateGeometry):
3469         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3470         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3471         * platform/graphics/ca/GraphicsLayerCA.h:
3472
3473 2011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
3474
3475         Reviewed by Darin Adler.
3476
3477         Make instantiation of legacy editing position more explicit
3478         https://bugs.webkit.org/show_bug.cgi?id=63037
3479
3480         Replaced the constructor of Position class that used to instantiate a legacy editing position
3481         by a function called createLegacyEditingPosition.
3482
3483         * WebCore.exp.in: Removed the constructor from the list.
3484         * accessibility/AXObjectCache.cpp:
3485         (WebCore::AXObjectCache::visiblePositionForTextMarkerData): Calls createLegacyEditingPosition.
3486         * accessibility/gtk/AXObjectCacheAtk.cpp: