summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:52:39 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:42 +0100
commit5e86dc63da68e46049c5252367ef8b2a54016f0a (patch)
tree2208c15081206389f2bbc510f7ebcd4e536982d9
parent7ca64be9978f9d37eb50cfda93839328ab4d0440 (diff)
downloadexternal_webkit-5e86dc63da68e46049c5252367ef8b2a54016f0a.zip
external_webkit-5e86dc63da68e46049c5252367ef8b2a54016f0a.tar.gz
external_webkit-5e86dc63da68e46049c5252367ef8b2a54016f0a.tar.bz2
Merge Webkit at r70209: Fix conflicts
WebCore/page/FrameView.cpp http://trac.webkit.org/changeset/69896 WebCore/html/parser/HTMLDocumentParser.cpp http://trac.webkit.org/changeset/69283 WebCore/html/HTMLPlugInElement.h http://trac.webkit.org/changeset/69596 WebCore/html/HTMLInputElement.cpp http://trac.webkit.org/changeset/68996 http://trac.webkit.org/changeset/69378 WebCore/plugins/npapi.cpp http://trac.webkit.org/changeset/69808 WebCore/css/CSSComputedStyleDeclaration.cpp http://trac.webkit.org/changeset/69220 WebCore/css/CSSParser.cpp http://trac.webkit.org/changeset/69196 WebCore/rendering/style/RenderStyle.h http://trac.webkit.org/changeset/68680 WebCore/rendering/RenderImage.cpp http://trac.webkit.org/changeset/68917 WebCore/platform/android/FileSystemAndroid.cpp http://trac.webkit.org/changeset/69594 WebCore/inspector/InspectorController.h http://trac.webkit.org/changeset/68767 See also Android change I4c724f2f52a5a9db6dca6b58032b6a902aac74b5 which is why this is a conflict. JavaScriptCore/parser/Parser.cpp http://trac.webkit.org/changeset/69516 Change-Id: I5a708c6590ba029a2b3ecc3b30478ea303e1f2f5
-rw-r--r--JavaScriptCore/parser/Parser.cpp3
-rw-r--r--WebCore/css/CSSComputedStyleDeclaration.cpp6
-rw-r--r--WebCore/css/CSSParser.cpp13
-rw-r--r--WebCore/html/HTMLInputElement.cpp240
-rw-r--r--WebCore/html/HTMLPlugInElement.h6
-rw-r--r--WebCore/html/parser/HTMLDocumentParser.cpp7
-rw-r--r--WebCore/inspector/InspectorController.h93
-rw-r--r--WebCore/page/FrameView.cpp48
-rw-r--r--WebCore/platform/android/FileSystemAndroid.cpp4
-rw-r--r--WebCore/plugins/npapi.cpp32
-rw-r--r--WebCore/rendering/RenderImage.cpp46
-rw-r--r--WebCore/rendering/style/RenderStyle.h8
12 files changed, 43 insertions, 463 deletions
diff --git a/JavaScriptCore/parser/Parser.cpp b/JavaScriptCore/parser/Parser.cpp
index 5092357..33b5213 100644
--- a/JavaScriptCore/parser/Parser.cpp
+++ b/JavaScriptCore/parser/Parser.cpp
@@ -35,13 +35,10 @@ namespace JSC {
void Parser::parse(JSGlobalObject* lexicalGlobalObject, FunctionParameters* parameters, JSParserStrictness strictness, JSParserMode mode, int* errLine, UString* errMsg)
{
-<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
android::TimeCounter::start(android::TimeCounter::JavaScriptParseTimeCounter);
#endif
-=======
ASSERT(lexicalGlobalObject);
->>>>>>> webkit.org at r70209
m_sourceElements = 0;
int defaultErrLine;
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index 44cfd74..9f4c3be 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -754,14 +754,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
if (!style)
return 0;
-<<<<<<< HEAD
- propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style->blockFlow());
+ propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style->writingMode());
#ifdef ANDROID_LAYOUT
const Settings * settings = node->document()->frame() ? node->document()->frame()->settings() : 0;
#endif
-=======
- propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style->writingMode());
->>>>>>> webkit.org at r70209
switch (static_cast<CSSPropertyID>(propertyID)) {
case CSSPropertyInvalid:
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index f098a9f..e75e017 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -412,20 +412,13 @@ bool CSSParser::parseDeclaration(CSSMutableStyleDeclaration* declaration, const
}
}
-<<<<<<< HEAD
- if (!m_ruleRangeMap)
- m_currentStyleData = 0;
-
-#ifdef ANDROID_INSTRUMENT
- android::TimeCounter::record(android::TimeCounter::CSSParseTimeCounter, __FUNCTION__);
-#endif
-
-=======
if (styleSourceData) {
*styleSourceData = m_currentRuleData->styleSourceData.release();
m_currentRuleData = 0;
}
->>>>>>> webkit.org at r70209
+#ifdef ANDROID_INSTRUMENT
+ android::TimeCounter::record(android::TimeCounter::CSSParseTimeCounter, __FUNCTION__);
+#endif
return ok;
}
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 9807a55..f572f4c 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -1155,7 +1155,6 @@ String HTMLInputElement::valueWithDefault() const
v = submitButtonDefaultLabel();
break;
}
-<<<<<<< HEAD
}
return v;
}
@@ -1227,245 +1226,6 @@ void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
InputElement::notifyFormStateChanged(this);
}
-double HTMLInputElement::parseToDouble(const String& src, double defaultValue) const
-{
- switch (deprecatedInputType()) {
- case DATE:
- case DATETIME:
- case DATETIMELOCAL:
- case TIME:
- case WEEK: {
- DateComponents date;
- if (!parseToDateComponents(deprecatedInputType(), src, &date))
- return defaultValue;
- double msec = date.millisecondsSinceEpoch();
- ASSERT(isfinite(msec));
- return msec;
- }
- case MONTH: {
- DateComponents date;
- if (!parseToDateComponents(deprecatedInputType(), src, &date))
- return defaultValue;
- double months = date.monthsSinceEpoch();
- ASSERT(isfinite(months));
- return months;
- }
- case NUMBER:
- case RANGE: {
- double numberValue;
- if (!parseToDoubleForNumberType(src, &numberValue))
- return defaultValue;
- ASSERT(isfinite(numberValue));
- return numberValue;
- }
-
- case BUTTON:
- case CHECKBOX:
- case COLOR:
- case EMAIL:
- case FILE:
- case HIDDEN:
- case IMAGE:
- case ISINDEX:
- case PASSWORD:
- case RADIO:
- case RESET:
- case SEARCH:
- case SUBMIT:
- case TELEPHONE:
- case TEXT:
- case URL:
- return defaultValue;
- }
- ASSERT_NOT_REACHED();
- return defaultValue;
-}
-
-double HTMLInputElement::valueAsDate() const
-{
- switch (deprecatedInputType()) {
- case DATE:
- case DATETIME:
- case TIME:
- case WEEK:
- return parseToDouble(value(), DateComponents::invalidMilliseconds());
- case MONTH: {
- DateComponents date;
- if (!parseToDateComponents(deprecatedInputType(), value(), &date))
- return DateComponents::invalidMilliseconds();
- double msec = date.millisecondsSinceEpoch();
- ASSERT(isfinite(msec));
- return msec;
- }
-
- case BUTTON:
- case CHECKBOX:
- case COLOR:
- case DATETIMELOCAL: // valueAsDate doesn't work for the DATETIMELOCAL type according to the standard.
- case EMAIL:
- case FILE:
- case HIDDEN:
- case IMAGE:
- case ISINDEX:
- case NUMBER:
- case PASSWORD:
- case RADIO:
- case RANGE:
- case RESET:
- case SEARCH:
- case SUBMIT:
- case TELEPHONE:
- case TEXT:
- case URL:
- return DateComponents::invalidMilliseconds();
- }
- ASSERT_NOT_REACHED();
- return DateComponents::invalidMilliseconds();
-}
-
-void HTMLInputElement::setValueAsDate(double value, ExceptionCode& ec)
-{
- switch (deprecatedInputType()) {
- case DATE:
- case DATETIME:
- case TIME:
- case WEEK:
- setValue(serializeForDateTimeTypes(value));
- return;
- case MONTH: {
- DateComponents date;
- if (!date.setMillisecondsSinceEpochForMonth(value)) {
- setValue(String());
- return;
- }
- setValue(date.toString());
- return;
- }
- case BUTTON:
- case CHECKBOX:
- case COLOR:
- case DATETIMELOCAL: // valueAsDate doesn't work for the DATETIMELOCAL type according to the standard.
- case EMAIL:
- case FILE:
- case HIDDEN:
- case IMAGE:
- case ISINDEX:
- case NUMBER:
- case PASSWORD:
- case RADIO:
- case RANGE:
- case RESET:
- case SEARCH:
- case SUBMIT:
- case TELEPHONE:
- case TEXT:
- case URL:
- ec = INVALID_STATE_ERR;
- return;
- }
- ASSERT_NOT_REACHED();
-}
-
-double HTMLInputElement::valueAsNumber() const
-{
- const double nan = numeric_limits<double>::quiet_NaN();
- switch (deprecatedInputType()) {
- case DATE:
- case DATETIME:
- case DATETIMELOCAL:
- case MONTH:
- case NUMBER:
- case RANGE:
- case TIME:
- case WEEK:
- return parseToDouble(value(), nan);
-
- case BUTTON:
- case CHECKBOX:
- case COLOR:
- case EMAIL:
- case FILE:
- case HIDDEN:
- case IMAGE:
- case ISINDEX:
- case PASSWORD:
- case RADIO:
- case RESET:
- case SEARCH:
- case SUBMIT:
- case TELEPHONE:
- case TEXT:
- case URL:
- return nan;
-=======
->>>>>>> webkit.org at r70209
- }
- return v;
-}
-
-void HTMLInputElement::setValueForUser(const String& value)
-{
- // Call setValue and make it send a change event.
- setValue(value, true);
-}
-
-const String& HTMLInputElement::suggestedValue() const
-{
- return m_data.suggestedValue();
-}
-
-void HTMLInputElement::setSuggestedValue(const String& value)
-{
- if (deprecatedInputType() != TEXT)
- return;
- setFormControlValueMatchesRenderer(false);
- m_data.setSuggestedValue(sanitizeValue(value));
- updatePlaceholderVisibility(false);
- if (renderer())
- renderer()->updateFromElement();
- setNeedsStyleRecalc();
-}
-
-void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
-{
- // For security reasons, we don't allow setting the filename, but we do allow clearing it.
- // The HTML5 spec (as of the 10/24/08 working draft) says that the value attribute isn't applicable to the file upload control
- // but we don't want to break existing websites, who may be relying on this method to clear things.
- if (deprecatedInputType() == FILE && !value.isEmpty())
- return;
-
- setFormControlValueMatchesRenderer(false);
- if (storesValueSeparateFromAttribute()) {
- if (deprecatedInputType() == FILE)
- m_fileList->clear();
- else {
- m_data.setValue(sanitizeValue(value));
- if (isTextField())
- updatePlaceholderVisibility(false);
- }
- setNeedsStyleRecalc();
- } else
- setAttribute(valueAttr, sanitizeValue(value));
-
- setNeedsValidityCheck();
-
- if (isTextField()) {
- unsigned max = m_data.value().length();
- if (document()->focusedNode() == this)
- InputElement::updateSelectionRange(this, this, max, max);
- else
- cacheSelection(max, max);
- m_data.setSuggestedValue(String());
- }
-
- // Don't dispatch the change event when focused, it will be dispatched
- // when the control loses focus.
- if (sendChangeEvent && document()->focusedNode() != this)
- dispatchFormControlChangeEvent();
-
- InputElement::notifyFormStateChanged(this);
-}
-
double HTMLInputElement::valueAsDate() const
{
return m_inputType->valueAsDate();
diff --git a/WebCore/html/HTMLPlugInElement.h b/WebCore/html/HTMLPlugInElement.h
index 44c6149..9d25fee 100644
--- a/WebCore/html/HTMLPlugInElement.h
+++ b/WebCore/html/HTMLPlugInElement.h
@@ -59,15 +59,13 @@ protected:
virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
virtual void parseMappedAttribute(Attribute*);
-<<<<<<< HEAD
+ bool m_inBeforeLoadEventHandler;
+
#if PLATFORM(ANDROID)
// in Android, plugin has a focused mode where it accepts all the touch events.
// so need to claim that plugin element supports focus instead of using the default.
virtual bool supportsFocus() const;
#endif
-=======
- bool m_inBeforeLoadEventHandler;
->>>>>>> webkit.org at r70209
private:
virtual void defaultEventHandler(Event*);
diff --git a/WebCore/html/parser/HTMLDocumentParser.cpp b/WebCore/html/parser/HTMLDocumentParser.cpp
index 743e5d5..46530d5 100644
--- a/WebCore/html/parser/HTMLDocumentParser.cpp
+++ b/WebCore/html/parser/HTMLDocumentParser.cpp
@@ -42,17 +42,10 @@
#include "XSSAuditor.h"
#include <wtf/CurrentTime.h>
-<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
#include "TimeCounter.h"
#endif
-#if ENABLE(INSPECTOR)
-#include "InspectorTimelineAgent.h"
-#endif
-
-=======
->>>>>>> webkit.org at r70209
namespace WebCore {
using namespace HTMLNames;
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index a047962..6d4d9e0 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -409,99 +409,6 @@ private:
#endif
};
-<<<<<<< HEAD
-inline void InspectorController::willInsertDOMNode(Node* node, Node* parent)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(parent))
- inspectorController->willInsertDOMNodeImpl(node, parent);
-#endif
-}
-
-inline void InspectorController::didInsertDOMNode(Node* node)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(node))
- inspectorController->didInsertDOMNodeImpl(node);
-#endif
-}
-
-inline void InspectorController::willRemoveDOMNode(Node* node)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(node)) {
- inspectorController->willRemoveDOMNodeImpl(node);
- inspectorController->didRemoveDOMNodeImpl(node);
- }
-#endif
-}
-
-inline void InspectorController::willModifyDOMAttr(Element* element)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(element))
- inspectorController->willModifyDOMAttrImpl(element);
-#endif
-}
-
-inline void InspectorController::didModifyDOMAttr(Element* element)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(element))
- inspectorController->didModifyDOMAttrImpl(element);
-#endif
-}
-
-inline void InspectorController::characterDataModified(CharacterData* characterData)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForNode(characterData))
- inspectorController->characterDataModifiedImpl(characterData);
-#endif
-}
-
-inline void InspectorController::instrumentWillSendXMLHttpRequest(ScriptExecutionContext* context, const KURL& url)
-{
-#if ENABLE(INSPECTOR)
- if (InspectorController* inspectorController = inspectorControllerForScriptExecutionContext(context))
- inspectorController->instrumentWillSendXMLHttpRequestImpl(url);
-#endif
-}
-
-inline InspectorController* InspectorController::inspectorControllerForScriptExecutionContext(ScriptExecutionContext* context)
-{
- if (!s_inspectorControllerCount || !context || !context->isDocument())
- return 0;
- return inspectorControllerForDocument(static_cast<Document*>(context));
-}
-
-inline InspectorController* InspectorController::inspectorControllerForNode(Node* node)
-{
- if (!s_inspectorControllerCount)
- return 0;
- return inspectorControllerForDocument(node->document());
-}
-
-inline InspectorController* InspectorController::inspectorControllerForDocument(Document* document)
-{
- ASSERT(document);
- Page* page = document->page();
- if (!page)
- return 0;
-#if ENABLE(INSPECTOR)
- InspectorController* inspectorController = page->inspectorController();
- if (!inspectorController)
- return 0;
- if (!inspectorController->hasFrontend())
- return 0;
- return inspectorController;
-#else
- return 0;
-#endif
-}
-
-=======
->>>>>>> webkit.org at r70209
} // namespace WebCore
#endif // !defined(InspectorController_h)
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 660cdfb..6abb07c 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -503,9 +503,11 @@ void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar
Node* body = document->body();
if (body && body->renderer()) {
if (body->hasTagName(framesetTag) && m_frame->settings() && !m_frame->settings()->frameFlatteningEnabled()) {
+#if !defined(ANDROID_FLATTEN_IFRAME) && !defined(ANDROID_FLATTEN_FRAMESET)
body->renderer()->setChildNeedsLayout(true);
vMode = ScrollbarAlwaysOff;
hMode = ScrollbarAlwaysOff;
+#endif
} else if (body->hasTagName(bodyTag)) {
if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewport())
body->renderer()->setChildNeedsLayout(true);
@@ -732,54 +734,8 @@ void FrameView::layout(bool allowSubtree)
ScrollbarMode hMode;
ScrollbarMode vMode;
-<<<<<<< HEAD
- if (m_canHaveScrollbars) {
- hMode = ScrollbarAuto;
- vMode = ScrollbarAuto;
- } else {
- hMode = ScrollbarAlwaysOff;
- vMode = ScrollbarAlwaysOff;
- }
-
- if (!subtree) {
- Node* documentElement = document->documentElement();
- RenderObject* rootRenderer = documentElement ? documentElement->renderer() : 0;
- Node* body = document->body();
- if (body && body->renderer()) {
- if (body->hasTagName(framesetTag) && m_frame->settings() && !m_frame->settings()->frameFlatteningEnabled()) {
-#if !defined(ANDROID_FLATTEN_IFRAME) && !defined(ANDROID_FLATTEN_FRAMESET)
- body->renderer()->setChildNeedsLayout(true);
- vMode = ScrollbarAlwaysOff;
- hMode = ScrollbarAlwaysOff;
-#endif
- } else if (body->hasTagName(bodyTag)) {
- if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewHeight())
- body->renderer()->setChildNeedsLayout(true);
- // It's sufficient to just check the X overflow,
- // since it's illegal to have visible in only one direction.
- RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE && document->documentElement()->hasTagName(htmlTag) ? body->renderer() : rootRenderer;
- applyOverflowToViewport(o, hMode, vMode);
- }
- } else if (rootRenderer) {
-#if ENABLE(SVG)
- if (documentElement->isSVGElement()) {
- if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight()))
- rootRenderer->setChildNeedsLayout(true);
- } else
- applyOverflowToViewport(rootRenderer, hMode, vMode);
-#else
- applyOverflowToViewport(rootRenderer, hMode, vMode);
-#endif
- }
-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
- if (m_firstLayout && !document->ownerElement())
- printf("Elapsed time before first layout: %d\n", document->elapsedTime());
-#endif
- }
-=======
calculateScrollbarModesForLayout(hMode, vMode);
->>>>>>> webkit.org at r70209
m_doFullRepaint = !subtree && (m_firstLayout || toRenderView(root)->printing());
diff --git a/WebCore/platform/android/FileSystemAndroid.cpp b/WebCore/platform/android/FileSystemAndroid.cpp
index 5ab8929..66bb976 100644
--- a/WebCore/platform/android/FileSystemAndroid.cpp
+++ b/WebCore/platform/android/FileSystemAndroid.cpp
@@ -28,11 +28,7 @@
#include "config.h"
#include "FileSystem.h"
-<<<<<<< HEAD
#include "PlatformBridge.h"
-#include "StringBuilder.h"
-=======
->>>>>>> webkit.org at r70209
#include "cutils/log.h"
#include <dirent.h>
#include <dlfcn.h>
diff --git a/WebCore/plugins/npapi.cpp b/WebCore/plugins/npapi.cpp
index 9d404b1..bc64901 100644
--- a/WebCore/plugins/npapi.cpp
+++ b/WebCore/plugins/npapi.cpp
@@ -176,23 +176,6 @@ void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userDa
PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData);
}
-<<<<<<< HEAD
-#ifdef PLUGIN_SCHEDULE_TIMER
-uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat,
- void (*timerFunc)(NPP npp, uint32_t timerID))
-{
- return pluginViewForInstance(instance)->scheduleTimer(instance, interval,
- repeat != 0, timerFunc);
-}
-
-void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
-{
- pluginViewForInstance(instance)->unscheduleTimer(instance, timerID);
-}
-#endif
-
-
-=======
NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len)
{
return pluginViewForInstance(instance)->getValueForURL(variable, url, value, len);
@@ -207,4 +190,17 @@ NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char
{
return pluginViewForInstance(instance)->getAuthenticationInfo(protocol, host, port, scheme, realm, username, ulen, password, plen);
}
->>>>>>> webkit.org at r70209
+
+#ifdef PLUGIN_SCHEDULE_TIMER
+uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat,
+ void (*timerFunc)(NPP npp, uint32_t timerID))
+{
+ return pluginViewForInstance(instance)->scheduleTimer(instance, interval,
+ repeat != 0, timerFunc);
+}
+
+void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
+{
+ pluginViewForInstance(instance)->unscheduleTimer(instance, timerID);
+}
+#endif
diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp
index e6f4dbe..d21c1ea 100644
--- a/WebCore/rendering/RenderImage.cpp
+++ b/WebCore/rendering/RenderImage.cpp
@@ -470,22 +470,18 @@ int RenderImage::computeReplacedLogicalWidth(bool includeMaxWidth) const
int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth());
-<<<<<<< HEAD
#ifdef ANDROID_LAYOUT
- width = max(minW, min(width, maxW));
+ logicalWidth = max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
// in SSR mode, we will fit the image to its container width
if (document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) {
int cw = containingBlockLogicalWidthForContent();
- if (cw && width>cw)
- width = cw;
+ if (cw && logicalWidth > cw)
+ logicalWidth = cw;
}
- return width;
+ return logicalWidth;
#else
- return max(minW, min(width, maxW));
-#endif
-=======
return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
->>>>>>> webkit.org at r70209
+#endif
}
int RenderImage::computeReplacedLogicalHeight() const
@@ -504,32 +500,28 @@ int RenderImage::computeReplacedLogicalHeight() const
int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight());
int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight());
-<<<<<<< HEAD
#ifdef ANDROID_LAYOUT
- height = max(minH, min(height, maxH));
+ logicalHeight = max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
// in SSR mode, we will fit the image to its container width
- if (height && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) {
- int width;
- if (isWidthSpecified())
- width = computeReplacedWidthUsing(style()->width());
+ if (logicalHeight && document()->settings()->layoutAlgorithm() == Settings::kLayoutSSR) {
+ int logicalWidth;
+ if (isLogicalWidthSpecified())
+ logicalWidth = computeReplacedLogicalWidthUsing(style()->width());
else
- width = calcAspectRatioWidth();
- int minW = computeReplacedWidthUsing(style()->minWidth());
- int maxW = style()->maxWidth().value() == undefinedLength ? width :
- computeReplacedWidthUsing(style()->maxWidth());
- width = max(minW, min(width, maxW));
+ logicalWidth = calcAspectRatioLogicalWidth();
+ int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->minWidth());
+ int maxLogicalWidth = style()->maxWidth().value() == undefinedLength ? logicalWidth :
+ computeReplacedLogicalWidthUsing(style()->maxWidth());
+ logicalWidth = max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
int cw = containingBlockLogicalWidthForContent();
- if (cw && width && width > cw)
- height = cw * height / width; // preserve aspect ratio
+ if (cw && logicalWidth && logicalWidth > cw)
+ logicalHeight = cw * logicalHeight / logicalWidth; // preserve aspect ratio
}
- return height;
+ return logicalHeight;
#else
- return max(minH, min(height, maxH));
-#endif
-=======
return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
->>>>>>> webkit.org at r70209
+#endif
}
int RenderImage::calcAspectRatioLogicalWidth() const
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 587b473..96645cf 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -753,7 +753,8 @@ public:
bool isHorizontalWritingMode() const { return writingMode() == TopToBottomWritingMode || writingMode() == BottomToTopWritingMode; }
bool isFlippedLinesWritingMode() const { return writingMode() == LeftToRightWritingMode || writingMode() == BottomToTopWritingMode; }
-<<<<<<< HEAD
+ ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); }
+
#ifdef ANDROID_CSS_RING
// called when building nav cache to determine if the ring data is unchanged
const void* ringData() const { return reinterpret_cast<const void*>(rareInheritedData.get()); }
@@ -770,11 +771,6 @@ public:
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; }
#endif
-
-=======
- ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); }
-
->>>>>>> webkit.org at r70209
// attribute setter methods
void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; }