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