Use the original token to create an element in "reconstruct the active formatting...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2
3         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
4         https://bugs.webkit.org/show_bug.cgi?id=91703
5
6         Reviewed by Adam Barth.
7
8         The current WebKit HTML5 parser implementation does not hold the original token
9         in the stack of open elements and the active formatting elements. This is
10         problematic because the original token is used to create an element in
11         "reconstruct the active formatting elements" and "call the adoption agency".
12
13         As a workaround, WebKit uses the saved element instead of the original token
14         to create an element. But this causes us to fail examples like this:
15         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
16         reconstructTheActiveFormattingElements calls this method to open a second <b>
17         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
18         should be "1".
19
20         Created a ref-counted container class, HTMLStackItem to hold the original token
21         and the namespace URI as well as the element. Changed HTMLElementStack and
22         HTMLFormattingElementList to use HTMLStackItem.
23         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
24         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
25         instead of the saved element.
26
27         Updated test expectation for html5lib/runner-expected.txt
28         because now resources/scripted/adoption01.dat passes.
29
30         * html/parser/HTMLConstructionSite.cpp:
31         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
32         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
33         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
34         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
35         (WebCore::HTMLConstructionSite::insertHTMLElement):
36         (WebCore::HTMLConstructionSite::insertFormattingElement):
37         (WebCore::HTMLConstructionSite::insertScriptElement):
38         (WebCore::HTMLConstructionSite::insertForeignElement):
39         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
40         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
41         * html/parser/HTMLConstructionSite.h:
42         (HTMLConstructionSite):
43         (WebCore::HTMLConstructionSite::currentElementRecord):
44         * html/parser/HTMLElementStack.cpp:
45         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
46         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
47         (WebCore::HTMLElementStack::pushRootNode):
48         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
49         (WebCore::HTMLElementStack::pushRootNodeCommon):
50         (WebCore::HTMLElementStack::pushHTMLHeadElement):
51         (WebCore::HTMLElementStack::pushHTMLBodyElement):
52         (WebCore::HTMLElementStack::push):
53         (WebCore::HTMLElementStack::insertAbove):
54         (WebCore::HTMLElementStack::pushCommon):
55         * html/parser/HTMLElementStack.h:
56         (WebCore::HTMLElementStack::ElementRecord::element):
57         (WebCore::HTMLElementStack::ElementRecord::node):
58         (WebCore::HTMLElementStack::ElementRecord::stackItem):
59         (ElementRecord):
60         (HTMLElementStack):
61         * html/parser/HTMLFormattingElementList.cpp:
62         (WebCore::HTMLFormattingElementList::swapTo):
63         (WebCore::HTMLFormattingElementList::append):
64         * html/parser/HTMLFormattingElementList.h:
65         (WebCore::HTMLFormattingElementList::Entry::Entry):
66         (WebCore::HTMLFormattingElementList::Entry::isMarker):
67         (WebCore::HTMLFormattingElementList::Entry::stackItem):
68         (WebCore::HTMLFormattingElementList::Entry::element):
69         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
70         (WebCore::HTMLFormattingElementList::Entry::operator==):
71         (WebCore::HTMLFormattingElementList::Entry::operator!=):
72         (Entry):
73         (HTMLFormattingElementList):
74         * html/parser/HTMLStackItem.h: Added.
75         (WebCore):
76         (HTMLStackItem):
77         (WebCore::HTMLStackItem::create):
78         (WebCore::HTMLStackItem::element):
79         (WebCore::HTMLStackItem::node):
80         (WebCore::HTMLStackItem::token):
81         (WebCore::HTMLStackItem::namespaceURI):
82         (WebCore::HTMLStackItem::HTMLStackItem):
83         * html/parser/HTMLTreeBuilder.cpp:
84         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
85         (WebCore::HTMLTreeBuilder::processStartTag):
86         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
87
88 2012-07-23  Andreas Kling  <kling@webkit.org>
89
90         Report the extra memory used by immutable StylePropertySet objects.
91         <http://webkit.org/b/92032>
92
93         Reviewed by Anders Carlsson.
94
95         Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
96         size on top of sizeof(T).
97
98         Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
99         tacked onto the end of the object when m_isMutable == false.
100
101         * css/StylePropertySet.h:
102         (WebCore::StylePropertySet::reportMemoryUsage):
103         * dom/MemoryInstrumentation.h:
104         (WebCore::MemoryObjectInfo::reportObjectInfo):
105         (WebCore::MemoryClassInfo::MemoryClassInfo):
106
107 2012-07-23  Gregg Tavares  <gman@google.com>
108
109         Fix WebGL texSubImage2D for cube maps
110         https://bugs.webkit.org/show_bug.cgi?id=91927
111
112         Reviewed by Kenneth Russell.
113
114         Fixes texSubImage2D so any size rectangle can be passed in
115         for cube maps.
116
117         Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
118
119         * html/canvas/WebGLRenderingContext.cpp:
120         (WebCore):
121         (WebCore::WebGLRenderingContext::copyTexImage2D):
122         (WebCore::WebGLRenderingContext::texImage2DBase):
123         (WebCore::WebGLRenderingContext::texSubImage2DBase):
124         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
125         * html/canvas/WebGLRenderingContext.h:
126         (WebGLRenderingContext):
127
128 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
129
130         Unreviewed, rolling out r123387.
131         http://trac.webkit.org/changeset/123387
132         https://bugs.webkit.org/show_bug.cgi?id=92036
133
134         Broke chromium win build (Requested by tony^work on #webkit).
135
136         * WebCore.gyp/WebCore.gyp:
137         * WebCore.gyp/scripts/rule_bison.py:
138         * bindings/scripts/preprocessor.pm:
139         (applyPreprocessor):
140         * make-hash-tools.pl:
141
142 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
143
144         Ref-count AtomicHTMLToken
145         https://bugs.webkit.org/show_bug.cgi?id=91981
146
147         Reviewed by Adam Barth.
148
149         Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
150
151         No new tests - no functional changes.
152
153         * html/parser/HTMLConstructionSite.cpp:
154         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
155         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
156         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
157         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
158         (WebCore::HTMLConstructionSite::insertDoctype):
159         (WebCore::HTMLConstructionSite::insertComment):
160         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
161         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
162         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
163         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
164         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
165         (WebCore::HTMLConstructionSite::insertHTMLElement):
166         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
167         (WebCore::HTMLConstructionSite::insertFormattingElement):
168         (WebCore::HTMLConstructionSite::insertScriptElement):
169         (WebCore::HTMLConstructionSite::insertForeignElement):
170         (WebCore::HTMLConstructionSite::createElement):
171         (WebCore::HTMLConstructionSite::createHTMLElement):
172         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
173         * html/parser/HTMLConstructionSite.h:
174         (HTMLConstructionSite):
175         * html/parser/HTMLToken.h:
176         (WebCore::AtomicHTMLToken::create):
177         (AtomicHTMLToken):
178         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
179         * html/parser/HTMLTreeBuilder.cpp:
180         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
181         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
182         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
183         (WebCore::HTMLTreeBuilder::processToken):
184         (WebCore::HTMLTreeBuilder::processDoctypeToken):
185         (WebCore::HTMLTreeBuilder::processFakeStartTag):
186         (WebCore::HTMLTreeBuilder::processFakeEndTag):
187         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
188         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
189         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
190         (WebCore):
191         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
192         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
193         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
194         (WebCore::HTMLTreeBuilder::processStartTag):
195         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
196         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
197         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
198         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
199         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
200         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
201         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
202         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
203         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
204         (WebCore::HTMLTreeBuilder::processEndTag):
205         (WebCore::HTMLTreeBuilder::processComment):
206         (WebCore::HTMLTreeBuilder::processCharacter):
207         (WebCore::HTMLTreeBuilder::processEndOfFile):
208         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
209         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
210         (WebCore::HTMLTreeBuilder::defaultForInHead):
211         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
212         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
213         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
214         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
215         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
216         (WebCore::HTMLTreeBuilder::processScriptStartTag):
217         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
218         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
219         (WebCore::HTMLTreeBuilder::parseError):
220         * html/parser/HTMLTreeBuilder.h:
221         (HTMLTreeBuilder):
222         * html/parser/TextDocumentParser.cpp:
223         (WebCore::TextDocumentParser::insertFakePreElement):
224
225 2012-07-23  Scott Graham  <scottmg@google.com>
226
227         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
228         https://bugs.webkit.org/show_bug.cgi?id=91667
229
230         Reviewed by Tony Chang.
231
232         Using native tools instead of cygwin version improves build time
233         performance by roughly 50% (on top of previous cl-instead-of-gcc
234         change).
235
236         Also, use - instead of / for cl flags because a layer of project
237         generator converts them to \ otherwise, which causes the preprocessing
238         to fail (very slowly because of the cygwin-loop with a sleep 1).
239
240         No new tests.
241
242         * WebCore.gyp/WebCore.gyp:
243         * WebCore.gyp/scripts/rule_bison.py:
244         * bindings/scripts/preprocessor.pm:
245         (applyPreprocessor):
246         * make-hash-tools.pl:
247
248 2012-06-12  Jer Noble  <jer.noble@apple.com>
249
250         MediaController.currentTime should be kept stable during script execution.
251         https://bugs.webkit.org/show_bug.cgi?id=88555
252
253         Reviewed by Eric Carlson.
254
255         Test: media/media-controller-time-constant.html
256
257         To keep MediaController.currentTime stable, add a new m_position variable and 
258         a new m_clearPositionTimer timer.  Both must be mutable variables as they will
259         be updated from within const functions.  Calls to currentTime() will result in
260         stable values until the next runloop iteration.
261
262         * html/MediaController.cpp:
263         (MediaController::MediaController):
264         (MediaController::currentTime):
265         (MediaController::setCurrentTime):
266         (MediaController::clearPositionTimerFired):
267         * html/MediaController.h:
268
269 2012-07-23  Huang Dongsung  <luxtella@company100.net>
270
271         Destroy CSS decoded data more eagerly once they become dead caches.
272         https://bugs.webkit.org/show_bug.cgi?id=91733
273
274         Reviewed by Geoffrey Garen.
275
276         Internal review by Kwang Yul Seo.
277
278         There are three CachedResources with decoded data: CachedImage, CachedScript
279         and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we
280         eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved().
281         We must apply the same policy here in CachedCSSStyleSheet because priority
282         inversion can occur. For example, we can't destroy the decoded data of CachedImages
283         when they are referenced by CachedCSSStyleSheet as background, mask or border
284         images.
285
286         No new tests - no new testable functionality.
287
288         * loader/cache/CachedCSSStyleSheet.cpp:
289         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
290         (WebCore::CachedCSSStyleSheet::didAddClient):
291         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
292         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
293         (WebCore):
294         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
295         * loader/cache/CachedCSSStyleSheet.h:
296         (CachedCSSStyleSheet):
297
298 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
299
300         Part 2 of: Implement sticky positioning
301         https://bugs.webkit.org/show_bug.cgi?id=90046
302
303         Reviewed by Ojan Vafai.
304
305         Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky'
306         value for position, returning it from getComputedStyle(), and storing it in RenderStyle.
307
308         Test: fast/css/sticky/parsing-position-sticky.html
309
310         * Configurations/FeatureDefines.xcconfig:
311         * css/CSSComputedStyleDeclaration.cpp:
312         (WebCore::getPositionOffsetValue):
313         * css/CSSParser.cpp:
314         (WebCore::isValidKeywordPropertyAndValue):
315         * css/CSSPrimitiveValueMappings.h:
316         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
317         (WebCore::CSSPrimitiveValue::operator EPosition):
318         * css/CSSValueKeywords.in:
319         * rendering/style/RenderStyle.h:
320         * rendering/style/RenderStyleConstants.h:
321
322 2012-07-23  Stephen Chenney  <schenney@chromium.org>
323
324         Crash when setting empty class name on a new element
325         https://bugs.webkit.org/show_bug.cgi?id=92024
326
327         Reviewed by Andreas Kling.
328
329         Add a check for null attributeData() when setting the className to an
330         empty string on a newly created element. New SVG elements have null
331         attributeData() on baseVal upon creation.
332
333         Test: svg/custom/empty-className-baseVal-crash.html
334
335         * dom/StyledElement.cpp:
336         (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
337
338 2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
339
340         [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
341         https://bugs.webkit.org/show_bug.cgi?id=80622
342
343         Reviewed by Adrienne Walker.
344
345         clipRect(), usesLayerClipping(), and drawableContentRect() have been
346         very confusing in CCLayerTreeHostCommon for a while. This patch
347         refactors it so that (1) clipping is only done locally in
348         calcDrawTransforms, and (2) the layer's drawableContentRect value
349         is now meaningful value outside of calcDrawTransforms.
350         Additionally, the layer is now always clipped to the root
351         surface's contentBounds (which are set to the viewport bounds).
352         This refactor not only makes calcDrawTransforms far more readable and intuitive, but
353         this patch enables more upcoming beneficial refactors, including
354         the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953.
355
356         Tests are also significantly updated to keep up with this refactoring change.
357
358         * platform/graphics/chromium/LayerChromium.cpp:
359         (WebCore::LayerChromium::LayerChromium):
360         * platform/graphics/chromium/LayerChromium.h:
361         (LayerChromium):
362         Removed m_usesLayerClipping and m_clipRect and associated accessors.
363
364         * platform/graphics/chromium/RenderSurfaceChromium.h:
365         (RenderSurfaceChromium):
366         Updated comment
367
368         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
369         (WebCore::CCLayerImpl::CCLayerImpl):
370         * platform/graphics/chromium/cc/CCLayerImpl.h:
371         (CCLayerImpl):
372         Removed m_usesLayerClipping and m_clipRect and associated accessors.
373
374         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
375         (WebCore::CCLayerTreeHost::updateLayers):
376         removed setClipRect code that no longer applies
377
378         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
379         (WebCore::calculateLayerScissorRect):
380         scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect.
381
382         (WebCore::calculateSurfaceScissorRect):
383         scissor rect is now a little bit tighter, except when filters are involved.
384
385         (WebCore::layerClipsSubtree):
386         new helper function
387
388         (WebCore):
389         (WebCore::calculateVisibleContentRect):
390         (WebCore::subtreeShouldRenderToSeparateSurface):
391         (WebCore::calculateDrawTransformsInternal):
392            - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns,
393            - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping.
394            - removed the boolean return value, which was redundant with drawableContentRectOfSubtree.
395            - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic.
396            - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space.
397
398         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
399         (WebCore::pointIsClippedBySurfaceOrClipRect):
400         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
401         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
402         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
403         (WebCore::::layerScissorRectInTargetSurface):
404         Updated this accessor.  It could be removed in the future, but not appropriate for this patch.
405
406         * platform/graphics/chromium/cc/CCRenderSurface.h:
407
408 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
409
410         [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system.
411
412         * CMakeLists.txt:
413
414 2012-07-23  Ryosuke Niwa  <rniwa@webkit.org>
415
416         REGRESSION(r123281): childNodes sometimes returns wrong nodes
417         https://bugs.webkit.org/show_bug.cgi?id=92014
418
419         Reviewed by Anders Carlsson.
420
421         The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as
422         firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()),
423         NOT firstNode(forward, rootNode(), previous)
424         as evident from the argument list of the function.
425
426         Test: fast/dom/NodeList/childNodes-reverse-iteration.html
427
428         * html/HTMLCollection.cpp:
429         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
430
431 2012-07-23  Steve VanDeBogart  <vandebo@chromium.org>
432
433         Chrome/Skia: PDF print output does not have clickable links.
434         https://bugs.webkit.org/show_bug.cgi?id=91171
435
436         Reviewed by Stephen White.
437
438         Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
439
440         Printing is not generally testable.
441
442         * platform/graphics/skia/GraphicsContextSkia.cpp:
443         (WebCore::GraphicsContext::setURLForRect):
444
445 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
446
447         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
448         https://bugs.webkit.org/show_bug.cgi?id=91006
449
450         Reviewed by Ryosuke Niwa.
451
452         The rationale here is that the client doesn't need to know about the touch
453         event handler count. needTouchEvents was already used for that purpose.
454
455         Test: fast/events/touch/touch-handler-count.html
456
457         * dom/Document.cpp:
458         (WebCore::Document::Document):
459         (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed.
460         (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER
461         flag for the document if we reach a count of zero. The rationale being that
462         hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for
463         the same purpose.
464         * dom/Document.h:
465         (Document):
466         (WebCore::Document::touchEventHandlerCount):
467         * loader/EmptyClients.h:
468         * page/ChromeClient.h:
469         (ChromeClient):
470         * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged.
471         (WebCore::Frame::setDocument): call needsTouchEvents directly.
472         * page/Frame.h: Ditto.
473         (Frame):
474         * testing/Internals.cpp:
475         (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly
476         for additional testing.
477         (WebCore):
478         * testing/Internals.h:
479         (Internals):
480         * testing/Internals.idl:
481
482 2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
483
484         [Qt] RenderThemeQtMobile highlight colors are not being used
485         https://bugs.webkit.org/show_bug.cgi?id=92004
486
487         Reviewed by Noam Rosenthal.
488
489         The issue here is that setPaletteFromPageClientIfExists() is being used as a
490         virtual function, but it isn't, so when platformActiveSelectionBackgroundColor()
491         runs, it doesn't pick the right palette.
492
493         Besides fixing this virtual behavior, the patch changes the structure a bit,
494         because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme
495         to set the palette, which isn't exactly what the function name says.
496
497         * platform/qt/RenderThemeQt.cpp:
498         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
499         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
500         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
501         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
502         (WebCore::RenderThemeQt::platformFocusRingColor):
503         (WebCore::RenderThemeQt::systemColor):
504         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
505         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
506         Use the virtual colorPalette() to get the palette.
507
508         (WebCore::RenderThemeQt::colorPalette):
509         (WebCore): Removed the code for getting the page client from here since it is
510         used only by the QStyle variant.
511
512         * platform/qt/RenderThemeQt.h:
513         (RenderThemeQt):
514         * platform/qt/RenderThemeQtMobile.cpp:
515         (WebCore::RenderThemeQtMobile::colorPalette):
516         (WebCore):
517         * platform/qt/RenderThemeQtMobile.h:
518         (RenderThemeQtMobile):
519
520 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
521
522         Part 1 of: Implement sticky positioning
523         https://bugs.webkit.org/show_bug.cgi?id=90046
524
525         Reviewed by Ojan Vafai.
526
527         Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
528         
529         Sort the ENABLE_CSS lines in the file. Make sure all the flags
530         are in FEATURE_DEFINES.
531
532         * Configurations/FeatureDefines.xcconfig:
533
534 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
535
536         Unreviewed, rolling out r123339.
537         http://trac.webkit.org/changeset/123339
538         https://bugs.webkit.org/show_bug.cgi?id=92006
539
540         massive media tests failure (Requested by philn on #webkit).
541
542         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
543         (WTF::adoptGRef):
544         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
545         (setGstElementClassMetadata):
546         * platform/graphics/gstreamer/GStreamerVersioning.h:
547
548 2012-07-21  Vincent Scheib  <scheib@chromium.org>
549
550         webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
551         https://bugs.webkit.org/show_bug.cgi?id=91892
552
553         Reviewed by Adam Barth.
554
555         PointerLockElement only returned when requested from the document that owns it.
556
557         Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
558                http/tests/fullscreen/fullscreenelement-same-origin.html
559                http/tests/pointer-lock/pointerlockelement-different-origin.html
560                http/tests/pointer-lock/pointerlockelement-same-origin.html
561
562         * dom/Document.cpp:
563         (WebCore::Document::webkitPointerLockElement):
564
565 2012-07-23  Philippe Normand  <pnormand@igalia.com>
566
567         [GTK][jhbuild] Switch to GStreamer 0.11 build
568         https://bugs.webkit.org/show_bug.cgi?id=91727
569
570         Reviewed by Gustavo Noronha Silva.
571
572         Add a new function to encapsulate the GStreamer API removal of
573         GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this
574         macro can now be replaced by calling the g_object_is_floating
575         function.
576
577         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
578         (WTF::adoptGRef):
579         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
580         (gstObjectIsFloating):
581         * platform/graphics/gstreamer/GStreamerVersioning.h:
582
583 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
584
585         [EFL] media/controls-styling.html is failing
586         https://bugs.webkit.org/show_bug.cgi?id=91984
587
588         Reviewed by Eric Carlson.
589
590         Make sure that the CSS properties letter-spacing, word-spacing,
591         line-height, text-transform, text-indent, text-shadow,
592         text-decoration and color do not affect the media element controls,
593         that display text.
594
595         No new tests. Already tested by media/controls-styling.html and
596         media/controls-styling-strict.html
597
598         * css/mediaControlsEfl.css:
599         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
600
601 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
602
603         Unreviewed. Fix make distcheck.
604
605         * GNUmakefile.list.am: Add missing header files.
606
607 2012-07-23  Kent Tamura  <tkent@chromium.org>
608
609         Replace some instances of shadowAncestorNode() with shadowHost()
610         https://bugs.webkit.org/show_bug.cgi?id=91966
611
612         Reviewed by Hajime Morita.
613
614         shadowAncestorNode() is deprecated. We should use shadowHost().
615         No new tests. This doesn't change any behavior.
616
617         * css/SelectorChecker.cpp:
618         (WebCore::SelectorChecker::checkSelector):
619         * dom/TreeScope.cpp:
620         (WebCore::listTreeScopes):
621         * html/HTMLSummaryElement.cpp:
622         (WebCore::isClickableControl):
623         * html/shadow/DetailsMarkerControl.cpp:
624         (WebCore::DetailsMarkerControl::summaryElement):
625         * html/shadow/MeterShadowElement.cpp:
626         (WebCore::MeterShadowElement::meterElement):
627         * html/shadow/ProgressShadowElement.cpp:
628         (WebCore::ProgressShadowElement::progressElement):
629         * html/shadow/SliderThumbElement.cpp:
630         (WebCore::RenderSliderThumb::layout):
631         (WebCore::RenderSliderContainer::layout):
632         (WebCore::SliderThumbElement::hostInput):
633         (WebCore::TrackLimiterElement::shadowPseudoId):
634         (WebCore::SliderContainerElement::shadowPseudoId):
635         * html/shadow/TextControlInnerElements.cpp:
636         (WebCore::TextControlInnerElement::customStyleForRenderer):
637         (WebCore::TextControlInnerTextElement::defaultEventHandler):
638         (WebCore::TextControlInnerTextElement::createRenderer):
639         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
640         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
641         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
642         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
643         (WebCore::SpinButtonElement::defaultEventHandler):
644         (WebCore::SpinButtonElement::step):
645         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
646         (WebCore::InputFieldSpeechButtonElement::setState):
647         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
648         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
649         * rendering/RenderTextControlSingleLine.cpp:
650         (WebCore::RenderTextControlInnerBlock::positionForPoint):
651
652 2012-07-23  Pavel Feldman  <pfeldman@chromium.org>
653
654         [WK2] REGRESSION r122966: Crash when closing tab with Web Inspector open in WebKit::PageOverlay
655         https://bugs.webkit.org/show_bug.cgi?id=91782
656
657         Reviewed by Yury Semikhatsky.
658
659         hideHighlight was never called once user hovered over a node.
660
661         * inspector/DOMNodeHighlighter.cpp:
662         (WebCore::InspectorOverlay::update):
663
664 2012-07-23  Peter Beverloo  <peter@chromium.org>
665
666         [Chromium] Build fix for the Windows builder following r123311
667         https://bugs.webkit.org/show_bug.cgi?id=91979
668
669         Unreviewed build fix.
670
671         Changeset r123311 moved the TextCodecWinCE.{cpp,h} files to the Windows
672         directory. Update Chromium's references to these files to fix the build.
673
674         * WebCore.gypi:
675
676 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
677
678         [WIN] Remove ICU dependencies from UniscribeController
679         https://bugs.webkit.org/show_bug.cgi?id=91921
680
681         Reviewed by Ryosuke Niwa.
682
683         Replace ICU specific functions and macros with the corresponding code from WTF::Unicode.
684         This allows us to use UniscribeController with an other Unicode implementation too.
685
686         * platform/graphics/win/UniscribeController.cpp:
687         (WebCore::UniscribeController::advance):
688
689 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
690
691         [EFL] media/controls-styling-strict.html is failing
692         https://bugs.webkit.org/show_bug.cgi?id=91960
693
694         Reviewed by Kenneth Rohde Christiansen.
695
696         Use "display: -webkit-box;" instead of inline-block
697         for current-time control. This is needed because
698         inline-block behaves differently in strict mode.
699
700         No new test, already tested by media/controls-styling-strict.html
701
702         * css/mediaControlsEfl.css:
703         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
704
705 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
706
707         Unreviewed. Fix GTK+ build with ENABLE_DATALIST_ELEMENT.
708
709         Add an implementation for virtual pure methods sliderTickSize()
710         and sliderTickOffsetFromTrackCenter() when HTML5 datalist element
711         is enabled.
712
713         * platform/gtk/RenderThemeGtk.cpp:
714         (WebCore):
715         (WebCore::RenderThemeGtk::sliderTickSize):
716         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
717         * platform/gtk/RenderThemeGtk.h:
718
719 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
720
721         Replace getCurrentLocalTime() with GetLocalTime() in LocaleWin.cpp
722         https://bugs.webkit.org/show_bug.cgi?id=91937
723
724         Reviewed by Ryosuke Niwa.
725
726         The windows function returns the required year directly and
727         removes one additonal dependecy on getCurrentLocalTime().
728
729         * platform/text/LocaleWin.cpp:
730         (WebCore::LocaleWin::LocaleWin):
731
732 2012-07-23  Vsevolod Vlasov  <vsevik@chromium.org>
733
734         Web Inspector: Drag and drop should not be started on right mouse click.
735         https://bugs.webkit.org/show_bug.cgi?id=91728
736
737         Reviewed by Pavel Feldman.
738
739         Introduced WebInspector.installDragHandle method to control drag and drop support, checking whichg mouse button is pressed.
740         Simplified WebInspector._elementDragStart, removed "element" parameter.
741         Simplified tab moving support in TabbedPane, removed "mousemove" handler.
742         Removed while loop determining which element was dragged in TimelineOverviewPane, each drag support is now installed independently.
743         Drive-by: fixed TimelineOverviewPane window moving on resources-dividers-label-bar drang-and-drop.
744         Drive-by: fixed CSSStyleModel compilation.
745
746         * inspector/front-end/CSSStyleModel.js:
747         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
748         * inspector/front-end/DataGrid.js:
749         (WebInspector.DataGrid.prototype._positionResizers):
750         (WebInspector.DataGrid.prototype._startResizerDragging):
751         (WebInspector.DataGrid.prototype._endResizerDragging):
752         * inspector/front-end/Drawer.js:
753         (WebInspector.Drawer):
754         (WebInspector.Drawer.prototype._animationDuration):
755         (WebInspector.Drawer.prototype._startStatusBarDragging):
756         (WebInspector.Drawer.prototype._endStatusBarDragging):
757         * inspector/front-end/HeapSnapshotView.js:
758         (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging):
759         (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging):
760         * inspector/front-end/SidebarOverlay.js:
761         (WebInspector.SidebarOverlay.prototype.set _startResizerDragging):
762         (WebInspector.SidebarOverlay.prototype._endResizerDragging):
763         (WebInspector.SidebarOverlay.prototype._installResizer):
764         * inspector/front-end/Spectrum.js:
765         * inspector/front-end/SplitView.js:
766         (WebInspector.SplitView.prototype._startResizerDragging):
767         (WebInspector.SplitView.prototype._endResizerDragging):
768         (WebInspector.SplitView.prototype.installResizer):
769         * inspector/front-end/TabbedPane.js:
770         (WebInspector.TabbedPaneTab.prototype._createTabElement):
771         (WebInspector.TabbedPaneTab.prototype._tabMouseDown):
772         (WebInspector.TabbedPaneTab.prototype._startTabDragging):
773         (WebInspector.TabbedPaneTab.prototype._endTabDragging):
774         * inspector/front-end/TimelineOverviewPane.js:
775         (WebInspector.TimelineOverviewPane):
776         (WebInspector.TimelineOverviewWindow):
777         (WebInspector.TimelineOverviewWindow.prototype._leftResizeElementDragging):
778         (WebInspector.TimelineOverviewWindow.prototype._rightResizeElementDragging):
779         (WebInspector.TimelineOverviewWindow.prototype._startWindowSelectorDragging):
780         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
781         (WebInspector.TimelineOverviewWindow.prototype._startWindowDragging):
782         (WebInspector.TimelineOverviewWindow.prototype._windowDragging):
783         (WebInspector.TimelineOverviewWindow.prototype._endWindowDragging):
784         (WebInspector.TimelineOverviewWindow.prototype._moveWindow):
785         (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel):
786         * inspector/front-end/TimelinePanel.js:
787         (WebInspector.TimelinePanel):
788         (WebInspector.TimelinePanel.prototype._startSplitterDragging):
789         (WebInspector.TimelinePanel.prototype._endSplitterDragging):
790         * inspector/front-end/Toolbar.js:
791         (WebInspector.Toolbar):
792         (WebInspector.Toolbar.prototype._toolbarDragStart):
793         (WebInspector.Toolbar.prototype._toolbarDragEnd):
794         * inspector/front-end/UIUtils.js:
795         (WebInspector.installDragHandle):
796         (WebInspector._elementDragStart):
797         (WebInspector._elementDragEnd):
798         * inspector/front-end/timelinePanel.css:
799         (#timeline-overview-grid .resources-dividers-label-bar):
800
801 2012-07-23  Hayato Ito  <hayato@chromium.org>
802
803         ComposedShadowTreeWalker should skip an empty insertion points.
804         https://bugs.webkit.org/show_bug.cgi?id=91826
805
806         Reviewed by Hajime Morita.
807
808         ComposedShadowTreeWalker wrongly returns 'null' if it encounters
809         an insertion point into where no nodes are distributed.  We should
810         skip such an insertion point and continue walking using the next
811         possible node, which might be a next sibling or a next distributed
812         node, and resolve the next node recursively.
813
814         Test: fast/dom/shadow/composed-shadow-tree-walker.html
815
816         * dom/ComposedShadowTreeWalker.cpp:
817         (WebCore::ComposedShadowTreeWalker::traverseLightChildren):
818         (WebCore):
819         (WebCore::ComposedShadowTreeWalker::traverseSiblings):
820         (WebCore::ComposedShadowTreeWalker::traverseNode):
821         (WebCore::ComposedShadowTreeWalker::traverseDistributedeNodes):
822         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
823         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
824         (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot):
825         * dom/ComposedShadowTreeWalker.h:
826         (ComposedShadowTreeWalker):
827
828 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
829
830         Rename TextCodecWinCE to TextCodecWin
831         https://bugs.webkit.org/show_bug.cgi?id=91947
832
833         Reviewed by Ryosuke Niwa.
834
835         Since TextCodecWinCE is used by other (non-upstreamed) windows ports too,
836         TextCodecWin is a better name for the implementation.
837         Also remove the dependency on WinCE FontCache to make it more usable.
838
839         * PlatformWinCE.cmake:
840         * platform/text/TextEncodingRegistry.cpp:
841         (WebCore::extendTextCodecMaps):
842         * platform/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.cpp.
843         * platform/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.h.
844
845 2012-07-22  Kentaro Hara  <haraken@chromium.org>
846
847         [V8] CodeGeneratorV8.pm should support static attributes
848         https://bugs.webkit.org/show_bug.cgi?id=91764
849
850         Reviewed by Adam Barth.
851
852         CodeGeneratorJS.pm already supports static attributes.
853         CodeGeneratorV8.pm should also support them.
854
855         Tests: bindings/scripts/test/TestObj.idl
856                bindings/scripts/test/TestSupplemental.idl
857
858         * bindings/scripts/CodeGeneratorV8.pm:
859         (GenerateNormalAttrGetter):
860         (GenerateNormalAttrSetter):
861
862         * bindings/scripts/test/TestObj.idl: Added defined(TESTING_V8).
863         * bindings/scripts/test/TestSupplemental.idl: Added test cases for static attributes in supplemental IDL files.
864
865         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results.
866         (WebCore):
867         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
868         The generated code is wrong since CodeGeneratorJS.pm does not support static attributes for
869         supplemental IDL files. I will fix it in a follow-up patch.
870         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
871         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
872         * bindings/scripts/test/JS/JSTestInterface.h:
873         (WebCore):
874         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
875         (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter):
876         (TestInterfaceV8Internal):
877         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
878         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
879         (WebCore):
880         * bindings/scripts/test/V8/V8TestObj.cpp:
881         (WebCore::TestObjV8Internal::staticReadOnlyIntAttrAttrGetter):
882         (TestObjV8Internal):
883         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
884         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
885         (WebCore):
886
887 2012-07-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
888
889         Missing *explicit* keyword in storage and workers.
890         https://bugs.webkit.org/show_bug.cgi?id=91934
891
892         Reviewed by Kentaro Hara.
893
894         Some constructors missed to use *explicit* keyword. They need to be added
895         *explicit* keyword to contructor which has a parameter in order to avoid
896         implicit type conversion.
897
898         No new tests. Convered by existing tests.
899
900         * storage/StorageAreaImpl.h:
901         (StorageAreaImpl):
902         * storage/StorageMap.h:
903         (StorageMap):
904         * storage/StorageSyncManager.h:
905         (StorageSyncManager):
906         * storage/StorageTask.h:
907         (StorageTask):
908         * storage/StorageTracker.h:
909         (StorageTracker):
910         * workers/SharedWorker.h:
911         (SharedWorker):
912         * workers/Worker.h:
913         (Worker):
914         * workers/WorkerLocation.h:
915         (WebCore::WorkerLocation::WorkerLocation):
916         * workers/WorkerMessagingProxy.h:
917         (WorkerMessagingProxy):
918
919 2012-07-23  Kent Tamura  <tkent@chromium.org>
920
921         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
922         https://bugs.webkit.org/show_bug.cgi?id=91941
923
924         Reviewed by Kentaro Hara.
925
926         A flag name for an elmement should be ENABLE_*_ELEMENT.
927
928         * Configurations/FeatureDefines.xcconfig:
929         * DerivedSources.make:
930         * GNUmakefile.am:
931         * accessibility/AXObjectCache.cpp:
932         (WebCore::createFromRenderer):
933         * accessibility/AccessibilityProgressIndicator.cpp:
934         * accessibility/AccessibilityProgressIndicator.h:
935         * css/CSSPrimitiveValueMappings.h:
936         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
937         * css/SelectorChecker.cpp:
938         (WebCore::SelectorChecker::checkOneSelector):
939         * css/StyleResolver.cpp:
940         (WebCore::StyleResolver::collectMatchingRulesForList):
941         * css/html.css:
942         * html/HTMLMeterElement.cpp:
943         * html/HTMLMeterElement.h:
944         * html/HTMLMeterElement.idl:
945         * html/HTMLProgressElement.cpp:
946         * html/HTMLProgressElement.h:
947         * html/HTMLProgressElement.idl:
948         * html/HTMLTagNames.in:
949         * html/shadow/MeterShadowElement.cpp:
950         * html/shadow/MeterShadowElement.h: Wrap with #if ENABLE(METER_ELEMENT).
951         * html/shadow/ProgressShadowElement.cpp:
952         * html/shadow/ProgressShadowElement.h: Wrap with #if ENABLE(PROGRESS_ELEMENT).
953         * page/DOMWindow.idl:
954         * platform/efl/RenderThemeEfl.cpp:
955         (WebCore::RenderThemeEfl::paintThemePart):
956         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
957         (WebCore):
958         * platform/efl/RenderThemeEfl.h:
959         (RenderThemeEfl):
960         * platform/gtk/RenderThemeGtk.cpp:
961         (WebCore):
962         * platform/gtk/RenderThemeGtk.h:
963         (RenderThemeGtk):
964         * platform/gtk/RenderThemeGtk2.cpp:
965         (WebCore):
966         * platform/gtk/RenderThemeGtk3.cpp:
967         (WebCore):
968         * platform/qt/RenderThemeQt.cpp:
969         (WebCore):
970         * platform/qt/RenderThemeQt.h:
971         (WebCore):
972         (RenderThemeQt):
973         * platform/qt/RenderThemeQtMobile.cpp:
974         (WebCore):
975         * platform/qt/RenderThemeQtMobile.h:
976         (RenderThemeQtMobile):
977         * rendering/RenderMeter.cpp:
978         * rendering/RenderMeter.h:
979         * rendering/RenderObject.h:
980         (RenderObject):
981         * rendering/RenderProgress.cpp:
982         * rendering/RenderProgress.h:
983         * rendering/RenderTheme.cpp:
984         (WebCore::RenderTheme::adjustStyle):
985         (WebCore::RenderTheme::paint):
986         (WebCore::RenderTheme::paintBorderOnly):
987         (WebCore::RenderTheme::paintDecorations):
988         (WebCore):
989         * rendering/RenderTheme.h:
990         (WebCore):
991         (RenderTheme):
992         * rendering/RenderThemeChromiumLinux.cpp:
993         (WebCore):
994         * rendering/RenderThemeChromiumLinux.h:
995         * rendering/RenderThemeChromiumSkia.cpp:
996         (WebCore):
997         * rendering/RenderThemeChromiumSkia.h:
998         (RenderThemeChromiumSkia):
999         * rendering/RenderThemeChromiumWin.cpp:
1000         (WebCore):
1001         * rendering/RenderThemeChromiumWin.h:
1002         (RenderThemeChromiumWin):
1003         * rendering/RenderThemeMac.h:
1004         (RenderThemeMac):
1005         * rendering/RenderThemeMac.mm:
1006         (WebCore):
1007
1008 2012-07-22  Kent Tamura  <tkent@chromium.org>
1009
1010         Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT
1011         https://bugs.webkit.org/show_bug.cgi?id=91928
1012
1013         Reviewed by Kentaro Hara.
1014
1015         A flag name for an elmement should be ENABLE_*_ELEMENT.
1016
1017         * Configurations/FeatureDefines.xcconfig:
1018         * DerivedSources.make:
1019         * GNUmakefile.am:
1020         * html/HTMLDetailsElement.cpp:
1021         * html/HTMLDetailsElement.idl:
1022         * html/HTMLSummaryElement.cpp:
1023         * html/HTMLTagNames.in:
1024         * html/shadow/DetailsMarkerControl.cpp:
1025         * rendering/RenderDetailsMarker.cpp:
1026         * rendering/RenderDetailsMarker.h:
1027         * rendering/RenderObject.h:
1028         (RenderObject):
1029         * rendering/RenderTreeAsText.cpp:
1030         (WebCore::RenderTreeAsText::writeRenderObject):
1031
1032 2012-07-21  Dan Bernstein  <mitz@apple.com>
1033
1034         <rdar://problem/11928576> SVG-as-image (constrained) intrinsic size calculation is wrong in vertical writing modes
1035         https://bugs.webkit.org/show_bug.cgi?id=91918
1036
1037         Reviewed by Anders Carlsson.
1038
1039         Test: svg/as-image/svg-intrinsic-size-rectangular-vertical.html
1040
1041         * rendering/RenderReplaced.cpp:
1042         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): When there is a content
1043         renderer, it returns a physical intrinsic size and aspect ratio. The code was already
1044         accounting for this by taking the reciprocal of the aspect ratio in the vertical case. Made
1045         it also transpose the size itself, turning it from physical to logical. Moved this code
1046         after setting m_intrinsicSize, since that member variable is always physical.
1047
1048 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
1049
1050         Cleanup TextEncoding USE(XXX_UNICODE) macros
1051         https://bugs.webkit.org/show_bug.cgi?id=91923
1052
1053         Reviewed by Andreas Kling.
1054
1055         Replace PLATFORM(QT) with USE(QT4_UNICODE) and OS(WINCE) with USE(WINCE_UNICODE).
1056         This gives us more flexibility in choosing the unicode backend for a port.
1057
1058         * platform/text/TextEncoding.cpp:
1059         (WebCore::TextEncoding::encode):
1060         * platform/text/TextEncodingRegistry.cpp:
1061         (WebCore::extendTextCodecMaps):
1062
1063 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
1064
1065         Remove unnecessary ICU header includes from SimpleFontDataWin.cpp
1066         https://bugs.webkit.org/show_bug.cgi?id=91922
1067
1068         Reviewed by Kentaro Hara.
1069
1070         This allows us to use SimpleFontDataWin with an other Unicode implementation too.
1071
1072         * platform/graphics/win/SimpleFontDataWin.cpp:
1073
1074 2012-07-21  Kwang Yul Seo  <skyul@company100.net>
1075
1076         A start tag whose tag name is "html" in the "in body" insertion mode is a parse error
1077         https://bugs.webkit.org/show_bug.cgi?id=91916
1078
1079         Reviewed by Eric Seidel.
1080
1081         According to the HTML5 spec, a start tag whose tag name is "html" in the "in body"
1082         insertion mode is a parse error.
1083
1084         Added HTMLTreeBuilder::processHtmlStartTagForInBody(AtomicHTMLToken&) to call parseError(token).
1085         Removed "FIXME: parse error" from HTMLConstructionSite::insertHTMLHtmlStartTagInBody and
1086         HTMLConstructionSite::insertHTMLBodyStartTagInBody because we already marked the call sites
1087         of these two methods with parseError(token).
1088
1089         No behavior change because parseError(token) is just a marker.
1090
1091         * html/parser/HTMLConstructionSite.cpp:
1092         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
1093         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
1094         * html/parser/HTMLTreeBuilder.cpp:
1095         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1096         (WebCore::HTMLTreeBuilder::processStartTag):
1097         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
1098         (WebCore):
1099         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
1100         * html/parser/HTMLTreeBuilder.h:
1101
1102 2012-07-20  Czene Tamás  <tczene@inf.u-szeged.hu>
1103
1104         double data type shoud be changed to float in ColorMatrix
1105         https://bugs.webkit.org/show_bug.cgi?id=91499
1106
1107         Reviewed by Nikolas Zimmermann.
1108
1109         * platform/graphics/filters/FEColorMatrix.cpp:
1110         (WebCore::matrix):
1111         (WebCore::saturate):
1112         (WebCore::huerotate):
1113         (WebCore::luminance):
1114         (WebCore::effectType):
1115
1116 2012-07-20  Stephen White  <senorblanco@chromium.org>
1117
1118         [chromium] Take current transformation matrix into account when
1119         deciding on resize algorithm for drawPattern.
1120         https://bugs.webkit.org/show_bug.cgi?id=90624
1121
1122         Reviewed by Adrienne Walker.
1123
1124         Since the pattern shader uses both the current transformation matrix
1125         and the pattern matrix when transforming pixels, we need to
1126         do the same when computing the resampling mode.  Also removed the
1127         resampling hint code, added in r60658, since it appears to be dead
1128         (caller was removed in r76379).
1129
1130         Covered by existing tests, such as
1131         fast/borders/border-image-scale-transform.html.
1132
1133         * platform/graphics/skia/ImageSkia.cpp:
1134         (WebCore::computeResamplingMode):
1135         Pass in the matrix to be used for computing the destination width and
1136         height (for awesome resampling).  Remove the image resampling hint code.
1137         (WebCore::paintSkBitmap):
1138         Pass in the CTM to computeResamplingMode().
1139         (WebCore::Image::drawPattern):
1140         Concatenate the CTM and the pattern matrix, and pass that to 
1141         computeResamplingMode() and TransformDimensions().  Invert the
1142         CTM's scale and apply it to the pattern transform, so their
1143         concatenation gives identity scale.
1144         * platform/graphics/skia/PlatformContextSkia.cpp:
1145         * platform/graphics/skia/PlatformContextSkia.h:
1146         Remove the image resampling hint (dead code).
1147
1148 2012-07-20  Kwang Yul Seo  <skyul@company100.net>
1149
1150         Anything else in the "in table" insertion mode is a parse error
1151         https://bugs.webkit.org/show_bug.cgi?id=91915
1152
1153         Reviewed by Adam Barth.
1154
1155         According to the HTML5 spec, anything else in the "in table" insertion mode is a parse error.
1156
1157         No behavior change because parseError(token) is just a marker.
1158
1159         * html/parser/HTMLTreeBuilder.cpp:
1160         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
1161
1162 2012-07-20  Kent Tamura  <tkent@chromium.org>
1163
1164         Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT
1165         https://bugs.webkit.org/show_bug.cgi?id=91846
1166
1167         Reviewed by Kentaro Hara.
1168
1169         A flag name for an elmement should be ENABLE_*_ELEMENT.
1170
1171         * Configurations/FeatureDefines.xcconfig:
1172         * DerivedSources.make:
1173         * GNUmakefile.am:
1174         * css/html.css:
1175         * html/HTMLDataListElement.cpp:
1176         * html/HTMLDataListElement.h:
1177         * html/HTMLDataListElement.idl:
1178         * html/HTMLInputElement.cpp:
1179         (WebCore):
1180         (WebCore::HTMLInputElement::parseAttribute):
1181         (WebCore::HTMLInputElement::insertedInto):
1182         (WebCore::HTMLInputElement::removedFrom):
1183         * html/HTMLInputElement.h:
1184         (HTMLInputElement):
1185         * html/HTMLInputElement.idl:
1186         * html/HTMLOptionElement.cpp:
1187         (WebCore::HTMLOptionElement::parseAttribute):
1188         (WebCore::HTMLOptionElement::childrenChanged):
1189         (WebCore):
1190         * html/HTMLOptionElement.h:
1191         (HTMLOptionElement):
1192         * html/HTMLTagNames.in:
1193         * html/InputType.cpp:
1194         (WebCore):
1195         * html/InputType.h:
1196         (InputType):
1197         * html/RangeInputType.cpp:
1198         (WebCore):
1199         * html/RangeInputType.h:
1200         (RangeInputType):
1201         * html/shadow/SliderThumbElement.cpp:
1202         (WebCore::RenderSliderContainer::layout):
1203         * page/DOMWindow.idl:
1204         * platform/efl/RenderThemeEfl.cpp:
1205         (WebCore):
1206         * platform/efl/RenderThemeEfl.h:
1207         (RenderThemeEfl):
1208         * platform/qt/RenderThemeQt.cpp:
1209         (WebCore):
1210         * platform/qt/RenderThemeQt.h:
1211         (RenderThemeQt):
1212         * rendering/RenderTheme.cpp:
1213         (WebCore):
1214         * rendering/RenderTheme.h:
1215         (RenderTheme):
1216         * rendering/RenderThemeChromiumLinux.cpp:
1217         (WebCore):
1218         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1219         * rendering/RenderThemeChromiumLinux.h:
1220         (RenderThemeChromiumLinux):
1221         * rendering/RenderThemeChromiumWin.cpp:
1222         (WebCore):
1223         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1224         * rendering/RenderThemeChromiumWin.h:
1225         (RenderThemeChromiumWin):
1226         * rendering/RenderThemeMac.h:
1227         (RenderThemeMac):
1228         * rendering/RenderThemeMac.mm:
1229         (WebCore::RenderThemeMac::paintSliderTrack):
1230         (WebCore):
1231
1232 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
1233
1234         Unify HTMLCollection and DynamicNodeList
1235         https://bugs.webkit.org/show_bug.cgi?id=91335
1236
1237         Reviewed by Anders Carlsson.
1238
1239         This is the grand unification of HTMLCollection and DynamicNodeList.
1240
1241         It merges implementations of item() and length() in ChildNodeList, DynamicNodeList,
1242         and HTMLCollection. The unified implementation is based on the one used for HTMLCollection,
1243         that has been improved over the last few days; see r122660 and r122672 for examples.
1244
1245         There are five key changes:
1246         1. Made itemBeforeOrAfter aware of DynamicNodeList.
1247         2. itemBeforeOrAfter and related functions take and return Node* to support ChildNodeList.
1248         3. Renamed InvalidCollectionType to NodeListCollectionType since DynamicNodeLists need to be
1249         identified itemBeforeOrAfter.
1250         4. Renamed itemAfter to virtualItemAfter in subclasses of HTMLCollection, and devirtualized
1251         itemAfter used in common cases to avoid performance regressions. To make this intent clear,
1252         SupportItemBefore and DoNotSupportItemBefore have been renamed to DoesNotOverrideItemAfter
1253         and OverridesItemAfter. This change also help us detect a subclass of HTMLCollection that
1254         passes in a wrong value to ItemBeforeSupportType by making forward iterations fail (hit an
1255         assertion or doesn't iterate at all) as well as backward iterations.
1256         5. Restricted the use of elementsArrayOffset to subclasses that provide virtualItemAfter.
1257
1258         This patch completes my effort to share code between HTMLCollection and DynamicNodeList.
1259
1260         * dom/ChildNodeList.cpp:
1261         (WebCore::ChildNodeList::ChildNodeList):
1262         (WebCore): Removed length() and item().
1263         (WebCore::ChildNodeList::nodeMatches):
1264         * dom/ChildNodeList.h:
1265         (ChildNodeList):
1266         * dom/ClassNodeList.cpp:
1267         (WebCore::ClassNodeList::ClassNodeList):
1268         * dom/Document.cpp:
1269         (WebCore::Document::registerNodeListCache):
1270         (WebCore::Document::unregisterNodeListCache):
1271         * dom/DynamicNodeList.cpp:
1272         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1273         (WebCore::DynamicNodeList::length):
1274         (WebCore::DynamicNodeList::item):
1275         * dom/DynamicNodeList.h:
1276         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes new boolean argument
1277         shouldOnlyIncludeDirectChildren indicating whether the non-child descendents should be
1278         included or not. This is necessary to identify ChildNodeList in itemBeforeOrAfter.
1279         (WebCore::DynamicNodeListCacheBase::ownerNode): Moved from DynamicNodeListCacheBase and
1280         HTMLCollectionCacheBase.
1281         (WebCore::DynamicNodeListCacheBase::document): Moved from DynamicNodeListCacheBase.
1282         (WebCore::DynamicNodeListCacheBase::rootNode): Ditto.
1283         (WebCore::DynamicNodeListCacheBase::overridesItemAfter): Renamed from supportsItemBefore
1284         and the return value has been negated.
1285         (WebCore::DynamicNodeListCacheBase::shouldOnlyIncludeDirectChildren): Added.
1286         (WebCore::DynamicNodeListCacheBase):
1287         (WebCore::DynamicNodeList::DynamicNodeList): Takes NodeListType to determine the value of
1288         shouldOnlyIncludeDirectChildren.
1289         (DynamicNodeList):
1290         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
1291         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1292         * dom/MicroDataItemList.cpp:
1293         (WebCore::MicroDataItemList::MicroDataItemList):
1294         * dom/NameNodeList.cpp:
1295         (WebCore::NameNodeList::NameNodeList):
1296         * dom/TagNodeList.cpp:
1297         (WebCore::TagNodeList::TagNodeList):
1298         * html/CollectionType.h:
1299         * html/HTMLAllCollection.cpp:
1300         (WebCore::HTMLAllCollection::HTMLAllCollection):
1301         * html/HTMLCollection.cpp:
1302         (WebCore::shouldOnlyIncludeDirectChildren):
1303         (WebCore::rootTypeFromCollectionType):
1304         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
1305         (WebCore::HTMLCollection::HTMLCollection):
1306         (WebCore::HTMLCollection::create):
1307         (WebCore::HTMLCollection::~HTMLCollection):
1308         (WebCore::isAcceptableElement):
1309         (WebCore::firstNode): Extracted from itemBeforeOrAfter.
1310         (WebCore::DynamicNodeListCacheBase::iterateForNextNode): Ditto.
1311         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): Takes and returns Node*.
1312         Special case ChildNodeList since there is no need to skip any node. When "this" is a
1313         node list, call nodeMatches instead of isAcceptableElement.
1314         (WebCore::DynamicNodeListCacheBase::itemBefore): No longer takes offsetInArray since
1315         the use of elementsArrayOffset has been restricted to HTMLCollections that provides
1316         virtualItemAfter.
1317         (WebCore::DynamicNodeListCacheBase::itemAfter): Calls virtualItemAfter if necessary.
1318         Otherwise assert offsetInArray is zero since we should never be using this variable
1319         when virtualItemAfter is not provided.
1320         (WebCore::DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem):
1321         (WebCore::DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem):
1322         (WebCore::DynamicNodeListCacheBase::setItemCache): Updates m_cachedElementsArrayOffset
1323         in HTMLCollection if and only if virtualItemAfter is provided. This is safe because
1324         node lists never provide virtualItemAfter.
1325         (WebCore::DynamicNodeListCacheBase::cachedElementsArrayOffset): Similarly, returns
1326         m_cachedElementsArrayOffset if virtualItemAfter is provided.
1327         (WebCore::DynamicNodeListCacheBase::lengthCommon):
1328         (WebCore::DynamicNodeListCacheBase::itemCommon): Note that supportsItemBefore() is
1329         equivalent to !overridesItemAfter() here.
1330         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Uses Node* through
1331         out the function. Since itemBefore never uses offsetInArray, always sets 0 for that.
1332         Note that we never call itemBefore and virtualItemAfter on the same object.
1333         (WebCore::HTMLCollection::virtualItemAfter): Added only to make the class "concrete".
1334         (WebCore::HTMLCollection::namedItem):
1335         (WebCore::HTMLCollection::updateNameCache):
1336         (WebCore::HTMLCollection::tags):
1337         * html/HTMLCollection.h:
1338         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1339         (HTMLCollectionCacheBase):
1340         (WebCore::HTMLCollection::length):
1341         (WebCore::HTMLCollection::item):
1342         (WebCore::HTMLCollection::base):
1343         (HTMLCollection):
1344         * html/HTMLFormCollection.cpp:
1345         (WebCore::HTMLFormCollection::HTMLFormCollection):
1346         (WebCore::HTMLFormCollection::virtualItemAfter):
1347         * html/HTMLFormCollection.h:
1348         (HTMLFormCollection):
1349         * html/HTMLNameCollection.cpp:
1350         (WebCore::HTMLNameCollection::HTMLNameCollection):
1351         (WebCore::HTMLNameCollection::virtualItemAfter):
1352         * html/HTMLNameCollection.h:
1353         (HTMLNameCollection):
1354         * html/HTMLOptionsCollection.cpp:
1355         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
1356         * html/HTMLPropertiesCollection.cpp:
1357         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1358         (WebCore::HTMLPropertiesCollection::virtualItemAfter):
1359         (WebCore::HTMLPropertiesCollection::updateNameCache):
1360         * html/HTMLPropertiesCollection.h:
1361         (HTMLPropertiesCollection):
1362         * html/HTMLTableRowsCollection.cpp:
1363         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
1364         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
1365         * html/HTMLTableRowsCollection.h:
1366         (HTMLTableRowsCollection):
1367         * html/LabelsNodeList.cpp:
1368         (WebCore::LabelsNodeList::LabelsNodeList):
1369         * html/RadioNodeList.cpp:
1370         (WebCore::RadioNodeList::RadioNodeList):
1371
1372 2012-07-20  Joshua Bell  <jsbell@chromium.org>
1373
1374         IndexedDB: Simplify backend interface classes
1375         https://bugs.webkit.org/show_bug.cgi?id=91901
1376
1377         Reviewed by Tony Chang.
1378
1379         The IDBTransactionBackendInterface included several methods only used by the
1380         real implementation objects, not via the interfaces. Expose a static Impl::from(Interface)
1381         method for transaction, and migrate all of the backend-internal uses from Interface to Impl.
1382
1383         No new tests - no functional changes.
1384
1385         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1386         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1387         * Modules/indexeddb/IDBCursorBackendImpl.h:
1388         (WebCore):
1389         (WebCore::IDBCursorBackendImpl::create):
1390         (IDBCursorBackendImpl):
1391         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1392         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1393         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
1394         (WebCore::IDBDatabaseBackendImpl::objectStore):
1395         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1396         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
1397         (WebCore::IDBDatabaseBackendImpl::setVersion):
1398         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
1399         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
1400         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
1401         (WebCore::IDBDatabaseBackendImpl::transaction):
1402         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1403         (WebCore):
1404         (IDBDatabaseBackendImpl):
1405         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1406         (WebCore::IDBIndexBackendImpl::openCursorInternal):
1407         (WebCore::IDBIndexBackendImpl::openCursor):
1408         (WebCore::IDBIndexBackendImpl::openKeyCursor):
1409         (WebCore::IDBIndexBackendImpl::countInternal): Drop unused transaction argument.
1410         (WebCore::IDBIndexBackendImpl::count):
1411         (WebCore::IDBIndexBackendImpl::get):
1412         (WebCore::IDBIndexBackendImpl::getKey):
1413         * Modules/indexeddb/IDBIndexBackendImpl.h:
1414         (IDBIndexBackendImpl):
1415         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1416         (WebCore::IDBObjectStoreBackendImpl::get):
1417         (WebCore::IDBObjectStoreBackendImpl::put):
1418         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
1419         (WebCore):
1420         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1421         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
1422         (WebCore::IDBObjectStoreBackendImpl::clear):
1423         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1424         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
1425         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
1426         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
1427         (WebCore::IDBObjectStoreBackendImpl::openCursor):
1428         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
1429         (WebCore::IDBObjectStoreBackendImpl::count):
1430         (WebCore::IDBObjectStoreBackendImpl::countInternal): Drop unused transaction argument.
1431         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1432         (WebCore):
1433         (IDBObjectStoreBackendImpl):
1434         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1435         (WebCore::IDBTransactionBackendImpl::objectStore):
1436         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1437         (WebCore::IDBTransactionBackendImpl::from):
1438         (IDBTransactionBackendImpl):
1439         (WebCore::IDBTransactionBackendImpl::mode):
1440         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1441         (IDBTransactionBackendInterface):
1442
1443 2012-07-20  Joshua Bell  <jsbell@chromium.org>
1444
1445         IndexedDB: "ASSERTION FAILED: !m_requestFinished" hit in IDBRequest::dispatchEvent
1446         https://bugs.webkit.org/show_bug.cgi?id=86911
1447
1448         Reviewed by Tony Chang.
1449
1450         Clean up the IDBRequest/IDBCursor relationship and the IDBRequest lifecycle.
1451
1452         The IDBRequest's m_cursor/setCursor() calls are renamed to m_pendingCursor/setPendingCursor() to
1453         clarify that the request will move between two states - either there's a cursor request in-flight
1454         c/o a continue() or advance() call, or the result has come in (cursor, null-for-done, or error).
1455         Since they were only ever used together, resetReadyState() is merged into setResultCursor(). The
1456         m_requestFinished flag becomes redundant and is dropped - the ASSERT reported in the bug
1457         becomes an ASSERT(m_readyState == PENDING) and m_readyState tracking is already correct.
1458
1459         Test: storage/indexeddb/request-continue-abort.html
1460
1461         * Modules/indexeddb/IDBCursor.cpp:
1462         (WebCore::IDBCursor::advance): Unreachable code path now dead and gone.
1463         (WebCore::IDBCursor::continueFunction): Ditto.
1464         * Modules/indexeddb/IDBRequest.cpp: Most functions just add state assertions.
1465         (WebCore::IDBRequest::IDBRequest):
1466         (WebCore::IDBRequest::abort):
1467         (WebCore::IDBRequest::setCursorDetails):
1468         (WebCore::IDBRequest::setPendingCursor): Merge with old resetReadyState().
1469         (WebCore):
1470         (WebCore::IDBRequest::getResultCursor): Helper, since digging cursor out of IDBAny is pesky.
1471         (WebCore::IDBRequest::setResultCursor): Just moved in the file to be with its friends.
1472         (WebCore::IDBRequest::finishCursor):
1473         (WebCore::IDBRequest::onError): Just assertions, re-ordering, re-naming.
1474         (WebCore::IDBRequest::onSuccess):
1475         (WebCore::IDBRequest::onSuccessWithContinuation):
1476         (WebCore::IDBRequest::hasPendingActivity):
1477         (WebCore::IDBRequest::dispatchEvent): Simplify!
1478         (WebCore::IDBRequest::enqueueEvent):
1479         * Modules/indexeddb/IDBRequest.h:
1480         (IDBRequest):
1481
1482 2012-07-20  Andrew Scherkus  <scherkus@chromium.org>
1483
1484         [chromium] Don't display fullscreen button for video elements not containing video
1485         https://bugs.webkit.org/show_bug.cgi?id=91811
1486
1487         Reviewed by Eric Carlson.
1488
1489         Covered by media/media-document-audio-repaint.html
1490
1491         * html/shadow/MediaControlRootElementChromium.cpp:
1492         (WebCore::MediaControlRootElementChromium::reset):
1493
1494 2012-07-20  Dmitry Titov  <dimich@chromium.org>
1495
1496         [Chromium] Out of Memory is observed when a large object is passed to a Web Worker.
1497         https://bugs.webkit.org/show_bug.cgi?id=91535.
1498
1499         Reviewed by David Levin.
1500
1501         No new tests because of no new behavior and lack of mechanism to monitor used memory.
1502
1503         * bindings/v8/SerializedScriptValue.cpp:
1504         (WebCore::SerializedScriptValue::SerializedScriptValue):
1505         (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext):
1506         (WebCore):
1507         (WebCore::SerializedScriptValue::~SerializedScriptValue):
1508         * bindings/v8/SerializedScriptValue.h:
1509         (SerializedScriptValue):
1510         Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data.
1511         
1512         * dom/MessageEvent.cpp:
1513         (WebCore::MessageEvent::MessageEvent):
1514         (WebCore::MessageEvent::initMessageEvent):
1515         Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context).
1516
1517 2012-07-20  David Grogan  <dgrogan@chromium.org>
1518
1519         IndexedDB: Include intVersion when converting between WebCore and WebKit IDBMetadata types
1520         https://bugs.webkit.org/show_bug.cgi?id=91414
1521
1522         Reviewed by Adam Barth.
1523
1524         No new tests because no new behavior.
1525
1526         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1527         (WebCore::IDBDatabaseBackendImpl::metadata):
1528         No behavior change, this just needs a dummy parameter to match the
1529         modified API.
1530
1531         * Modules/indexeddb/IDBMetadata.h:
1532         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1533         (IDBDatabaseMetadata):
1534
1535 2012-07-18  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1536
1537         [Soup] Unnecessary RefPtr usage and null check
1538         https://bugs.webkit.org/show_bug.cgi?id=91636
1539
1540         Reviewed by Martin Robinson.
1541
1542         Small clean up of code that is not necessary; no change in functionality.
1543
1544         * platform/network/soup/SocketStreamHandleSoup.cpp:
1545         (WebCore::SocketStreamHandle::connected):
1546
1547 2012-07-20  Mark Salisbury  <mark.salisbury@hp.com>
1548
1549         Typo in FontCacheWin.cpp causes return value from getCachedFontData() in getLastResortFallbackFont() to be ignored
1550         https://bugs.webkit.org/show_bug.cgi?id=91506
1551
1552         Reviewed by Joseph Pecoraro.
1553
1554         No new test.  The "fallback fallback" code ends up creating a font, so you always
1555         get a fallback font even with this code bug.  A test would be buggy, being highly
1556         platform dependent on what the "fallback fallback" font is on the particular
1557         windows machine the test runs on.
1558
1559         * platform/graphics/win/FontCacheWin.cpp:
1560         (WebCore::FontCache::getLastResortFallbackFont):
1561
1562 2012-07-20  Stephen White  <senorblanco@chromium.org>
1563
1564         [chromium] Clean up scratch texture usage in Chromium's implementation
1565         of GPU-accelerated filters.
1566         https://bugs.webkit.org/show_bug.cgi?id=83370
1567
1568         Reviewed by Adrienne Walker.
1569
1570         There didn't used to be a safe way to allocate a scratch texture, and
1571         hold into it beyond the lifetime of GrAutoScratchTexture.  Now there is:
1572         detach().
1573
1574         Covered by existing tests in css3/filters.
1575
1576         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1577         (WebCore::CCRenderSurfaceFilters::apply):
1578         Use a GrAutoScratchTexture to allocate the destination texture, and 
1579         detach() to detach it from the cache before placing it in an
1580         SkGrTexturePixelRef.  This means we no longer need to do any lock/
1581         unlock trickery with the TextureCacheEntry, since the refcount is
1582         enough to keep the texture away from the cache's prying hands.
1583
1584 2012-07-20  Stephen White  <senorblanco@chromium.org>
1585
1586         [chromium] Clean up scratch texture usage in Chromium's implementation
1587         of GPU-accelerated filters.
1588         https://bugs.webkit.org/show_bug.cgi?id=83370
1589
1590         Reviewed by Adrienne Walker.
1591
1592         There didn't used to be a safe way to allocate a scratch texture, and
1593         hold into it beyond the lifetime of GrAutoScratchTexture.  Now there is:
1594         detach().
1595
1596         Covered by existing tests in css3/filters.
1597
1598         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1599         (WebCore::CCRenderSurfaceFilters::apply):
1600         Use a GrAutoScratchTexture to allocate the destination texture, and 
1601         detach() to detach it from the cache before placing it in an
1602         SkGrTexturePixelRef.  This means we no longer need to do any lock/
1603         unlock trickery with the TextureCacheEntry, since the refcount is
1604         enough to keep the texture away from the cache's prying hands.
1605
1606 2012-07-19  Andrew Scherkus  <scherkus@chromium.org>
1607
1608         [chromium] CSS tweaks to media controls to prevent styles from being overridden
1609         https://bugs.webkit.org/show_bug.cgi?id=91802
1610
1611         Reviewed by Eric Carlson.
1612
1613         Having the buttons declared as inline caused them to not be included in the box layout,
1614         resulting in styles set outside the media element to affect the position of the buttons.
1615
1616         In a similar vein, it was also possible to override the font-style attribute for the time
1617         display.
1618
1619         Test: media/controls-styling-strict.html
1620
1621         * css/mediaControlsChromium.css:
1622         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1623         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1624         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
1625         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
1626
1627 2012-07-20  Han Shen  <shenhan@google.com>
1628
1629         [Chromium] Compilation fails under gcc 4.7
1630         https://bugs.webkit.org/show_bug.cgi?id=90227
1631
1632         Reviewed by Tony Chang.
1633
1634         Disable warnings about c++0x compatibility in gcc newer than 4.6.
1635
1636         * WebCore.gyp/WebCore.gyp:
1637
1638 2012-07-20  Vincent Scheib  <scheib@chromium.org>
1639
1640         Unreviewed compile fix, r123247 included unintended changes to Document.cpp.
1641
1642         See http://trac.webkit.org/changeset/123247.
1643
1644         * dom/Document.cpp:
1645         (WebCore::Document::webkitExitPointerLock):
1646
1647 2012-07-20  Ryosuke Niwa  <rniwa@webkit.org>
1648
1649         REGRESSION(r122873): 15% regression on Dromaeo/dom-attr
1650         https://bugs.webkit.org/show_bug.cgi?id=91827
1651
1652         Reviewed by Anders Carlsson.
1653
1654         Move shouldInvalidateNodeListCaches from Document.cpp to Node.cpp since it's only called
1655         in Node::invalidateNodeListCachesInAncestors.
1656
1657         Test: PerformanceTests/Dromaeo/dom-attr.html.
1658
1659         * dom/Document.cpp:
1660         (WebCore):
1661         * dom/Node.cpp:
1662         (WebCore::shouldInvalidateNodeListCachesForAttr): Extracted from shouldInvalidateNodeListCaches
1663         to unroll the loop in shouldInvalidateNodeListCaches. Apparently gcc wasn't doing the right thing.
1664         (WebCore::Document::shouldInvalidateNodeListCaches):
1665         (WebCore::Document::invalidateNodeListCaches):
1666         (WebCore::Node::invalidateNodeListCachesInAncestors):
1667
1668 2012-07-20  Nico Weber  <thakis@chromium.org>
1669
1670         Fix more -Wunused-private-field violations
1671         https://bugs.webkit.org/show_bug.cgi?id=91876
1672
1673         Reviewed by Adam Barth.
1674
1675         As of http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120716/061102.html
1676         the warning finds more bugs. Fix them.
1677
1678         * html/FTPDirectoryDocument.cpp:
1679         (FTPDirectoryDocumentParser):
1680         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
1681         * html/parser/HTMLTreeBuilder.cpp:
1682         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1683         * html/parser/HTMLTreeBuilder.h:
1684         (HTMLTreeBuilder):
1685         * html/shadow/MediaControlRootElementChromium.cpp:
1686         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1687         * html/shadow/MediaControlRootElementChromium.h:
1688         (MediaControlRootElementChromium):
1689         * inspector/InspectorDOMStorageResource.cpp:
1690         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
1691         * inspector/InspectorDOMStorageResource.h:
1692         (InspectorDOMStorageResource):
1693         * page/Settings.cpp:
1694         (WebCore::Settings::Settings):
1695         * page/Settings.h:
1696         (Settings):
1697         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1698         (WebCore::CCThreadProxy::CCThreadProxy):
1699         * platform/graphics/chromium/cc/CCThreadProxy.h:
1700         (CCThreadProxy):
1701         * rendering/svg/RenderSVGTextPath.cpp:
1702         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
1703         * rendering/svg/RenderSVGTextPath.h:
1704
1705 2012-07-20  Adam Klein  <adamk@chromium.org>
1706
1707         CodeGeneratorInspector.py is unnecessarily chatty
1708         https://bugs.webkit.org/show_bug.cgi?id=91758
1709
1710         Reviewed by Vsevolod Vlasov.
1711
1712         The code aded in r123091 included a "print" statement for each written
1713         file. This makes for noisy build output, especially noticeable in the
1714         Chromium ninja build (where build output takes up a single line of the
1715         console).
1716
1717         If this print statement is generally useful, it should be
1718         hidden behind a --verbose commandline option, as we do for the binding
1719         generators.
1720
1721         * inspector/CodeGeneratorInspector.py:
1722         (SmartOutput.close): Remove print statement.
1723
1724 2012-07-20  Stephen White  <senorblanco@chromium.org>
1725
1726         [chromium] Enable GPU-accelerated skia implementation of
1727         feDiffuseLighting, feSpecularLighting.
1728         https://bugs.webkit.org/show_bug.cgi?id=91865
1729
1730         Reviewed by Dirk Schulze.
1731
1732         Translate the light parameters into the appropriate
1733         SkLightingImageFilter calls.  This path is only enabled when
1734         the filters are created with the Accelerated flag set.
1735
1736         This will be covered by tests in svg/filters/* when they are
1737         added to the virtual GPU tests.
1738
1739         * WebCore.gypi:
1740         * platform/graphics/filters/FELighting.h:
1741         (FELighting):
1742         * platform/graphics/filters/skia/FELightingSkia.cpp: Added.
1743         (WebCore):
1744         (WebCore::FELighting::platformApplySkia):
1745
1746 2012-07-20  Pavel Feldman  <pfeldman@chromium.org>
1747
1748         Web Inspector: disable fake workers inspection.
1749         https://bugs.webkit.org/show_bug.cgi?id=91867
1750
1751         Reviewed by Vsevolod Vlasov.
1752
1753         'Fake workers' is unreliable error-prone way to debug workers. There are a
1754         lot of frameworks supporting it. Inspector should not do that since it has a more
1755         powerful native worker inspection capabilities. Port owners should enable it
1756         in case they want to provide workers debugging.
1757
1758         * English.lproj/localizedStrings.js:
1759         * WebCore.gypi:
1760         * WebCore.order:
1761         * WebCore.vcproj/WebCore.vcproj:
1762         * inspector/InjectedScriptHost.cpp:
1763         (WebCore::InjectedScriptHost::InjectedScriptHost):
1764         * inspector/InjectedScriptHost.h:
1765         (InjectedScriptHost):
1766         * inspector/InjectedScriptHost.idl:
1767         * inspector/Inspector.json:
1768         * inspector/InspectorAgent.cpp:
1769         (WebCore::InspectorAgent::didCommitLoad):
1770         (WebCore::InspectorAgent::enable):
1771         * inspector/InspectorAgent.h:
1772         (WebCore):
1773         (InspectorAgent):
1774         * inspector/InspectorInstrumentation.cpp:
1775         * inspector/InspectorInstrumentation.h:
1776         (InspectorInstrumentation):
1777         * inspector/front-end/InjectedFakeWorker.js: Removed.
1778         * inspector/front-end/ScriptsPanel.js:
1779         * inspector/front-end/WebKit.qrc:
1780         * inspector/front-end/WorkersSidebarPane.js:
1781         (WebInspector.WorkersSidebarPane):
1782         * inspector/front-end/externs.js:
1783         * inspector/front-end/inspector.html:
1784         * inspector/front-end/inspector.js:
1785         * workers/AbstractWorker.cpp:
1786         (WebCore::AbstractWorker::contextDestroyed):
1787         * workers/AbstractWorker.h:
1788         (AbstractWorker):
1789         * workers/SharedWorker.cpp:
1790         (WebCore::SharedWorker::create):
1791         * workers/Worker.cpp:
1792         (WebCore::Worker::create):
1793
1794 2012-07-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1795
1796         Unreviewed, rolling out r123182.
1797         http://trac.webkit.org/changeset/123182
1798         https://bugs.webkit.org/show_bug.cgi?id=91863
1799
1800         Causing ASSERT crashes in tests accessibility/canvas.html and
1801         accessibility/canvas-accessibilitynodeobject.html (Requested
1802         by jernoble on #webkit).
1803
1804         * CMakeLists.txt:
1805         * GNUmakefile.list.am:
1806         * Target.pri:
1807         * WebCore.gypi:
1808         * accessibility/AXObjectCache.cpp:
1809         (WebCore):
1810         * accessibility/AXObjectCache.h:
1811         (AXObjectCache):
1812         * accessibility/AccessibilityARIAGrid.cpp:
1813         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
1814         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
1815         (WebCore):
1816         (WebCore::AccessibilityARIAGrid::create):
1817         * accessibility/AccessibilityARIAGrid.h:
1818         (AccessibilityARIAGrid):
1819         * accessibility/AccessibilityARIAGridCell.cpp:
1820         (WebCore::AccessibilityARIAGridCell::create):
1821         * accessibility/AccessibilityARIAGridRow.cpp:
1822         (WebCore::AccessibilityARIAGridRow::create):
1823         * accessibility/AccessibilityAllInOne.cpp:
1824         * accessibility/AccessibilityList.cpp:
1825         (WebCore::AccessibilityList::create):
1826         * accessibility/AccessibilityListBox.cpp:
1827         (WebCore::AccessibilityListBox::create):
1828         * accessibility/AccessibilityMediaControls.cpp:
1829         (WebCore::AccessibilityMediaControl::create):
1830         (WebCore::AccessibilityMediaControlsContainer::create):
1831         (WebCore::AccessibilityMediaTimeline::create):
1832         (WebCore::AccessibilityMediaTimeDisplay::create):
1833         * accessibility/AccessibilityMenuList.cpp:
1834         * accessibility/AccessibilityMenuList.h:
1835         (WebCore::AccessibilityMenuList::create):
1836         * accessibility/AccessibilityNodeObject.cpp: Removed.
1837         * accessibility/AccessibilityNodeObject.h: Removed.
1838         * accessibility/AccessibilityObject.h:
1839         (AccessibilityObject):
1840         * accessibility/AccessibilityProgressIndicator.cpp:
1841         (WebCore::AccessibilityProgressIndicator::create):
1842         * accessibility/AccessibilityRenderObject.cpp:
1843         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
1844         (WebCore::AccessibilityRenderObject::create):
1845         (WebCore::AccessibilityRenderObject::detach):
1846         (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent):
1847         (WebCore):
1848         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
1849         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
1850         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
1851         (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
1852         (WebCore::AccessibilityRenderObject::childrenChanged):
1853         (WebCore::AccessibilityRenderObject::canHaveChildren):
1854         (WebCore::AccessibilityRenderObject::addChildren):
1855         * accessibility/AccessibilityRenderObject.h:
1856         (AccessibilityRenderObject):
1857         (WebCore::AccessibilityRenderObject::setRenderer):
1858         * accessibility/AccessibilitySlider.cpp:
1859         (WebCore::AccessibilitySlider::create):
1860         * accessibility/AccessibilityTable.cpp:
1861         (WebCore::AccessibilityTable::AccessibilityTable):
1862         (WebCore::AccessibilityTable::~AccessibilityTable):
1863         (WebCore):
1864         (WebCore::AccessibilityTable::create):
1865         * accessibility/AccessibilityTable.h:
1866         (AccessibilityTable):
1867         * accessibility/AccessibilityTableCell.cpp:
1868         (WebCore::AccessibilityTableCell::create):
1869         * accessibility/AccessibilityTableRow.cpp:
1870         (WebCore::AccessibilityTableRow::create):
1871
1872 2012-07-20  Christophe Dumez  <christophe.dumez@intel.com>
1873
1874         [EFL] Proxy configuration should honor the no_proxy environment variable
1875         https://bugs.webkit.org/show_bug.cgi?id=91747
1876
1877         Reviewed by Kenneth Rohde Christiansen.
1878
1879         Implement a custom Proxy URI Resolver for libsoup
1880         so that we can use it in EFL port. This custom
1881         proxy resolver brings support for setting
1882         exceptions so that the proxy is not used for the
1883         specified hosts.
1884
1885         By default, the proxy is not used for localhost and
1886         127.0.0.1.
1887
1888         No new tests, no behavior change for layout tests.
1889
1890         * PlatformEfl.cmake:
1891         * platform/network/soup/ProxyResolverSoup.cpp: Added.
1892         (soup_proxy_resolver_wk_init):
1893         (soupProxyResolverWkFinalize):
1894         (soupProxyResolverWkSetProperty):
1895         (soupProxyResolverWkGetProperty):
1896         (shouldBypassProxy):
1897         (idle_return_proxy_uri):
1898         (soupProxyResolverWkGetProxyURIAsync):
1899         (soupProxyResolverWkGetProxyURISync):
1900         (soup_proxy_resolver_wk_class_init):
1901         (soup_proxy_resolver_wk_interface_init):
1902         (soupProxyResolverWkNew):
1903         * platform/network/soup/ProxyResolverSoup.h: Added.
1904
1905 2012-07-20  Pierre Rossi  <pierre.rossi@gmail.com>
1906
1907         ColorChooserClient should expose the element's location
1908         https://bugs.webkit.org/show_bug.cgi?id=91767
1909
1910         Reviewed by Kent Tamura.
1911
1912         The rationale is that the chrome client could have an interest in placing the picker next to
1913         the element for usability reasons.
1914
1915         No new tests as there is not much logic here: Just exposing a geometry information to WebKit.
1916
1917         * html/ColorInputType.cpp:
1918         (WebCore::ColorInputType::elementRectRelativeToWindow):
1919         (WebCore):
1920         * html/ColorInputType.h:
1921         (ColorInputType):
1922         * platform/ColorChooserClient.h:
1923         (ColorChooserClient):
1924
1925 2012-07-20  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1926
1927         [WK2] WebIntents doesn't build if mutation observers is disabled
1928         https://bugs.webkit.org/show_bug.cgi?id=91839
1929
1930         Reviewed by Kenneth Rohde Christiansen.
1931
1932         WebIntents was depending on a code protected by ENABLE(MUTATION_OBSERVERS).
1933         Now the code is also enabled by ENABLE(WEB_INTENTS).
1934
1935         * bindings/js/JSDictionary.cpp:
1936         (WebCore):
1937         * bindings/js/JSDictionary.h:
1938
1939 2012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
1940
1941         [CSSRegions]Assert failure when layout positioned objects in regions
1942         https://bugs.webkit.org/show_bug.cgi?id=90792
1943
1944         Reviewed by Andreas Kling.
1945
1946         Before clamping the containing block (for an out-of-flow positioned element
1947         inside a named flow) to the region, we have to test whether the region is not
1948         null, which can happen when the named flow does not have attached regions.
1949
1950         Tests: fast/regions/positioned-vrl-in-named-flow.html
1951                fast/regions/positioned-vrl-in-parent-named-flow.html
1952                fast/regions/positioned-with-vrl-parent-in-named-flow.html
1953
1954         * rendering/RenderBox.cpp:
1955         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1956         (WebCore::RenderBox::computePositionedLogicalWidth):
1957         (WebCore::RenderBox::computePositionedLogicalHeight):
1958
1959 2012-07-20  Stephen Chenney  <schenney@chromium.org>
1960
1961         SVG Filter Effect sub-region not applied for some filters
1962         https://bugs.webkit.org/show_bug.cgi?id=89767
1963
1964         Reviewed by Dirk Schulze.
1965
1966         The filter effect region for SVG feGaussian and feDropShadow filters
1967         was incorrectly set, failing to account for the radius of the blur.
1968         This patch fixes the problem and removes an unneccessary clip
1969         operation when the filter result is blitted into the target. That clip
1970         was clipping the shadow from webkit-shadow.
1971
1972         Tests: svg/filters/feDropShadow-subregion.svg
1973                svg/filters/feGaussianBlur-subregion.svg
1974
1975         * platform/graphics/filters/FEDropShadow.cpp:
1976         (WebCore::FEDropShadow::determineAbsolutePaintRect): Moved the code
1977         that clips the paint rect by the filter effect subregion to come after
1978         the paint is modified by the filter radius.
1979         * platform/graphics/filters/FEGaussianBlur.cpp:
1980         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
1981         Moved the code that clips the paint rect by the filter effect subregion to
1982         come after the paint is modified by the filter radius.
1983         * rendering/svg/RenderSVGResourceFilter.cpp:
1984         (WebCore::RenderSVGResourceFilter::postApplyResource):
1985         Removed a clip that is unnecessary and that was incorrectly clipping drop shadows.
1986
1987 2012-07-19  Pavel Feldman  <pfeldman@chromium.org>
1988
1989         Web Inspector: Status bar icons are misaligned by 1px to the right
1990         https://bugs.webkit.org/show_bug.cgi?id=91757
1991
1992         Reviewed by Vsevolod Vlasov.
1993
1994         * inspector/front-end/inspector.css:
1995         (.glyph):
1996         (.glyph.shadow):
1997
1998 2012-07-20  Andrei Poenaru  <poenaru@adobe.com>
1999
2000         Web Inspector: Protocol Extension: add getNamedFlowCollection command
2001         https://bugs.webkit.org/show_bug.cgi?id=91607
2002
2003         Reviewed by Pavel Feldman.
2004
2005         Extended the protocol with "getNamedFlowCollection" command.
2006         This command returns the CSS Named Flows from the document.
2007
2008         Test: inspector/styles/protocol-getNamedFlowCollection-command.html
2009
2010         * dom/WebKitNamedFlowCollection.cpp:
2011         (WebCore::WebKitNamedFlowCollection::namedFlowsNames):
2012         (WebCore):
2013         * dom/WebKitNamedFlowCollection.h:
2014         (WebKitNamedFlowCollection):
2015         * inspector/Inspector.json:
2016         * inspector/InspectorCSSAgent.cpp:
2017         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2018         (WebCore):
2019         * inspector/InspectorCSSAgent.h:
2020         (InspectorCSSAgent):
2021         * inspector/InspectorDOMAgent.cpp:
2022         (WebCore::InspectorDOMAgent::assertDocument):
2023         (WebCore):
2024         * inspector/InspectorDOMAgent.h:
2025         (InspectorDOMAgent):
2026         * inspector/front-end/CSSStyleModel.js:
2027         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2028
2029 2012-07-20  Eugene Klyuchnikov  <eustas.big@gmail.com>
2030
2031         Web Inspector: Timeline: forward compatibility for load.
2032         https://bugs.webkit.org/show_bug.cgi?id=91714
2033
2034         Reviewed by Pavel Feldman.
2035
2036         Accept records of unrecognized types and render them as "unknown".
2037
2038         Test: inspector/timeline/timeline-load-incompatible.html
2039
2040         * English.lproj/localizedStrings.js: Added UI string.
2041         * inspector/front-end/TimelinePresentationModel.js:
2042         (WebInspector.TimelinePresentationModel.recordStyle): Add missing record
2043         styles at runtime.
2044         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
2045         Add some common information for default case.
2046
2047 2012-07-20  MORITA Hajime  <morrita@google.com>
2048
2049         Another unreviewed Mac build fix against r123184.
2050
2051         * WebCore.exp.in:
2052
2053 2012-07-20  Mihnea Ovidenie  <mihnea@adobe.com>
2054
2055         [CSSRegions]Crash when flowing a region into itself
2056         https://bugs.webkit.org/show_bug.cgi?id=90289
2057
2058         Reviewed by Andreas Kling.
2059
2060         If a region is designed to receive itself as content through a named flow, we avoid
2061         a circular dependency by not attaching the region to the desired named flow.
2062         In such occasions, the region's attached flow thread object is null and
2063         we have to check this pointer before using it in RenderRegion::styleDidChange.
2064
2065         Test: fast/regions/flow-region-into-itself-crash.html
2066
2067         * rendering/RenderRegion.cpp:
2068         (WebCore::RenderRegion::styleDidChange):
2069
2070 2012-07-20  MORITA Hajime  <morrita@google.com>
2071
2072         Unreviewed Mac build fix against r123184.
2073
2074         * WebCore.exp.in:
2075
2076 2012-07-17  Kinuko Yasuda  <kinuko@chromium.org>
2077
2078         If value for responseType defined as type that not supported, it should not throw an exception in XHR 2
2079         https://bugs.webkit.org/show_bug.cgi?id=90976
2080
2081         Reviewed by Alexey Proskuryakov.
2082
2083         http://www.w3.org/TR/XMLHttpRequest2/#the-responsetype-attribute
2084         The spec does not say it should throw an exception when a non-supported
2085         type is set, and other browsers do not throw it either.
2086
2087         Test: fast/xmlhttprequest/xmlhttprequest-responsetype-set-type.html
2088
2089         * xml/XMLHttpRequest.cpp:
2090         (WebCore::XMLHttpRequest::setResponseType): Stop throwing an exception when non-supported type is given.
2091
2092 2012-07-20  Matt Falkenhagen  <falken@chromium.org>
2093
2094         Show or hide <dialog> depending on the open attribute
2095         https://bugs.webkit.org/show_bug.cgi?id=90931
2096
2097         Reviewed by Kent Tamura.
2098
2099         Test: fast/dom/HTMLDialogElement/dialog-open.html
2100
2101         * css/html.css: Add CSS for dialog. This is copied verbatim from the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/#flow-content-1
2102         (dialog:not([open])):
2103         (dialog):
2104         * html/HTMLDialogElement.cpp:
2105         (WebCore::HTMLDialogElement::close): Set open to false, to hide the dialog.
2106         (WebCore::HTMLDialogElement::show): Set open to true, to show the dialog.
2107         (WebCore):
2108         (WebCore::HTMLDialogElement::isPresentationAttribute): Make openAttr a presentation attribute, to work around bug 91058
2109         * html/HTMLDialogElement.h:
2110         (HTMLDialogElement):
2111         * html/HTMLDialogElement.idl:
2112
2113 2012-07-20  Shinya Kawanaka  <shinyak@chromium.org>
2114
2115         Needs pseudo id to point the inner element of an img elemnet for styling
2116         https://bugs.webkit.org/show_bug.cgi?id=91590
2117
2118         Reviewed by Hajime Morita.
2119
2120         We introduce pseudo id to point the element in UserAgentShadowDOM.
2121         This enables us to style the inner element of an img element shadow.
2122         Please see also http://trac.webkit.org/wiki/ShadowDOMForReplacedElements
2123
2124         Test: fast/dom/shadow/shadowdom-for-image-with-pseudo-id.html
2125
2126         * html/shadow/ImageInnerElement.cpp:
2127         (WebCore::ImageInnerElement::shadowPseudoId):
2128         (WebCore):
2129         * html/shadow/ImageInnerElement.h:
2130         (ImageInnerElement):
2131
2132 2012-07-20  Kent Tamura  <tkent@chromium.org>
2133
2134         REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms
2135         https://bugs.webkit.org/show_bug.cgi?id=91804
2136
2137         Reviewed by Hajime Morita.
2138
2139         The complexity of FormKeyGenerator::formKey() was O(N) where N is the
2140         number of form elements with an identical action URL, and formKey() is
2141         called for every form. So, it's O(N^2). A page in www.reddit.com
2142         contains hundreds of form elements with action="#". So FormController::
2143         formElementsState() took a few seconds on a slow machine.
2144
2145         In order to avoid O(N^2) operation, storing a map from form signatures
2146         to next index numbers, instead of storing existing formKey strings.
2147
2148         No new tests. Just a performance improvement.
2149
2150         * html/FormController.cpp:
2151         (FormKeyGenerator): Remove m_existingKeys. Add a map from a form
2152         signature string to the next index number.
2153         (WebCore::formSignature): Returns a signature string for a form, without
2154         an index number. This is like "actionURL [name1 name2 ]"
2155         (WebCore::FormKeyGenerator::formKey):
2156         Creates a formKey string by concatenating a formSignature and #n. N is
2157         obtained from m_formSignatureToNextIndexMap in O(1).
2158         (WebCore::FormKeyGenerator::willDeleteForm):
2159         Remove the code for m_existingKeys.
2160
2161 2012-07-20  Keishi Hattori  <keishi@webkit.org>
2162
2163         Fix crash in WebCore::HTMLInputElement::dataList
2164         https://bugs.webkit.org/show_bug.cgi?id=91818
2165
2166         Reviewed by Kent Tamura.
2167
2168         Fix crash that occurs when setting slider appearance on a regular node.
2169
2170         Test: fast/forms/range/slider-appearance-crash.html
2171
2172         * rendering/RenderTheme.cpp:
2173         (WebCore::RenderTheme::paintSliderTicks): Check if node is an input element.
2174
2175 2012-07-20  Kent Tamura  <tkent@chromium.org>
2176
2177         [Chromium] Fix an assertion failure in TextFieldDecorationElement::hostInput()
2178         https://bugs.webkit.org/show_bug.cgi?id=91824
2179
2180         Reviewed by Hajime Morita.
2181
2182         No new tests. This code is used only in Chromium browser.
2183
2184         * html/shadow/TextFieldDecorationElement.cpp:
2185         (WebCore::TextFieldDecorationElement::hostInput):
2186         Use shadowHost(), and allow to return 0.
2187         (WebCore::TextFieldDecorationElement::defaultEventHandler):
2188         Check 0.
2189
2190 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
2191
2192         [Qt] Compile WebCore without QtWidgets
2193         https://bugs.webkit.org/show_bug.cgi?id=91819
2194
2195         Reviewed by Kenneth Rohde Christiansen.
2196
2197         * WebCore.pri: QT += opengl is not needed for Qt 5, given that QtGui has OpenGL
2198         support built in with the QOpenGL* classes.
2199
2200 2012-07-19  MORITA Hajime  <morrita@google.com>
2201
2202         [Refactoring] Replace Node's Document pointer with a TreeScope pointer
2203         https://bugs.webkit.org/show_bug.cgi?id=59816
2204
2205         Reviewed by Ryosuke Niwa.
2206
2207         Before this change, Node::treeScope() fetches the TreeScope object
2208         from ElementRareData. This approach has several shortcomings:
2209
2210         - rareData() call is slow due to a hashtable lookup.
2211         - In shadow tree, each node has its tree scope in ElementRareData,
2212           that means the rare-data is no longer rare in that case.
2213
2214         This change gets rid of ElementRareData::m_treeScope by replacing
2215         Node::m_document with Node::m_treeScope. And retrieves the
2216         document of Node through m_treeScope.
2217
2218         Note that Node::document() is a hot function and naive
2219         replacemennt of m_document with m_treeScope can hurt the
2220         speed. This change employs some tricks to address it.
2221
2222         - This change introduces Node::InShadowTree flag, if the flag is off,
2223           that means m_treeScope is actually a document an can be returned as the result.
2224           this eliminates an extract dereference.
2225         - Node::m_treeScope can be null. But we don't want to issue any extra
2226           conditional statement. So this change represents a null
2227           TreeScope as TreeScope::nullInstance(), which saves one conditional
2228           statement.
2229
2230         With these changes, the Node::document() slowdown is minimized to
2231         unnoticeable size.
2232
2233         No new tests. Covered by existing tests.
2234
2235         * dom/Document.cpp: Took care of connectio betwen TreeScope.
2236         (WebCore::Document::Document):
2237         (WebCore::Document::~Document):
2238         (WebCore::Document::suggestedMIMEType):
2239         * dom/Document.h:
2240         (WebCore::Node::treeScope): Now just return m_treeScope, taking care of nullInstance() case.
2241         (WebCore):
2242         (WebCore::Node::setTreeScope): Now just sets m_treeScope.
2243         (WebCore::Node::documentInternal): Extracted from document() to have ASSERT-free version.
2244         (WebCore::Node::document): Re-implemented over treeScope() and the flag.
2245         (WebCore::Node::isDocumentNode): Re-implemented using treeScope()
2246         (WebCore::Node::Node):
2247         * dom/Node.cpp:
2248         (WebCore::Node::~Node):
2249         (WebCore::Node::reportMemoryUsage):
2250         * dom/Node.h:
2251         (Node):
2252         (WebCore::Node::inDocument):
2253         (WebCore::Node::isInShadowTree): Rewrote to use InShadowTree flag.
2254         * dom/NodeRareData.h:
2255         (WebCore::NodeRareData::NodeRareData): Eliminated m_treeScope.
2256         (NodeRareData):
2257         * dom/ShadowRoot.cpp:
2258         (WebCore::ShadowRoot::ShadowRoot):
2259         * dom/TreeScope.cpp:
2260         (WebCore::TreeScope::TreeScope):
2261         (WebCore):
2262         (WebCore::TreeScope::setParentTreeScope): Added.
2263         (WebCore::TreeScope::isDocumentScope): Added.
2264         (WebCore::TreeScope::nullInstance): Added.
2265         * dom/TreeScope.h: Added m_parentTreeScope.
2266         (WebCore):
2267         (WebCore::TreeScope::rootDocument): Added.
2268         (TreeScope):
2269         * dom/TreeScopeAdopter.cpp: No longer calls setDocument()
2270         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2271         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2272         * editing/MoveSelectionCommand.cpp: Includes Document.h to find inlined Node functions
2273         * editing/RemoveNodeCommand.cpp: Includes Document.h to find inlined Node functions
2274         * editing/RemoveNodePreservingChildrenCommand.cpp: Includes Document.h to find inlined Node functions
2275         * inspector/PageConsoleAgent.cpp: Includes Document.h to find inlined Node functions
2276
2277 2012-07-19  David Hyatt  <hyatt@apple.com>
2278
2279         SVG not properly respecting max-width.
2280         https://bugs.webkit.org/show_bug.cgi?id=91474
2281
2282         My previous checkin for 91474 accidentally inverted width and height in the division case for
2283         the computation of height. When I fixed this inversion, I discovered that <object> elements
2284         are in fact also broken with max-width handling, and that furthermore, trying to apply the same
2285         max-width fix by calling RenderBox::computeReplacedLogicalWidth/Height failed because those methods
2286         call intrinsicLogicalWidth()/Height(). Becuase m_intrinsicSize is out-of-date and does not reflect
2287         the values we just obtained from the contentRenderer, we use the default 300x150 values for object
2288         and fail to render.
2289         
2290         In order to both fix SVG/<object> with max-width constraints and to keep <object> rendering correctly
2291         even when there are no max-width constraints, I was forced to update the m_intrinsicSize immediately
2292         in order to make sure that the RenderBox methods returned the right values when computing the width/height
2293         constrained to max/min-width/height values.
2294
2295         Reviewed by Dan Bernstein.
2296
2297         Added two new tests in svg/as-image. One test covers non-rectangular images to test for the inversion
2298         mistake I made. The second test applies a max-width to <object> and shows that we have never gotten
2299         this right before. An existing test in svg/as-image/ already covers basic <object> use (and tests that
2300         the intrinsic size of 300x150 is not used when an explicit non-percentage size is specified on the SVG
2301         itself).
2302
2303         * rendering/RenderReplaced.cpp:
2304         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
2305         Add a check to update m_intrinsicSize when we know it should apply, so that the calls to check against
2306         min/max-width fetch this correct size.
2307         
2308         * rendering/RenderReplaced.h:
2309         (RenderReplaced):
2310         Make m_intrinsicSize mutable because of the mutation that occurs during the method above. It may be
2311         that we should re-evaluate whether all of these methods should be const, but this would impact RenderBox
2312         methods as well, so I chose to hold off going down that rabbit hole.
2313
2314 2012-07-19  Dominic Mazzoni  <dmazzoni@google.com>
2315
2316         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
2317         https://bugs.webkit.org/show_bug.cgi?id=87899
2318
2319         Reviewed by Chris Fleizach.
2320
2321         Refactors AccessibilityRenderObject so that it inherits from a new class,
2322         AccessibilityNodeObject, that can be constructed from a Node without a
2323         renderer. Modifies AXObjectCache so that it automatically creates an
2324         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
2325         A new layout test verifies that this correctly exposes an accessibility
2326         tree with appropriate roles for elements in a canvas subtree.
2327
2328         This patch does not try to complete the implementation of
2329         AccessibilityNodeObject. Most AX methods are still unimplemented and need
2330         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
2331         in a future patch.
2332         
2333         This patch also doesn't change anything outside of WebCore/accessibility, so
2334         the rest of WebCore only calls AXObjectCache when there are changes to a
2335         RenderObject, not to a Node. Accessible notifications on nodes without
2336         renderers need to be implemented in a future patch.
2337
2338         Test: accessibility/canvas-accessibilitynodeobject.html
2339
2340         * CMakeLists.txt:
2341         * GNUmakefile.list.am:
2342         * Target.pri:
2343         * WebCore.gypi:
2344         * accessibility/AXObjectCache.cpp:
2345         (WebCore::AXObjectCache::get):
2346         (WebCore):
2347         (WebCore::createFromNode):
2348         (WebCore::AXObjectCache::getOrCreate):
2349         (WebCore::AXObjectCache::remove):
2350         * accessibility/AXObjectCache.h:
2351         (AXObjectCache):
2352         (WebCore::AXObjectCache::get):
2353         (WebCore::AXObjectCache::getOrCreate):
2354         (WebCore::AXObjectCache::remove):
2355         * accessibility/AccessibilityARIAGrid.cpp:
2356         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
2357         (WebCore):
2358         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
2359         (WebCore::AccessibilityARIAGrid::init):
2360         (WebCore::AccessibilityARIAGrid::create):
2361         * accessibility/AccessibilityARIAGrid.h:
2362         (AccessibilityARIAGrid):
2363         * accessibility/AccessibilityARIAGridCell.cpp:
2364         (WebCore::AccessibilityARIAGridCell::create):
2365         * accessibility/AccessibilityARIAGridRow.cpp:
2366         (WebCore::AccessibilityARIAGridRow::create):
2367         * accessibility/AccessibilityAllInOne.cpp:
2368         * accessibility/AccessibilityList.cpp:
2369         (WebCore::AccessibilityList::create):
2370         * accessibility/AccessibilityListBox.cpp:
2371         (WebCore::AccessibilityListBox::create):
2372         * accessibility/AccessibilityMediaControls.cpp:
2373         (WebCore::AccessibilityMediaControl::create):
2374         (WebCore::AccessibilityMediaControlsContainer::create):
2375         (WebCore::AccessibilityMediaTimeline::create):
2376         (WebCore::AccessibilityMediaTimeDisplay::create):
2377         * accessibility/AccessibilityMenuList.cpp:
2378         (WebCore::AccessibilityMenuList::create):
2379         (WebCore):
2380         * accessibility/AccessibilityMenuList.h:
2381         (AccessibilityMenuList):
2382         * accessibility/AccessibilityNodeObject.cpp: Added.
2383         (WebCore):
2384         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
2385         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
2386         (WebCore::AccessibilityNodeObject::init):
2387         (WebCore::AccessibilityNodeObject::create):
2388         (WebCore::AccessibilityNodeObject::detach):
2389         (WebCore::AccessibilityNodeObject::childrenChanged):
2390         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
2391         (WebCore::AccessibilityNodeObject::firstChild):
2392         (WebCore::AccessibilityNodeObject::lastChild):
2393         (WebCore::AccessibilityNodeObject::previousSibling):
2394         (WebCore::AccessibilityNodeObject::nextSibling):
2395         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
2396         (WebCore::AccessibilityNodeObject::parentObject):
2397         (WebCore::AccessibilityNodeObject::elementRect):
2398         (WebCore::AccessibilityNodeObject::setNode):
2399         (WebCore::AccessibilityNodeObject::document):
2400         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2401         (WebCore::AccessibilityNodeObject::addChildren):
2402         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
2403         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2404         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
2405         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
2406         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
2407         * accessibility/AccessibilityNodeObject.h: Added.
2408         (WebCore):
2409         (AccessibilityNodeObject):
2410         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
2411         (WebCore::AccessibilityNodeObject::node):
2412         (WebCore::AccessibilityNodeObject::isDetached):
2413         (WebCore::toAccessibilityNodeObject):
2414         * accessibility/AccessibilityObject.h:
2415         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
2416         * accessibility/AccessibilityProgressIndicator.cpp:
2417         (WebCore::AccessibilityProgressIndicator::create):
2418         * accessibility/AccessibilityRenderObject.cpp:
2419         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2420         (WebCore::AccessibilityRenderObject::init):
2421         (WebCore):
2422         (WebCore::AccessibilityRenderObject::create):
2423         (WebCore::AccessibilityRenderObject::detach):
2424         (WebCore::AccessibilityRenderObject::setRenderer):
2425         (WebCore::AccessibilityRenderObject::canHaveChildren):
2426         (WebCore::AccessibilityRenderObject::addCanvasChildren):
2427         (WebCore::AccessibilityRenderObject::addChildren):
2428         * accessibility/AccessibilityRenderObject.h:
2429         (AccessibilityRenderObject):
2430         * accessibility/AccessibilitySlider.cpp:
2431         (WebCore::AccessibilitySlider::create):
2432         * accessibility/AccessibilityTable.cpp:
2433         (WebCore::AccessibilityTable::AccessibilityTable):
2434         (WebCore):
2435         (WebCore::AccessibilityTable::~AccessibilityTable):
2436         (WebCore::AccessibilityTable::init):
2437         (WebCore::AccessibilityTable::create):
2438         * accessibility/AccessibilityTable.h:
2439         (AccessibilityTable):
2440         * accessibility/AccessibilityTableCell.cpp:
2441         (WebCore::AccessibilityTableCell::create):
2442         * accessibility/AccessibilityTableRow.cpp:
2443         (WebCore::AccessibilityTableRow::create):
2444
2445 2012-07-19  Dan Bernstein  <mitz@apple.com>
2446
2447         The ATSUI-based complex text code is unused
2448         https://bugs.webkit.org/show_bug.cgi?id=91816
2449
2450         Reviewed by Sam Weinig.
2451
2452         * WebCore.gypi: Removed references to the files deleted in this change.
2453         * WebCore.xcodeproj/project.pbxproj: Ditto.
2454         * platform/graphics/FontCache.h:
2455         (FontCache): Replaced USE(CORE_TEXT) with PLATFORM(MAC) || PLATFORM(CHROMIUM) && OS(DARWIN).
2456         * platform/graphics/SimpleFontData.h:
2457         (SimpleFontData): Removed USE(ATSUI)-only code, replaced USE(CORE_TEXT) with
2458         (PLATFORM(CHROMIUM) && OS(DARWIN)).
2459         * platform/graphics/mac/ComplexTextController.cpp: Removed USE(ATSUI)-only code. Moved
2460         collectComplexTextRunsForCharacters() and the ComplexTextRun constructor out of this file.
2461         * platform/graphics/mac/ComplexTextController.h: Removed USE(ATSUI)-only code and removed
2462         #if USE(CORE_TEXT) because anyone including this header is using Core Text.
2463         * platform/graphics/mac/ComplexTextControllerATSUI.cpp: Removed.
2464         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2465         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved from
2466         ComplexTextController.cpp into this file and merged with createTextRunFromFontDataCoreText().
2467         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved from
2468         ComplexTextController.cpp into this file and merged with
2469         collectComplexTextRunsForCharactersCoreText().
2470         * platform/graphics/mac/SimpleFontDataATSUI.mm: Removed.
2471         * platform/graphics/mac/SimpleFontDataMac.mm:
2472         (WebCore::SimpleFontData::platformInit): Remove USE(ATSUI)-only code.
2473         (WebCore::SimpleFontData::platformDestroy): Ditto.
2474         * platform/text/mac/ShapeArabic.c: Removed.
2475         * platform/text/mac/ShapeArabic.h: Removed.
2476
2477 2012-07-19  Kent Tamura  <tkent@chromium.org>
2478
2479         Introduce Node::shadowHost()
2480         https://bugs.webkit.org/show_bug.cgi?id=91814
2481
2482         Reviewed by Hajime Morita.
2483
2484         Introduce Node::shadowHost(), which return the host element, or 0.
2485         Node::shadowAncestorNode() is used to obtain a shadow host. However it
2486         is confusing because it returns 'this' if this is not in a shadow tree.
2487
2488         Replaces one callsite of shadowAncestorNode() with shadowHost().
2489
2490         No behavior change.
2491
2492         * dom/Node.cpp:
2493         (WebCore::Node::shadowHost): Added.
2494         * dom/Node.h:
2495         (Node): Declare shadowHost(), and add a comment to shadowAncestorNode().
2496         * html/shadow/CalendarPickerElement.cpp:
2497         (WebCore::CalendarPickerElement::hostInput):
2498         Replace shadowAncestorNode() with shaodwHost().
2499
2500 2012-07-19  Kent Tamura  <tkent@chromium.org>
2501
2502         Form state restore: Need to identify a form by its content
2503         https://bugs.webkit.org/show_bug.cgi?id=91209
2504
2505         Reviewed by Hajime Morita.
2506
2507         Add names of the first two controls of a form to its formKey
2508         string. By this change, we can correctly restore states to
2509         reordered forms like webkit.org/b/91209#c0.
2510
2511         Tests: Added test cases to fast/forms/state-restore-per-form.html.
2512
2513         * html/FormController.cpp:
2514         (WebCore::recordFormStructure):
2515         Append at most two name attribute values.
2516         (WebCore::createKey): Insert a string built by recordFromStructure().
2517         (WebCore::formStateSignature): Bump the version.
2518
2519 2012-07-19  Wei James  <james.wei@intel.com>
2520
2521         enable Web Audio for chromium android port
2522         https://bugs.webkit.org/show_bug.cgi?id=89428
2523
2524         Reviewed by Kenneth Russell.
2525
2526         * WebCore.gyp/WebCore.gyp:
2527         * platform/audio/FFTFrameStub.cpp:
2528         (WebCore::FFTFrame::doFFT):
2529
2530 2012-07-19  David Hyatt  <hyatt@apple.com>
2531
2532         SVG images broken when max-width specified.
2533         https://bugs.webkit.org/show_bug.cgi?id=91474
2534
2535         SVG images were computing intrinsic dimensions when width and height were auto that did not
2536         respect min-max width/height. Normal images had code that applied these constraints properly.
2537         Looking at the code before the check-in that broke things, these constraints used to be
2538         applied to all images regardless of type via calcAspectRatioLogicalWidth/Height.
2539         
2540         This patch leaves the new function structure in place but converts the code to be more like
2541         it was prior to the introduction of the regression. Instead of raw intrinsic sizes being
2542         used in the SVG case, now all image types get the intrinsic sizes constrained when doing
2543         width/height computations.
2544
2545         Reviewed by Dan Bernstein.
2546
2547         Test: svg/as-image/svg-intrinsic-size.html
2548
2549         * rendering/RenderReplaced.cpp:
2550         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
2551         Rename computeIntrinsicRatioInformationForRenderBox to computeAspectRatioInformationForRenderBox.
2552         Also rename the intrinsicSize reference to constrainedSize to reflect the fact that the size
2553         is not necessarily the intrinsic size any longer but instead a size where both axes have been
2554         constrained based off the max-min values of the opposite axes.
2555         
2556         Move the constraining code out of RenderReplaced::computeIntrinsicRatioInformation into this
2557         function so that the SVG code path appies the constraints as well. The movement of this code
2558         is what fixes the bug.
2559
2560         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
2561         Changed to remove the code that constrains the returned size, since it is shifting to
2562         computeAspectRatioInformationForRenderBox instead.
2563
2564         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2565         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2566         * rendering/RenderReplaced.h:
2567         (RenderReplaced):
2568         Patch the name of the reference passed in to computeReplacedLogicalWidth/Height to be
2569         constrainedSize instead of intrinsicSize, so that it is more obvious that the returned
2570         result is not just the intrinsic size of the image.
2571
2572 2012-07-19  Dmitry Titov  <dimich@chromium.org>
2573
2574         Unreviewed, reverting http://trac.webkit.org/changeset/123149.
2575         It broke an IDB test on Chromium page cycler.
2576
2577         * bindings/v8/SerializedScriptValue.cpp:
2578         (WebCore::SerializedScriptValue::SerializedScriptValue):
2579         (WebCore):
2580         * bindings/v8/SerializedScriptValue.h:
2581         * dom/MessageEvent.cpp:
2582         (WebCore::MessageEvent::MessageEvent):
2583         (WebCore::MessageEvent::initMessageEvent):
2584
2585 2012-07-19  Julien Chaffraix  <jchaffraix@webkit.org>
2586
2587         [CSS2.1] Anonymous tables should be inline/block-level based off their parent
2588         https://bugs.webkit.org/show_bug.cgi?id=15365
2589
2590         Reviewed by Abhishek Arya.
2591
2592         This change makes us match bullet 3 "Generate missing parents" of section 17.2.1 http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes":
2593         "If a table is contained by an inline element, then the anonymous tables should be inline-tables."
2594
2595         Patch based on an earlier change by Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>.
2596
2597         Tests: css2.1/20110323/inline-table-002b.html
2598                fast/dynamic/insert-before-table-part-in-continuation.html
2599                fast/table/inline-table-in-continuation.html
2600                fast/table/inline-table-with-caption.html
2601
2602         * rendering/RenderTable.cpp:
2603         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2604         Added a check to determine if we should be inline or block based on our parent to match CSS 2.1.
2605
2606         * rendering/RenderInline.cpp:
2607         (WebCore::RenderInline::addChildIgnoringContinuation):
2608         Changed the child addition logic to not wrap a table part in an inline context. This change works
2609         as intended as we will call RenderObject::addChild which will create an anonymous inline table that
2610         will be added under |this| instead of the table part. As the table is inline, it doesn't need to be
2611         wrapped when we recursively call RenderInline::addChild.
2612
2613 2012-07-19  Chris Fleizach  <cfleizach@apple.com>
2614
2615         WebKit should pass <title> element value as the default description for web views
2616         https://bugs.webkit.org/show_bug.cgi?id=91763
2617
2618         Reviewed by Anders Carlsson.
2619
2620         Update the logic for determining the description for the AXWebArea to include the document's title.
2621
2622         Test: platform/mac/accessibility/document-title-used-for-description.html
2623
2624         * accessibility/AccessibilityRenderObject.cpp:
2625         (WebCore::AccessibilityRenderObject::webAreaAccessibilityDescription):
2626            Move web area description handling into a separate method.
2627         (WebCore::AccessibilityRenderObject::accessibilityDescription):
2628         * accessibility/AccessibilityRenderObject.h:
2629         (AccessibilityRenderObject):
2630
2631 2012-07-19  Zeev Lieber  <zlieber@chromium.org>
2632
2633         [Chromium] Textures drawn during occlusion are incorrectly re-used when unoccluded.
2634         https://bugs.webkit.org/show_bug.cgi?id=91537
2635
2636         Reviewed by Adrienne Walker.
2637
2638         Detecting if any external occlusion occurs when drawing a
2639         texture. If external occlusion happens, the texture is marked as
2640         "incomplete" in LayerRendererChromium, and is not being considered
2641         for re-use.
2642
2643         Minor refactoring of CCQuadCuller - extracted interface
2644         (CCQuadSink) and united append() and appendSurface() methods.
2645
2646         Added unit tests to verify this fix; also added test to try
2647         clipping instead of occlusion.
2648
2649         * platform/graphics/chromium/LayerRendererChromium.cpp:
2650         (LayerRendererChromium::CachedTexture):
2651         (WebCore::LayerRendererChromium::CachedTexture::create):
2652         (WebCore::LayerRendererChromium::CachedTexture::~CachedTexture):
2653         (WebCore::LayerRendererChromium::CachedTexture::isComplete):
2654         (WebCore::LayerRendererChromium::CachedTexture::setIsComplete):
2655         (WebCore::LayerRendererChromium::CachedTexture::CachedTexture):
2656         (WebCore):
2657         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
2658         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
2659         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2660         * platform/graphics/chromium/LayerRendererChromium.h:
2661         (LayerRendererChromium):
2662         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2663         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2664         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
2665         (CCIOSurfaceLayerImpl):
2666         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2667         (WebCore::CCLayerImpl::appendDebugBorderQuad):
2668         * platform/graphics/chromium/cc/CCLayerImpl.h:
2669         (WebCore):
2670         (WebCore::CCLayerImpl::appendQuads):
2671         (CCLayerImpl):
2672         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2673         (WebCore::::unoccludedContentRect):
2674         (WebCore::::unoccludedContributingSurfaceContentRect):
2675         (WebCore):
2676         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2677         (CCOcclusionTrackerBase):
2678         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2679         (WebCore::CCQuadCuller::CCQuadCuller):
2680         (WebCore::CCQuadCuller::append):
2681         * platform/graphics/chromium/cc/CCQuadCuller.h:
2682         (WebCore):
2683         (CCQuadCuller):
2684         (WebCore::CCQuadCuller::~CCQuadCuller):
2685         (WebCore::CCQuadCuller::hasExternalOcclusion):
2686         * platform/graphics/chromium/cc/CCQuadSink.h:
2687         (WebKit):
2688         (WebCore):
2689         (CCQuadSink):
2690         (WebCore::CCQuadSink::~CCQuadSink):
2691         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2692         (WebCore::CCRenderPass::CCRenderPass):
2693         (WebCore::CCRenderPass::appendQuadsForLayer):
2694         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2695         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
2696         (WebCore::CCRenderPassDrawQuad::create):
2697         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
2698         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
2699         (CCRenderPassDrawQuad):
2700         (WebCore::CCRenderPassDrawQuad::hasExternalOcclusion):
2701         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2702         (WebCore::CCRenderSurface::CCRenderSurface):
2703         (WebCore::CCRenderSurface::appendQuads):
2704         * platform/graphics/chromium/cc/CCRenderSurface.h:
2705         (WebCore):
2706         (WebCore::CCRenderSurface::setHasExternalOcclusion):
2707         (WebCore::CCRenderSurface::hasExternalOcclusion):
2708         (CCRenderSurface):
2709         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2710         (WebCore::CCScrollbarLayerImpl::appendQuads):
2711         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2712         (CCScrollbarLayerImpl):
2713         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2714         (WebCore::CCSolidColorLayerImpl::appendQuads):
2715         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2716         (CCSolidColorLayerImpl):
2717         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2718         (WebCore::CCTextureLayerImpl::appendQuads):
2719         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
2720         (CCTextureLayerImpl):
2721         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2722         (WebCore::CCTiledLayerImpl::appendQuads):
2723         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2724         (CCTiledLayerImpl):
2725         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2726         (WebCore::CCVideoLayerImpl::appendQuads):
2727         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2728         (CCVideoLayerImpl):
2729
2730 2012-07-19  Simon Fraser  <simon.fraser@apple.com>
2731
2732         Keep overlap testing on for descendants of an animating element
2733         https://bugs.webkit.org/show_bug.cgi?id=91787
2734
2735         Reviewed by Beth Dakin.
2736
2737         RenderLayerCompositor::computeCompositingRequirements() would turn off
2738         overlap testing for descendants of a layer that has a 3D transform,
2739         or has an animating transform. This could cause compositing changes
2740         inside an animating element when transitions start and stop, which
2741         is undesirable.
2742         
2743         Instead, we can keep overlap testing on for descendants of that
2744         animating element, but we have to turn it off for layers later
2745         in z-order.
2746         
2747         Also enhance the "IndirectCompositingReason" flags so that in
2748         the compositing log output, we can distinguish between layers that
2749         were composited as a result of overlap testing from those compositing
2750         for stacking reasons.
2751
2752         Test: compositing/layer-creation/animation-overlap-with-children.html
2753
2754         * rendering/RenderLayer.h: New IndirectCompositingReason value to
2755         distinguish overlap from stacking.
2756         * rendering/RenderLayerCompositor.cpp:
2757         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2758         Use an IndirectCompositingReason enum rather than a bool to track whether
2759         the layer starts as composited.
2760         Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer()))
2761         check that turned off overlap testing for descendants of this layer.
2762         Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers.
2763         Turn overlap testing off for layers later in the z-order.
2764         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into
2765         account.
2766         (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output.
2767
2768 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2769
2770         [Qt] Enable CSS shaders in Qt (software mode)
2771         https://bugs.webkit.org/show_bug.cgi?id=85140
2772
2773         Reviewed by Simon Hausmann.
2774
2775         Added missing files to the Qt build.
2776
2777         No new tests, WebGL is still disabled by default in the bots.
2778
2779         * Target.pri:
2780
2781 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2782
2783         [Qt] Enable CSS shaders in Qt (software mode)
2784         https://bugs.webkit.org/show_bug.cgi?id=85140
2785
2786         Reviewed by Simon Hausmann.
2787
2788         Added missing files to the Qt build.
2789
2790         No new tests, WebGL is still disabled by default in the bots.
2791
2792         * Target.pri:
2793
2794 2012-07-19  Simon Fraser  <simon.fraser@apple.com>
2795
2796         Keep overlap testing on for descendants of an animating element
2797         https://bugs.webkit.org/show_bug.cgi?id=91787
2798
2799         Reviewed by Beth Dakin.
2800
2801         RenderLayerCompositor::computeCompositingRequirements() would turn off
2802         overlap testing for descendants of a layer that has a 3D transform,
2803         or has an animating transform. This could cause compositing changes
2804         inside an animating element when transitions start and stop, which
2805         is undesirable.
2806         
2807         Instead, we can keep overlap testing on for descendants of that
2808         animating element, but we have to turn it off for layers later
2809         in z-order.
2810         
2811         Also enhance the "IndirectCompositingReason" flags so that in
2812         the compositing log output, we can distinguish between layers that
2813         were composited as a result of overlap testing from those compositing
2814         for stacking reasons.
2815
2816         Test: compositing/layer-creation/animation-overlap-with-children.html
2817
2818         * rendering/RenderLayer.h: New IndirectCompositingReason value to
2819         distinguish overlap from stacking.
2820         * rendering/RenderLayerCompositor.cpp:
2821         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2822         Use an IndirectCompositingReason enum rather than a bool to track whether
2823         the layer starts as composited.
2824         Remove the if (layer->has3DTransform() || isRunningAcceleratedTransformAnimation(layer->renderer()))
2825         check that turned off overlap testing for descendants of this layer.
2826         Use IndirectCompositingForStacking (somewhat arbitrarily) for reflection layers.
2827         Turn overlap testing off for layers later in the z-order.
2828         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Take IndirectCompositingForStacking into
2829         account.
2830         (WebCore::RenderLayerCompositor::reasonForCompositing): Improve the logging output.
2831
2832 2012-07-19  No'am Rosenthal  <noam.rosenthal@nokia.com>
2833
2834         [Qt] Enable CSS shaders in Qt (software mode)
2835         https://bugs.webkit.org/show_bug.cgi?id=85140
2836
2837         Reviewed by Simon Hausmann.
2838
2839         Added missing files to the Qt build.
2840
2841         No new tests, WebGL is still disabled by default in the bots.
2842
2843         * Target.pri:
2844
2845 2012-07-17  Dmitry Titov  <dimich@chromium.org>
2846
2847         [Chromium] Out of Memory is observed when a large object is passed to a Web Worker.
2848         https://bugs.webkit.org/show_bug.cgi?id=91535.
2849
2850         Reviewed by Dave Levin.
2851
2852         No new tests because of no new behavior and lack of mechanism to monitor used memory.
2853
2854         * bindings/v8/SerializedScriptValue.cpp:
2855         (WebCore::SerializedScriptValue::SerializedScriptValue):
2856         (WebCore::SerializedScriptValue::registerMemoryAllocatedWithCurrentScriptContext):
2857         (WebCore):
2858         (WebCore::SerializedScriptValue::~SerializedScriptValue):
2859         * bindings/v8/SerializedScriptValue.h:
2860         (SerializedScriptValue):
2861         Added a method to SerializedScriptValue to add memory pressure on GC proportional to the size of memory allocated in serialized data.
2862         
2863         * dom/MessageEvent.cpp:
2864         (WebCore::MessageEvent::MessageEvent):
2865         (WebCore::MessageEvent::initMessageEvent):
2866         Call the new method of SerializedScriptValue during creation of MessageEvent (presumably in the thread which contains the right V8 context).
2867
2868 2012-07-19  Dan Bernstein  <mitz@apple.com>
2869
2870         In flipped blocks writing modes, no flipping occurs when mapping RenderText’s local coordinates to absolute
2871         https://bugs.webkit.org/show_bug.cgi?id=91780
2872
2873         Reviewed by Anders Carlsson.
2874
2875         Test: fast/writing-mode/flipped-blocks-text-map-local-to-container.html
2876
2877         When RenderObject::mapLocalToContainer() was called on a RenderText with ApplyContainerFlip,
2878         it would not flip (if the container was not a box) but it would always pass
2879         DoNotApplyContainerFlip when recurring to the parent. This meant that no one applied the flip.
2880
2881         * rendering/RenderInline.cpp:
2882         (WebCore::RenderInline::mapLocalToContainer): Made the setting of applyContainerFlip to
2883         false unconditional on the container actually being flipped.
2884         * rendering/RenderObject.cpp:
2885         (WebCore::RenderObject::mapLocalToContainer): Rather than always passing
2886         DoNotApplyContainerFlip when recurring to the parent, changed this function to pass through
2887         the value of applyContainerFlip it was called with, unless it applied the flip itself.
2888
2889 2012-07-19  Erik Arvidsson  <arv@chromium.org>
2890
2891         Window top should not be replaceable
2892         https://bugs.webkit.org/show_bug.cgi?id=91755
2893
2894         Reviewed by Adam Barth.
2895
2896         Window top is readonly and unforgable and should not be replaceable.
2897
2898         http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-window-object
2899
2900         This change brings JSC inline with all other browsers.
2901
2902         No new tests. Modified existing tests.
2903
2904         * page/DOMWindow.idl:
2905
2906 2012-07-19  Max Feil  <mfeil@rim.com>
2907
2908         [BlackBerry] Only maintain the hole punch rect while html5 video is being renderered
2909         https://bugs.webkit.org/show_bug.cgi?id=91689
2910
2911         Reviewed by Antonio Gomes.
2912
2913         The hole punch rectangle needs to be present if and only if html5
2914         video content is being rendered. Otherwise unwanted content may
2915         show through from behind the browser tab's window.
2916
2917         I am not adding any new tests because the difficulty of testing
2918         for this case outweighs the benefit.
2919
2920         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2921         (WebCore::MediaPlayerPrivate::updateStates):
2922
2923 2012-07-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2924
2925         [CSS Exclusions] - Code cleanup: make shape parsing use isComma() instead of manual checks
2926         https://bugs.webkit.org/show_bug.cgi?id=91760
2927
2928         Reviewed by Eric Seidel.
2929
2930         Remove code duplication by making the rectangle, circle, and ellipse
2931         methods use isComma() to detect a comma.
2932
2933         No new tests needed: no new functionality added.
2934
2935         * css/CSSParser.cpp:
2936         (WebCore::CSSParser::parseExclusionShapeRectangle):
2937         (WebCore::CSSParser::parseExclusionShapeCircle):
2938         (WebCore::CSSParser::parseExclusionShapeEllipse):
2939
2940 2012-07-19  Raymond Toy  <rtoy@google.com>
2941
2942         Limit maximum delay of DelayNode.
2943         https://bugs.webkit.org/show_bug.cgi?id=91675
2944
2945         Reviewed by Kenneth Russell.
2946
2947         Clip the maximum delay of a DelayNode to a reasonable maximum.
2948         
2949         Test: webaudio/delaynode-maxdelaylimit.html
2950
2951         * Modules/webaudio/DelayNode.cpp:
2952         (WebCore): Add maximumAllowedDelayTime.
2953         (WebCore::DelayNode::DelayNode): Clip max delay.
2954
2955 2012-07-14  Robert Hogan  <robert@webkit.org>
2956
2957         CSS 2.1 failure: text-indent-intrinsic-003 fails
2958         https://bugs.webkit.org/show_bug.cgi?id=80576
2959
2960         Reviewed by Eric Seidel.
2961
2962         Negative values of text-indent should be distributed across inline children until used up.
2963         This fixes text-indent-intrinsic-003 and text-indent-intrinsic-004.
2964
2965         Tests: css2.1/20110323/text-indent-intrinsic-001.htm
2966                css2.1/20110323/text-indent-intrinsic-002.htm
2967                css2.1/20110323/text-indent-intrinsic-003.htm
2968                css2.1/20110323/text-indent-intrinsic-004.htm
2969
2970         * rendering/RenderBlock.cpp:
2971         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): If text-indent is negative, keep
2972          applying it to inline children in the first formatted line until it's reduced to zero. This isn't
2973          a consideration when text-indent is a positive value.
2974
2975 2012-07-19  Douglas Stockwell  <dstockwell@google.com>
2976
2977         Crash in WebCore::StyleResolver::collectMatchingRulesForList
2978         https://bugs.webkit.org/show_bug.cgi?id=90803
2979
2980         Reviewed by Andreas Kling.
2981
2982         When a ProcessingInstruction was removed from the document the owner
2983         was removed, but the style resolver was not guaranteed to be updated.
2984         It was then possible for an inconsistent version of the stylesheet to
2985         remain visible in the DOM. Fixed by removing an invalid condition and
2986         mirroring the logic from StyleElement.
2987
2988         Test: fast/css/xml-stylesheet-removed.xhtml
2989
2990         * dom/ProcessingInstruction.cpp:
2991         (WebCore::ProcessingInstruction::removedFrom): Mirror the logic from
2992         StyleElement -- always update the style resolver.
2993
2994 2012-07-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2995
2996         Shape-inside / shape-outside should support percent-based measurements
2997         https://bugs.webkit.org/show_bug.cgi?id=90311
2998
2999         Reviewed by Andreas Kling.
3000
3001         Update the CSS Parser to accept percentage length values for exclusion
3002         shapes.
3003
3004         Testing added to LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
3005
3006         * css/CSSParser.cpp:
3007         (WebCore::CSSParser::parseExclusionShapeRectangle):
3008         (WebCore::CSSParser::parseExclusionShapeCircle):
3009         (WebCore::CSSParser::parseExclusionShapeEllipse):
3010         (WebCore::CSSParser::parseExclusionShapePolygon):
3011
3012 2012-07-19  Tony Chang  <tony@chromium.org>
3013
3014         Unreviewed, rolling out r123117.
3015         http://trac.webkit.org/changeset/123117
3016         https://bugs.webkit.org/show_bug.cgi?id=91667
3017
3018         Breaks chromium-win compile.
3019
3020         * WebCore.gyp/WebCore.gyp:
3021         * WebCore.gyp/scripts/rule_bison.py:
3022         * bindings/scripts/preprocessor.pm:
3023         (applyPreprocessor):
3024         * make-hash-tools.pl:
3025
3026 2012-07-19  James Simonsen  <simonjam@chromium.org>
3027
3028         Regression(120096): Protect the element used by ImageLoader until the end of notifyFinished().
3029         https://bugs.webkit.org/show_bug.cgi?id=90471
3030
3031         Reviewed by Brady Eidson.
3032
3033         Test: http/tests/security/video-poster-cross-origin-crash.html
3034
3035         * html/HTMLImageLoader.cpp:
3036         (WebCore::HTMLImageLoader::notifyFinished): Hang on to the element until we're done.
3037         * loader/ImageLoader.cpp:
3038         (WebCore::ImageLoader::setImage): No behavior change.
3039         (WebCore):
3040         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Split off from old setImage, minus calling updatedHasPendingLoadEvent().
3041         (WebCore::ImageLoader::notifyFinished): Invoke updatedHasPendingLoadEvent when done with cross origin errors.
3042         * loader/ImageLoader.h:
3043         (ImageLoader):
3044
3045 2012-07-19  Scott Graham  <scottmg@chromium.org>
3046
3047         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
3048         https://bugs.webkit.org/show_bug.cgi?id=91667
3049
3050         Reviewed by Kentaro Hara.
3051
3052         Using native tools instead of cygwin version improves build time
3053         performance by roughly 50% (on top of previous cl-instead-of-gcc
3054         change).
3055
3056         No new tests.
3057
3058         * WebCore.gyp/WebCore.gyp:
3059         * WebCore.gyp/scripts/rule_bison.py:
3060         * bindings/scripts/preprocessor.pm:
3061         (applyPreprocessor):
3062         * make-hash-tools.pl:
3063
3064 2012-07-19  Andrey Kosyakov  <caseq@chromium.org>
3065
3066         Web Inspector: CPU bars are not cleared along with the rest of the timeline panel
3067         https://bugs.webkit.org/show_bug.cgi?id=91753
3068
3069         Reviewed by Pavel Feldman.
3070
3071         - remove early bail-outs in  refreshMainThreadBars; let it run to clear bars for the non-existent / invisible events;
3072
3073         * inspector/front-end/TimelinePanel.js:
3074         (WebInspector.TimelinePanel.prototype._refreshMainThreadBars):
3075
3076 2012-07-19  Joshua Bell  <jsbell@chromium.org>
3077
3078         IndexedDB: Throw native TypeErrors per spec
3079         https://bugs.webkit.org/show_bug.cgi?id=91679
3080
3081         Reviewed by Kentaro Hara.
3082
3083         Per the IDB spec, the advance(), openCursor(), openKeyCursor() and transaction()
3084         methods supposed to throw true native JavaScript TypeError objects as exceptions
3085         rather than DOMException objects. Implement this by adding a special DOMException
3086         code that is tested for in the binding layer.
3087
3088         Tests: storage/indexeddb/cursor-advance.html
3089                storage/indexeddb/index-basics.html
3090                storage/indexeddb/index-basics-workers.html
3091                storage/indexeddb/objectstore-cursor.html
3092                storage/indexeddb/transaction-basics.html
3093
3094         * Modules/indexeddb/IDBCursor.cpp: Use the new DOMException code.
3095         (WebCore::IDBCursor::advance):
3096         (WebCore::IDBCursor::stringToDirection):
3097         (WebCore::IDBCursor::directionToString):
3098         * Modules/indexeddb/IDBDatabase.cpp: Ditto.
3099         (WebCore::IDBDatabase::setVersion):
3100         * Modules/indexeddb/IDBDatabaseException.cpp: Remove temporary cruft/mark as legacy.
3101         (WebCore):
3102         * Modules/indexeddb/IDBDatabaseException.h: Ditto.
3103         * Modules/indexeddb/IDBDatabaseException.idl: Ditto.
3104         * Modules/indexeddb/IDBFactory.cpp: Use the new DOMException code.
3105         (WebCore::IDBFactory::open):
3106         (WebCore::IDBFactory::deleteDatabase):
3107         * Modules/indexeddb/IDBObjectStore.cpp:
3108         (WebCore::IDBObjectStore::createIndex): Use the new DOMException code.
3109         * Modules/indexeddb/IDBTransaction.cpp: Use the new DOMException code.
3110         (WebCore::IDBTransaction::stringToMode):
3111         (WebCore::IDBTransaction::modeToString):
3112         * bindings/js/JSDOMBinding.cpp:
3113         (WebCore::setDOMException): Intercept new DOMException code, throw native TypeError.
3114         * bindings/v8/V8Proxy.cpp:
3115         (WebCore::V8Proxy::setDOMException): Ditto.
3116         * dom/ExceptionCode.h: Add new DOMException code.
3117
3118 2012-07-19  Joshua Bell  <jsbell@chromium.org>
3119
3120         Roll out r121610 and r122487 which may have been causing flaky crashes
3121         https://bugs.webkit.org/show_bug.cgi?id=91637
3122
3123         Reviewed by Kentaro Hara.
3124
3125         Flaky crashes started in random tests following r121610. It's not clear
3126         that r121610 is to blame, but we'd like to prove or disprove it.
3127         If this doesn't resolve the crashes, this patch should be rolled out.
3128
3129         * WebCore.gypi:
3130         * bindings/v8/NPObjectWrapper.cpp: Added.
3131         (WebCore):
3132         (NPProxyObject):
3133         (WebCore::NPObjectWrapper::NPObjectWrapper):
3134         (WebCore::NPObjectWrapper::create):
3135         (WebCore::NPObjectWrapper::clear):
3136         (WebCore::NPObjectWrapper::getWrapper):
3137         (WebCore::NPObjectWrapper::getUnderlyingNPObject):
3138         (WebCore::NPObjectWrapper::getObjectForCall):
3139         (WebCore::NPObjectWrapper::NPAllocate):
3140         (WebCore::NPObjectWrapper::NPDeallocate):
3141         (WebCore::NPObjectWrapper::NPPInvalidate):
3142         (WebCore::NPObjectWrapper::NPHasMethod):
3143         (WebCore::NPObjectWrapper::NPInvoke):
3144         (WebCore::NPObjectWrapper::NPInvokeDefault):
3145         (WebCore::NPObjectWrapper::NPHasProperty):
3146         (WebCore::NPObjectWrapper::NPGetProperty):
3147         (WebCore::NPObjectWrapper::NPSetProperty):
3148         (WebCore::NPObjectWrapper::NPRemoveProperty):
3149         (WebCore::NPObjectWrapper::NPNEnumerate):
3150         (WebCore::NPObjectWrapper::NPNConstruct):
3151         (WebCore::NPObjectWrapper::NPInvokePrivate):
3152         * bindings/v8/NPObjectWrapper.h: Added.
3153         (WebCore):
3154         (NPObjectWrapper):
3155         * bindings/v8/NPV8Object.cpp:
3156         (WebCore::freeV8NPObject):
3157         (_NPN_Invoke):
3158         (_NPN_InvokeDefault):
3159         (_NPN_EvaluateHelper):
3160         (_NPN_GetProperty):
3161         (_NPN_SetProperty):
3162         (_NPN_RemoveProperty):
3163         (_NPN_HasProperty):
3164         (_NPN_HasMethod):
3165         (_NPN_Enumerate):
3166         (_NPN_Construct):
3167         * bindings/v8/NPV8Object.h:
3168         (WebCore):
3169         * bindings/v8/ScriptController.cpp:
3170         (WebCore::ScriptController::ScriptController):
3171         (WebCore::ScriptController::clearScriptObjects):
3172         (WebCore::ScriptController::windowScriptNPObject):
3173         * bindings/v8/ScriptController.h:
3174         (ScriptController):
3175
3176 2012-07-19  Andrey Kosyakov  <caseq@chromium.org>
3177
3178         Web Inspector: minimize number of properties on WebInspector.TimelinePresentationModel.Record
3179         https://bugs.webkit.org/show_bug.cgi?id=91744
3180
3181         Reviewed by Pavel Feldman.
3182
3183         - replace most properties on TimelinePresentationModel.Record with getters;
3184
3185         This reduces the amount of memory we use for timeline presentation model records almost by 2x.
3186
3187         * inspector/front-end/TimelinePresentationModel.js:
3188         (WebInspector.TimelinePresentationModel.Record):
3189         (WebInspector.TimelinePresentationModel.Record.prototype.get children):
3190         (WebInspector.TimelinePresentationModel.Record.prototype.get category):
3191         (WebInspector.TimelinePresentationModel.Record.prototype.get title):
3192         (WebInspector.TimelinePresentationModel.Record.prototype.get startTime):
3193         (WebInspector.TimelinePresentationModel.Record.prototype.get data):
3194         (WebInspector.TimelinePresentationModel.Record.prototype.get type):
3195         (WebInspector.TimelinePresentationModel.Record.prototype.get frameId):
3196         (WebInspector.TimelinePresentationModel.Record.prototype.get endTime):
3197         (WebInspector.TimelinePresentationModel.Record.prototype.get totalHeapSize):
3198         (WebInspector.TimelinePresentationModel.Record.prototype.get usedHeapSize):
3199         (WebInspector.TimelinePresentationModel.Record.prototype.get _selfTime):
3200         (WebInspector.TimelinePresentationModel.Record.prototype.get stackTrace):
3201         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
3202         (WebInspector.TimelinePresentationModel.Record.prototype.calculateAggregatedStats):
3203
3204 2012-07-19  Dongwoo Im  <dw.im@samsung.com>
3205
3206         [EFL] Fix build break when WEB_AUDIO is enabled.
3207         https://bugs.webkit.org/show_bug.cgi?id=91735
3208
3209         Unreviewed build fix.
3210
3211         New files are added for the Web Audio fearure.
3212         These files should be included into the CMakeLists.txt file.
3213
3214         * CMakeLists.txt: Add the newly created files into the CMakeLists.txt
3215
3216 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
3217
3218         [Qt] Remove support for Qt versions before 4.8.0
3219         https://bugs.webkit.org/show_bug.cgi?id=91730
3220
3221         Reviewed by Kenneth Rohde Christiansen.
3222
3223         Remove Qt version check #ifdefs for Qt versions before 4.8.0.
3224
3225         * platform/graphics/qt/GraphicsContextQt.cpp:
3226         (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect):
3227         * platform/qt/ThirdPartyCookiesQt.cpp:
3228         (WebCore::urlsShareSameDomain):
3229         (WebCore::thirdPartyCookiePolicyPermits):
3230
3231 2012-07-19  Peter Rybin  <peter.rybin@gmail.com>
3232
3233         Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build
3234         https://bugs.webkit.org/show_bug.cgi?id=90642
3235
3236         Reviewed by Yury Semikhatsky.
3237
3238         A small intermediate writer is added. It handles comparing old and new source before actual writing.
3239
3240         * inspector/CodeGeneratorInspector.py:
3241         (flatten_list):
3242         (SmartOutput):
3243         (SmartOutput.__init__):
3244         (SmartOutput.write):
3245         (SmartOutput.close):
3246
3247 2012-07-19  Mario Sanchez Prada  <msanchez@igalia.com>
3248
3249         [GTK] MHTML files not being loaded due to reported mime type not supported
3250         https://bugs.webkit.org/show_bug.cgi?id=89978
3251
3252         Reviewed by Carlos Garcia Campos.
3253
3254         Make 'message/rfc822' a supported MIME type for MHTML files in GTK.
3255
3256         * loader/MainResourceLoader.cpp:
3257         (WebCore::MainResourceLoader::continueAfterContentPolicy): Add
3258         'message/rfc822' to the list of MIME types to be considered to
3259         avoid them bypasing cross-domain security checks, only for GTK.
3260         * loader/archive/ArchiveFactory.cpp:
3261         (WebCore::archiveMIMETypes): Add 'message/rfc822' to the list of
3262         supported MIME types when MHTML support is enabled in GTK.
3263
3264 2012-07-19  Jan Keromnes  <janx@linux.com>
3265
3266         Web Inspector: Factor ExtensionView into separate file
3267         https://bugs.webkit.org/show_bug.cgi?id=91699
3268
3269         Reviewed by Vsevolod Vlasov.
3270
3271         The class ExtensionView was defined in ExtensionPanel.js but needed to
3272         be in a separate file since it is going to be reused somewhere else.
3273
3274         Current test coverage is enough since no behavior was changed.
3275
3276         * WebCore.gypi:
3277         * WebCore.vcproj/WebCore.vcproj:
3278         * inspector/compile-front-end.py:
3279         * inspector/front-end/ExtensionPanel.js:
3280         * inspector/front-end/WebKit.qrc:
3281         * inspector/front-end/inspector.html:
3282
3283 2012-07-19  Shinya Kawanaka  <shinyak@chromium.org>
3284
3285         [Refactoring] Use userAgentShadowRoot() to take user agent shadow root.
3286         https://bugs.webkit.org/show_bug.cgi?id=91716
3287
3288         Reviewed by Hajime Morita.
3289
3290         We have introduced Element::userAgentShadowRoot in r123071 to take user agent shadow root.
3291         We have used shadow()->oldestShadowRoot() to take the user agent shadow root, however its code intention was
3292         not so clear. Using userAgentShadowRoot() will make it clearer.
3293
3294         No new tests, simple refactoring.
3295
3296         * html/ColorInputType.cpp:
3297         (WebCore::ColorInputType::createShadowSubtree):
3298         (WebCore::ColorInputType::shadowColorSwatch):
3299         * html/FileInputType.cpp:
3300         (WebCore::FileInputType::createShadowSubtree):
3301         (WebCore::FileInputType::multipleAttributeChanged):
3302         * html/HTMLDetailsElement.cpp:
3303         (WebCore::HTMLDetailsElement::findMainSummary):
3304         * html/HTMLImageElement.cpp:
3305         (WebCore::HTMLImageElement::willAddAuthorShadowRoot):
3306         (WebCore::HTMLImageElement::imageElement):
3307         (WebCore::HTMLImageElement::innerElement):
3308         * html/HTMLKeygenElement.cpp:
3309         (WebCore::HTMLKeygenElement::shadowSelect):
3310         * html/HTMLTextAreaElement.cpp:
3311         (WebCore::HTMLTextAreaElement::innerTextElement):
3312         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
3313         * html/InputType.cpp:
3314         (WebCore::InputType::destroyShadowSubtree):
3315         * html/RangeInputType.cpp:
3316         (WebCore::RangeInputType::handleMouseDownEvent):
3317         (WebCore::RangeInputType::createShadowSubtree):
3318         * html/TextFieldInputType.cpp:
3319         (WebCore::TextFieldInputType::createShadowSubtree):
3320         (WebCore::TextFieldInputType::updatePlaceholderText):
3321         * html/ValidationMessage.cpp:
3322         (WebCore::ValidationMessage::deleteBubbleTree):
3323         * html/shadow/SliderThumbElement.cpp:
3324         (WebCore::sliderThumbElementOf):
3325         (WebCore::trackLimiterElementOf):
3326
3327 2012-07-19  Keishi Hattori  <keishi@webkit.org>
3328
3329         Redraw slider tick marks when datalist changes.
3330         https://bugs.webkit.org/show_bug.cgi?id=89544
3331
3332         Reviewed by Kent Tamura.
3333
3334         Updating the datalist should redraw the slider tick marks. This patch monitors
3335         the id target element of the list attribute using ListAttributeTargetObserver
3336         and notifies changes to the option element inside of a datalist element.
3337
3338         Test: fast/forms/datalist/update-range-with-datalist.html
3339
3340         * html/HTMLDataListElement.cpp:
3341         (WebCore::HTMLDataListElement::optionElementChildrenChanged): Called when a child option element's value might have changed.
3342         (WebCore):
3343         * html/HTMLDataListElement.h:
3344         (HTMLDataListElement):
3345         * html/HTMLInputElement.cpp:
3346         (ListAttributeTargetObserver): Inherits IdTargetObserver.
3347         (WebCore):
3348         (WebCore::HTMLInputElement::parseAttribute): Observe the form attribute target.
3349         (WebCore::HTMLInputElement::insertedInto): Observe the form attribute id target.
3350         (WebCore::HTMLInputElement::removedFrom): Remove the observer.
3351         (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
3352         (WebCore::HTMLInputElement::listAttributeTargetChanged):
3353         (WebCore::ListAttributeTargetObserver::create):
3354         (WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver):
3355         (WebCore::ListAttributeTargetObserver::idTargetChanged):
3356         * html/HTMLInputElement.h:
3357         (WebCore):
3358         (HTMLInputElement):
3359         * html/HTMLOptionElement.cpp:
3360         (WebCore::HTMLOptionElement::parseAttribute): If the value attribute changed, notify the owner datalist element.
3361         (WebCore::HTMLOptionElement::childrenChanged): If the children changed, notify the owner datalist element.
3362         (WebCore):
3363         (WebCore::HTMLOptionElement::ownerDataListElement): The datalist that the option element is inside of.
3364         * html/HTMLOptionElement.h:
3365         (WebCore):
3366         (HTMLOptionElement):
3367         * html/InputType.cpp:
3368         (WebCore):
3369         (WebCore::InputType::listAttributeTargetChanged):
3370         * html/InputType.h:
3371         (InputType):
3372         * html/RangeInputType.cpp:
3373         (WebCore):
3374         (WebCore::RangeInputType::listAttributeTargetChanged):
3375         * html/RangeInputType.h:
3376         (RangeInputType):
3377
3378 2012-07-19  Dongwoo Im  <dw.im@samsung.com>
3379
3380         CodeGeneratorV8.pm : @enabledAtRuntime is not used in GenerateHeader.
3381         https://bugs.webkit.org/show_bug.cgi?id=91715
3382
3383         Reviewed by Kentaro Hara.
3384
3385         @enabledAtRuntime is not used in GenerateHeader.
3386         We can remove it from GenerateHeader.
3387
3388         No new tests as this has no functional changes.
3389
3390         * bindings/scripts/CodeGeneratorV8.pm: Remove @enabledAtRuntime from GenerateHeader.
3391         (GenerateHeader):
3392
3393 2012-07-19  Abhishek Arya  <inferno@chromium.org>
3394
3395         Crash in FontCache::releaseFontData.
3396         https://bugs.webkit.org/show_bug.cgi?id=91710
3397
3398         Reviewed by Tim Horton.
3399
3400         Revert back change made to StyleResolver in r122896. The
3401         maximum font size clamp is required there since transformed
3402         sizes use that code path.
3403
3404         * css/StyleResolver.cpp:
3405         (WebCore::StyleResolver::collectMatchingRulesForList):
3406
3407 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
3408
3409         Another build fix after r123065. Don't list deleted file in gypi.
3410
3411         * WebCore.gypi:
3412
3413 2012-07-18  Keishi Hattori  <keishi@webkit.org>
3414
3415         Implement painting slider tick marks
3416         https://bugs.webkit.org/show_bug.cgi?id=87844
3417
3418         Reviewed by Kent Tamura.
3419
3420         This implements painting slider tick marks for <datalist> support for input type=range.
3421         This does not support automatic update when list target changes, and it will be fixed
3422         in a follow up patch (Bug 89544).
3423
3424         Tests: fast/forms/datalist/input-appearance-range-with-datalist-rtl.html
3425                fast/forms/datalist/input-appearance-range-with-datalist-zoomed.html
3426                fast/forms/datalist/input-appearance-range-with-datalist.html
3427
3428         * html/HTMLInputElement.cpp:
3429         (WebCore::HTMLInputElement::sliderThumbElement):
3430         (WebCore):
3431         * html/HTMLInputElement.h:
3432         (HTMLInputElement):
3433         * html/InputType.h:
3434         (WebCore::InputType::sliderThumbElement):
3435         * html/RangeInputType.cpp:
3436         (WebCore::RangeInputType::typeMismatchFor): We need HTMLInputElement::isValidValue("foo") to return false.
3437         (WebCore):
3438         (WebCore::RangeInputType::sliderThumbElement):
3439         * html/RangeInputType.h:
3440         (RangeInputType):
3441         * html/shadow/SliderThumbElement.cpp:
3442         (WebCore::RenderSliderContainer::layout): Slider height needs to be increased for the tick marks.
3443         * platform/efl/RenderThemeEfl.cpp:
3444         (WebCore):
3445         (WebCore::RenderThemeEfl::sliderTickSize):
3446         (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
3447         * platform/efl/RenderThemeEfl.h:
3448         (RenderThemeEfl):
3449         * platform/qt/RenderThemeQt.cpp:
3450         (WebCore::RenderThemeQt::sliderTickSize):
3451         (WebCore):
3452         (WebCore::RenderThemeQt::sliderTickOffsetFromTrackCenter):
3453         * platform/qt/RenderThemeQt.h:
3454         (RenderThemeQt):