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